// automatically generated by rust-bindgen 0.71.1

#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
pub use ohos_sys_opaque_types::{napi_env, napi_value};

pub const NAPI_VERSION: u32 = 8;
pub const NAPI_VERSION_EXPERIMENTAL: u32 = 2147483647;
pub const NAPI_AUTO_LENGTH: i32 = -1;
pub const NAPI_MODULE_VERSION: u32 = 1;
impl napi_qos_t {
    pub const napi_qos_background: napi_qos_t = napi_qos_t(0);
    pub const napi_qos_utility: napi_qos_t = napi_qos_t(1);
    pub const napi_qos_default: napi_qos_t = napi_qos_t(2);
    pub const napi_qos_user_initiated: napi_qos_t = napi_qos_t(3);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct napi_qos_t(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl napi_event_mode {
    /// In this mode, the current asynchronous thread will be blocked and events of native event loop will
    /// be processed.
    pub const napi_event_mode_default: napi_event_mode = napi_event_mode(0);
    /// In this mode, the current asynchronous thread will not be blocked. If there are events in the event loop,
    /// only one event will be processed and then the event loop will stop. If there are no events in the loop,
    /// the event loop will stop immediately.
    pub const napi_event_mode_nowait: napi_event_mode = napi_event_mode(1);
}
#[repr(transparent)]
/// Indicates the running mode of the native event loop in an asynchronous native thread.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct napi_event_mode(pub ::core::ffi::c_uint);
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl napi_task_priority {
    /// The immediate priority tasks should be promptly processed whenever feasible.
    pub const napi_priority_immediate: napi_task_priority = napi_task_priority(0);
    /// The high priority tasks, as sorted by their handle time, should be prioritized over tasks with low priority.
    pub const napi_priority_high: napi_task_priority = napi_task_priority(1);
    /// The low priority tasks, as sorted by their handle time, should be processed before idle priority tasks.
    pub const napi_priority_low: napi_task_priority = napi_task_priority(2);
    /// The idle priority tasks should be processed immediately only if there are no other priority tasks.
    pub const napi_priority_idle: napi_task_priority = napi_task_priority(3);
}
#[repr(transparent)]
/// Indicates the priority of a task dispatched from native thread to ArkTS thread.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct napi_task_priority(pub ::core::ffi::c_uint);
pub type char16_t = u16;
#[repr(C)]
pub struct napi_ref__ {
    _unused: [u8; 0],
}
pub type napi_ref = *mut napi_ref__;
#[repr(C)]
pub struct napi_handle_scope__ {
    _unused: [u8; 0],
}
pub type napi_handle_scope = *mut napi_handle_scope__;
#[repr(C)]
pub struct napi_escapable_handle_scope__ {
    _unused: [u8; 0],
}
pub type napi_escapable_handle_scope = *mut napi_escapable_handle_scope__;
#[repr(C)]
pub struct napi_callback_info__ {
    _unused: [u8; 0],
}
pub type napi_callback_info = *mut napi_callback_info__;
#[repr(C)]
pub struct napi_deferred__ {
    _unused: [u8; 0],
}
pub type napi_deferred = *mut napi_deferred__;
impl napi_property_attributes {
    pub const napi_default: napi_property_attributes = napi_property_attributes(0);
    pub const napi_writable: napi_property_attributes = napi_property_attributes(1);
    pub const napi_enumerable: napi_property_attributes = napi_property_attributes(2);
    pub const napi_configurable: napi_property_attributes = napi_property_attributes(4);
    pub const napi_static: napi_property_attributes = napi_property_attributes(1024);
    pub const napi_default_method: napi_property_attributes = napi_property_attributes(5);
    pub const napi_default_jsproperty: napi_property_attributes = napi_property_attributes(7);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct napi_property_attributes(pub ::core::ffi::c_uint);
impl napi_valuetype {
    pub const napi_undefined: napi_valuetype = napi_valuetype(0);
    pub const napi_null: napi_valuetype = napi_valuetype(1);
    pub const napi_boolean: napi_valuetype = napi_valuetype(2);
    pub const napi_number: napi_valuetype = napi_valuetype(3);
    pub const napi_string: napi_valuetype = napi_valuetype(4);
    pub const napi_symbol: napi_valuetype = napi_valuetype(5);
    pub const napi_object: napi_valuetype = napi_valuetype(6);
    pub const napi_function: napi_valuetype = napi_valuetype(7);
    pub const napi_external: napi_valuetype = napi_valuetype(8);
    pub const napi_bigint: napi_valuetype = napi_valuetype(9);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct napi_valuetype(pub ::core::ffi::c_uint);
impl napi_typedarray_type {
    pub const napi_int8_array: napi_typedarray_type = napi_typedarray_type(0);
    pub const napi_uint8_array: napi_typedarray_type = napi_typedarray_type(1);
    pub const napi_uint8_clamped_array: napi_typedarray_type = napi_typedarray_type(2);
    pub const napi_int16_array: napi_typedarray_type = napi_typedarray_type(3);
    pub const napi_uint16_array: napi_typedarray_type = napi_typedarray_type(4);
    pub const napi_int32_array: napi_typedarray_type = napi_typedarray_type(5);
    pub const napi_uint32_array: napi_typedarray_type = napi_typedarray_type(6);
    pub const napi_float32_array: napi_typedarray_type = napi_typedarray_type(7);
    pub const napi_float64_array: napi_typedarray_type = napi_typedarray_type(8);
    pub const napi_bigint64_array: napi_typedarray_type = napi_typedarray_type(9);
    pub const napi_biguint64_array: napi_typedarray_type = napi_typedarray_type(10);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct napi_typedarray_type(pub ::core::ffi::c_uint);
impl napi_status {
    pub const napi_ok: napi_status = napi_status(0);
    pub const napi_invalid_arg: napi_status = napi_status(1);
    pub const napi_object_expected: napi_status = napi_status(2);
    pub const napi_string_expected: napi_status = napi_status(3);
    pub const napi_name_expected: napi_status = napi_status(4);
    pub const napi_function_expected: napi_status = napi_status(5);
    pub const napi_number_expected: napi_status = napi_status(6);
    pub const napi_boolean_expected: napi_status = napi_status(7);
    pub const napi_array_expected: napi_status = napi_status(8);
    pub const napi_generic_failure: napi_status = napi_status(9);
    pub const napi_pending_exception: napi_status = napi_status(10);
    pub const napi_cancelled: napi_status = napi_status(11);
    pub const napi_escape_called_twice: napi_status = napi_status(12);
    pub const napi_handle_scope_mismatch: napi_status = napi_status(13);
    pub const napi_callback_scope_mismatch: napi_status = napi_status(14);
    pub const napi_queue_full: napi_status = napi_status(15);
    pub const napi_closing: napi_status = napi_status(16);
    pub const napi_bigint_expected: napi_status = napi_status(17);
    pub const napi_date_expected: napi_status = napi_status(18);
    pub const napi_arraybuffer_expected: napi_status = napi_status(19);
    pub const napi_detachable_arraybuffer_expected: napi_status = napi_status(20);
    pub const napi_would_deadlock: napi_status = napi_status(21);
    pub const napi_create_ark_runtime_too_many_envs: napi_status = napi_status(22);
    pub const napi_create_ark_runtime_only_one_env_per_thread: napi_status = napi_status(23);
    pub const napi_destroy_ark_runtime_env_not_exist: napi_status = napi_status(24);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct napi_status(pub ::core::ffi::c_uint);
pub type napi_callback = ::core::option::Option<
    unsafe extern "C" fn(env: napi_env, info: napi_callback_info) -> napi_value,
>;
pub type napi_finalize = ::core::option::Option<
    unsafe extern "C" fn(
        env: napi_env,
        finalize_data: *mut ::core::ffi::c_void,
        finalize_hint: *mut ::core::ffi::c_void,
    ),
>;
#[repr(C)]
pub struct napi_property_descriptor {
    pub utf8name: *const ::core::ffi::c_char,
    pub name: napi_value,
    pub method: napi_callback,
    pub getter: napi_callback,
    pub setter: napi_callback,
    pub value: napi_value,
    pub attributes: napi_property_attributes,
    pub data: *mut ::core::ffi::c_void,
}
#[repr(C)]
#[derive(Debug)]
pub struct napi_extended_error_info {
    pub error_message: *const ::core::ffi::c_char,
    pub engine_reserved: *mut ::core::ffi::c_void,
    pub engine_error_code: u32,
    pub error_code: napi_status,
}
impl napi_key_collection_mode {
    pub const napi_key_include_prototypes: napi_key_collection_mode = napi_key_collection_mode(0);
    pub const napi_key_own_only: napi_key_collection_mode = napi_key_collection_mode(1);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct napi_key_collection_mode(pub ::core::ffi::c_uint);
impl napi_key_filter {
    pub const napi_key_all_properties: napi_key_filter = napi_key_filter(0);
    pub const napi_key_writable: napi_key_filter = napi_key_filter(1);
    pub const napi_key_enumerable: napi_key_filter = napi_key_filter(2);
    pub const napi_key_configurable: napi_key_filter = napi_key_filter(4);
    pub const napi_key_skip_strings: napi_key_filter = napi_key_filter(8);
    pub const napi_key_skip_symbols: napi_key_filter = napi_key_filter(16);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct napi_key_filter(pub ::core::ffi::c_uint);
impl napi_key_conversion {
    pub const napi_key_keep_numbers: napi_key_conversion = napi_key_conversion(0);
    pub const napi_key_numbers_to_strings: napi_key_conversion = napi_key_conversion(1);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct napi_key_conversion(pub ::core::ffi::c_uint);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct napi_type_tag {
    pub lower: u64,
    pub upper: u64,
}
#[repr(C)]
pub struct napi_callback_scope__ {
    _unused: [u8; 0],
}
pub type napi_callback_scope = *mut napi_callback_scope__;
#[repr(C)]
pub struct napi_async_context__ {
    _unused: [u8; 0],
}
pub type napi_async_context = *mut napi_async_context__;
#[repr(C)]
pub struct napi_async_work__ {
    _unused: [u8; 0],
}
pub type napi_async_work = *mut napi_async_work__;
#[repr(C)]
pub struct napi_threadsafe_function__ {
    _unused: [u8; 0],
}
pub type napi_threadsafe_function = *mut napi_threadsafe_function__;
impl napi_threadsafe_function_release_mode {
    pub const napi_tsfn_release: napi_threadsafe_function_release_mode =
        napi_threadsafe_function_release_mode(0);
    pub const napi_tsfn_abort: napi_threadsafe_function_release_mode =
        napi_threadsafe_function_release_mode(1);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct napi_threadsafe_function_release_mode(pub ::core::ffi::c_uint);
impl napi_threadsafe_function_call_mode {
    pub const napi_tsfn_nonblocking: napi_threadsafe_function_call_mode =
        napi_threadsafe_function_call_mode(0);
    pub const napi_tsfn_blocking: napi_threadsafe_function_call_mode =
        napi_threadsafe_function_call_mode(1);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct napi_threadsafe_function_call_mode(pub ::core::ffi::c_uint);
pub type napi_async_execute_callback =
    ::core::option::Option<unsafe extern "C" fn(env: napi_env, data: *mut ::core::ffi::c_void)>;
pub type napi_async_complete_callback = ::core::option::Option<
    unsafe extern "C" fn(env: napi_env, status: napi_status, data: *mut ::core::ffi::c_void),
>;
pub type napi_threadsafe_function_call_js = ::core::option::Option<
    unsafe extern "C" fn(
        env: napi_env,
        js_callback: napi_value,
        context: *mut ::core::ffi::c_void,
        data: *mut ::core::ffi::c_void,
    ),
>;
#[repr(C)]
#[derive(Debug)]
pub struct napi_node_version {
    pub major: u32,
    pub minor: u32,
    pub patch: u32,
    pub release: *const ::core::ffi::c_char,
}
#[repr(C)]
pub struct napi_async_cleanup_hook_handle__ {
    _unused: [u8; 0],
}
pub type napi_async_cleanup_hook_handle = *mut napi_async_cleanup_hook_handle__;
pub type napi_async_cleanup_hook = ::core::option::Option<
    unsafe extern "C" fn(handle: napi_async_cleanup_hook_handle, data: *mut ::core::ffi::c_void),
>;
#[repr(C)]
pub struct uv_loop_s {
    _unused: [u8; 0],
}
pub type napi_addon_register_func =
    ::core::option::Option<unsafe extern "C" fn(env: napi_env, exports: napi_value) -> napi_value>;
#[repr(C)]
#[derive(Debug)]
pub struct napi_module {
    pub nm_version: ::core::ffi::c_int,
    pub nm_flags: ::core::ffi::c_uint,
    pub nm_filename: *const ::core::ffi::c_char,
    pub nm_register_func: napi_addon_register_func,
    pub nm_modname: *const ::core::ffi::c_char,
    pub nm_priv: *mut ::core::ffi::c_void,
    pub reserved: [*mut ::core::ffi::c_void; 4usize],
}
/// Native detach callback of napi_coerce_to_native_binding_object that can be used to
/// detach the ArkTS object and the native object.
///
///
/// Available since API-level: 11
#[cfg(feature = "api-11")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
pub type napi_native_binding_detach_callback = ::core::option::Option<
    unsafe extern "C" fn(
        env: napi_env,
        native_object: *mut ::core::ffi::c_void,
        hint: *mut ::core::ffi::c_void,
    ) -> *mut ::core::ffi::c_void,
>;
/// Native attach callback of napi_coerce_to_native_binding_object that can be used to
/// bind the ArkTS object and the native object.
///
///
/// Available since API-level: 11
#[cfg(feature = "api-11")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
pub type napi_native_binding_attach_callback = ::core::option::Option<
    unsafe extern "C" fn(
        env: napi_env,
        native_object: *mut ::core::ffi::c_void,
        hint: *mut ::core::ffi::c_void,
    ) -> napi_value,
>;
#[repr(C)]
pub struct napi_critical_scope__ {
    _unused: [u8; 0],
}
/// Native critical scope provides a scope within that an ArkTS string buffer cache can be obtained.
///
/// Available since API-level: 21
#[cfg(feature = "api-21")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
pub type napi_critical_scope = *mut napi_critical_scope__;
#[repr(C)]
pub struct napi_strong_ref__ {
    _unused: [u8; 0],
}
/// Native strong reference of an ArkTS object.
///
/// Available since API-level: 21
#[cfg(feature = "api-21")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
pub type napi_strong_ref = *mut napi_strong_ref__;
extern "C" {
    /// Obtains the napi_extended_error_info struct, which contains the latest error information.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `result` - The error info about the error.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_last_error_info(
        env: napi_env,
        result: *mut *const napi_extended_error_info,
    ) -> napi_status;
    /// Obtains the ArkTS undefined value.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `result` - The ArkTS undefined value.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the parameter env and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_undefined(env: napi_env, result: *mut napi_value) -> napi_status;
    /// Obtains the ArkTS null value.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `result` - The ArkTS null value.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_null(env: napi_env, result: *mut napi_value) -> napi_status;
    /// Obtains the ArkTS global object.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `result` - The ArkTS global Object.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_global(env: napi_env, result: *mut napi_value) -> napi_status;
    /// Obtains the ArkTS singleton value corresponding to given C primitive boolean value.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - C primitive boolean value.
    ///
    /// * `result` - The ArkTS singleton value equivalent of C primitive boolean value.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_boolean(env: napi_env, value: bool, result: *mut napi_value) -> napi_status;
    /// Creates a default ArkTS object.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `result` - napi_value representing an ArkTS object.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_object(env: napi_env, result: *mut napi_value) -> napi_status;
    /// Creates an ArkTS array.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `result` - napi_value representing an ArkTS Array.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_array(env: napi_env, result: *mut napi_value) -> napi_status;
    /// Creates an ArkTS array of the specified length.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `length` - The length of the Array.
    ///
    /// * `result` - napi_value representing an ArkTS Array.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_array_with_length(
        env: napi_env,
        length: usize,
        result: *mut napi_value,
    ) -> napi_status;
    /// Creates an ArkTS number from C double data.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The double value to be represented in ArkTS.
    ///
    /// * `result` - A napi_value representing an ArkTS number.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_double(env: napi_env, value: f64, result: *mut napi_value) -> napi_status;
    /// Creates an ArkTS number from C int32_t data.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The int32 value to be represented in ArkTS.
    ///
    /// * `result` - A napi_value representing an ArkTS number.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_int32(env: napi_env, value: i32, result: *mut napi_value) -> napi_status;
    /// Creates an ArkTS number from C uint32_t data.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The uint32 value to be represented in ArkTS.
    ///
    /// * `result` - A napi_value representing an ArkTS number.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_uint32(env: napi_env, value: u32, result: *mut napi_value) -> napi_status;
    /// Creates an ArkTS number from C int64_t data.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The int64 value to be represented in ArkTS.
    ///
    /// * `result` - A napi_value representing an ArkTS number.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_int64(env: napi_env, value: i64, result: *mut napi_value) -> napi_status;
    /// Creates an ArkTS string from an ISO-8859-1-encoded C string.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `str` - C string encoded in ISO-8859-1-encoded format.
    ///
    /// * `length` - The length of the C string 'str'.
    ///
    /// * `result` - Result of the ArkTS string from the ISO-8859-1-encoded C string.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, str and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_string_latin1(
        env: napi_env,
        str_: *const ::core::ffi::c_char,
        length: usize,
        result: *mut napi_value,
    ) -> napi_status;
    /// Creates an ArkTS string from a UTF8-encoded C string.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `str` - C string encoded in UTF8 format.
    ///
    /// * `length` - The length of the C string 'str'.
    ///
    /// * `result` - Result of the ArkTS string from the UTF8-encoded C string.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, str and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_string_utf8(
        env: napi_env,
        str_: *const ::core::ffi::c_char,
        length: usize,
        result: *mut napi_value,
    ) -> napi_status;
    pub fn napi_create_string_utf16(
        env: napi_env,
        str_: *const char16_t,
        length: usize,
        result: *mut napi_value,
    ) -> napi_status;
    /// Creates an ArkTS symbol.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `description` - Optional napi_value representing an ArkTS string to describe the symbol.
    ///
    /// * `result` - A napi_value representing an ArkTS symbol.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) result is nullptr;
    ///
    /// If the param description is not nullptr and is not an ArkTS String.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_symbol(
        env: napi_env,
        description: napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    /// Create an ArkTS function. This is the primary mechanism to call back into native code from ArkTS.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `utf8name` - The visible within ArkTS as the new function's name property.
    ///
    /// * `length` - The length oh the utf8name, or NAPI_AUTO_LENGTH if it is null-terminated.
    ///
    /// * `cb` - The native function which should be called when this function object is called.
    ///
    /// * `data` - User-provided data context. This will be passed back into the function when invoked.
    ///
    /// * `result` - The newly created ArkTS function.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, cb and(or) result is nullptr.
    ///
    /// [`napi_pending_exception`] There is an uncaught exception occurred before(in) execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_function(
        env: napi_env,
        utf8name: *const ::core::ffi::c_char,
        length: usize,
        cb: napi_callback,
        data: *mut ::core::ffi::c_void,
        result: *mut napi_value,
    ) -> napi_status;
    /// Creates an ArkTS Error with text information.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `code` - Optional error code to set on the error.
    ///
    /// * `msg` - napi_value representing the EcmaScript string to be associated with the error.
    ///
    /// * `result` - napi_value representing the error created.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, msg or result is nullptr, code is not string and number type or msg is
    ///
    /// not a string type.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_error(
        env: napi_env,
        code: napi_value,
        msg: napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    /// Creates an ArkTS TypeError with text information.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `code` - Optional error code to set on the error.
    ///
    /// * `msg` - napi_value representing the EcmaScript string to be associated with the error.
    ///
    /// * `result` - napi_value representing the error created.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, msg or result is nullptr, code is not string and number type or msg is
    ///
    /// not a string type.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_type_error(
        env: napi_env,
        code: napi_value,
        msg: napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    /// Creates an ArkTS RangeError with text information.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `code` - Optional error code to set on the error.
    ///
    /// * `msg` - napi_value representing the EcmaScript string to be associated with the error.
    ///
    /// * `result` - napi_value representing the error created.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, msg or result is nullptr, code is not string and number type or msg is
    ///
    /// not a string type.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_range_error(
        env: napi_env,
        code: napi_value,
        msg: napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    /// Similar to typeof operation, support external value, detects null as a separate type.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The ArkTS value whose type expects to query.
    ///
    /// * `result` - The type of ArkTS value.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_typeof(
        env: napi_env,
        value: napi_value,
        result: *mut napi_valuetype,
    ) -> napi_status;
    /// Obtains the double value corresponding to the given ArkTS value.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - ArkTS number.
    ///
    /// * `result` - The C primitive equivalent of ArkTS value as double.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr.
    ///
    /// [`napi_number_expected`] If a non-number ArkTS value passed in it.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_value_double(env: napi_env, value: napi_value, result: *mut f64)
        -> napi_status;
    /// Obtains the int32_t value corresponding to the given ArkTS value.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - ArkTS number.
    ///
    /// * `result` - The C primitive equivalent of ArkTS value as int32_t.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr.
    ///
    /// [`napi_number_expected`] If a non-number ArkTS value passed in it.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_value_int32(env: napi_env, value: napi_value, result: *mut i32) -> napi_status;
    /// Obtains the uint32_t value corresponding to the given ArkTS value.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - ArkTS number.
    ///
    /// * `result` - The C primitive equivalent of ArkTS value as uint32_t.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr.
    ///
    /// [`napi_number_expected`] If a non-number ArkTS value passed in it.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_value_uint32(env: napi_env, value: napi_value, result: *mut u32)
        -> napi_status;
    /// Obtains the int64_t value corresponding to the given ArkTS value.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - ArkTS number.
    ///
    /// * `result` - The C primitive equivalent of ArkTS value as int64_t.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr.
    ///
    /// [`napi_number_expected`] If a non-number ArkTS value passed in it.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_value_int64(env: napi_env, value: napi_value, result: *mut i64) -> napi_status;
    /// Obtains the C Boolean equivalent of an ArkTS Boolean value.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - A napi_value representing ArkTS Boolean.
    ///
    /// * `result` - The C boolean equivalent of the ArkTS Boolean.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr.
    ///
    /// [`napi_boolean_expected`] If a non-boolean ArkTS value passed in it.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_value_bool(env: napi_env, value: napi_value, result: *mut bool) -> napi_status;
    /// Obtains the ISO-8859-1-encoded string corresponding to the given ArkTS value.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - ArkTS string.
    ///
    /// * `buf` - Destination buffer that will be filled with the provided ISO-8859-1-encoded string.
    ///
    /// * `bufsize` - The size of the buffer 'buf'.
    ///
    /// * `result` - The length of the string in ISO-8859-1-encoded format.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) value is nullptr;
    ///
    /// If the param buf and result both are nullptr.
    ///
    /// [`napi_string_expected`] If a non-string ArkTS value passed in it.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_value_string_latin1(
        env: napi_env,
        value: napi_value,
        buf: *mut ::core::ffi::c_char,
        bufsize: usize,
        result: *mut usize,
    ) -> napi_status;
    /// Obtains the UTF8-encoded string corresponding to the given ArkTS value.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - ArkTS string.
    ///
    /// * `buf` - Destination buffer that will be filled with the provided UTF8-encoded string.
    ///
    /// * `bufsize` - The size of the buffer 'buf'.
    ///
    /// * `result` - The length of the string in UTF8-encoded format.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) value is nullptr;
    ///
    /// If the param buf and result both are nullptr.
    ///
    /// [`napi_string_expected`] If a non-string ArkTS value passed in it.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_value_string_utf8(
        env: napi_env,
        value: napi_value,
        buf: *mut ::core::ffi::c_char,
        bufsize: usize,
        result: *mut usize,
    ) -> napi_status;
    pub fn napi_get_value_string_utf16(
        env: napi_env,
        value: napi_value,
        buf: *mut char16_t,
        bufsize: usize,
        result: *mut usize,
    ) -> napi_status;
    /// Coerce the given ArkTS value to an ArkTS boolean value.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The ArkTS value to coerce.
    ///
    /// * `result` - The coerced ArkTS boolean value.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_coerce_to_bool(
        env: napi_env,
        value: napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    /// Coerce the given ArkTS value to an ArkTS number value.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The ArkTS value to coerce.
    ///
    /// * `result` - The coerced ArkTS number value.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_coerce_to_number(
        env: napi_env,
        value: napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    /// Coerce the given ArkTS value to an ArkTS object value.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The ArkTS value to coerce.
    ///
    /// * `result` - The coerced ArkTS object value.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_coerce_to_object(
        env: napi_env,
        value: napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    /// Coerce the given ArkTS value to an ArkTS string value.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The ArkTS value to coerce.
    ///
    /// * `result` - The coerced ArkTS string value.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_coerce_to_string(
        env: napi_env,
        value: napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    /// Obtains the prototype of an ArkTS object.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The napi_value representing an ArkTS Object whose prototype to return.
    ///
    /// * `result` - A napi_value representing prototype of the object.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, object or result is nullptr;
    ///
    /// [`napi_pending_exception`] There is an uncaught exception occurred before(in) execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_prototype(
        env: napi_env,
        object: napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    /// Obtains the names of the enumerable properties of object as an Array of Strings. The keys that are symbols
    /// will not be included.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The ArkTS object from which the property is retrieved.
    ///
    /// * `result` - An ArkTS Array that contains the attribute names of the object.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr.
    ///
    /// [`napi_object_expected`] If the param object is not an ArkTS Object.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_property_names(
        env: napi_env,
        object: napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    /// Set a property on the given ArkTS Object.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The ArkTS object.
    ///
    /// * `key` - The name of the property to set.
    ///
    /// * `value` - The property value.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, object, key and(or) value is nullptr.
    ///
    /// [`napi_object_expected`] If the param object is not an ArkTS Object.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_set_property(
        env: napi_env,
        object: napi_value,
        key: napi_value,
        value: napi_value,
    ) -> napi_status;
    /// Check if the given ArkTS Object has the named property or not.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The ArkTS object.
    ///
    /// * `key` - The name of the property to check.
    ///
    /// * `result` - Whether the property exists on the object or not.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, object, key and(or) result is nullptr.
    ///
    /// [`napi_object_expected`] If the param object is not an ArkTS Object.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_has_property(
        env: napi_env,
        object: napi_value,
        key: napi_value,
        result: *mut bool,
    ) -> napi_status;
    /// Get the requests property of the given ArkTS Object.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The ArkTS object.
    ///
    /// * `key` - The name of the property to get.
    ///
    /// * `result` - The value of the property.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, object, key and(or) result is nullptr.
    ///
    /// [`napi_object_expected`] If the param object is not an ArkTS Object.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_property(
        env: napi_env,
        object: napi_value,
        key: napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    /// Delete the named property of the given ArkTS Object.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The ArkTS object.
    ///
    /// * `key` - The name of the property to delete.
    ///
    /// * `result` - Whether the execution is succeed or not. Can optionally be ignored by passing nullptr.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, object and(or) key is nullptr.
    ///
    /// [`napi_object_expected`] If the param object is not an ArkTS Object.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_delete_property(
        env: napi_env,
        object: napi_value,
        key: napi_value,
        result: *mut bool,
    ) -> napi_status;
    /// Check if the given ArkTS Object has the named own property or not.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The ArkTS object.
    ///
    /// * `key` - The name of the property to check.
    ///
    /// * `result` - Whether the own property exists on the object or not.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, object, key and(or) result is nullptr.
    ///
    /// [`napi_object_expected`] If the param object is not an ArkTS Object.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurs in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_has_own_property(
        env: napi_env,
        object: napi_value,
        key: napi_value,
        result: *mut bool,
    ) -> napi_status;
    /// Set a property on the given ArkTS Object.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The ArkTS object.
    ///
    /// * `utf8name` - The name of the property to set.
    ///
    /// * `value` - The property value.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, object, utf8name and(or) value is nullptr.
    ///
    /// [`napi_object_expected`] If the param object is not an ArkTS Object.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_set_named_property(
        env: napi_env,
        object: napi_value,
        utf8name: *const ::core::ffi::c_char,
        value: napi_value,
    ) -> napi_status;
    /// Check if the given ArkTS Object has the named property or not.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The ArkTS object.
    ///
    /// * `utf8name` - The name of the property to check.
    ///
    /// * `result` - Whether the property exists on the object or not.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, object, utf8name and(or) result is nullptr.
    ///
    /// [`napi_object_expected`] If the param object is not an ArkTS Object.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_has_named_property(
        env: napi_env,
        object: napi_value,
        utf8name: *const ::core::ffi::c_char,
        result: *mut bool,
    ) -> napi_status;
    /// Get the requests property of the given ArkTS Object.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The ArkTS object.
    ///
    /// * `utf8name` - The name of the property to get.
    ///
    /// * `result` - The value of the property.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, object, utf8name and(or) result is nullptr.
    ///
    /// [`napi_object_expected`] If the param object is not an ArkTS Object.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_named_property(
        env: napi_env,
        object: napi_value,
        utf8name: *const ::core::ffi::c_char,
        result: *mut napi_value,
    ) -> napi_status;
    /// Set a element on the given ArkTS Array.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The ArkTS Array.
    ///
    /// * `index` - The index of the element to set.
    ///
    /// * `value` - The element value.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, object and(or) value is nullptr.
    ///
    /// [`napi_object_expected`] If the param object is not an ArkTS Object.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_set_element(
        env: napi_env,
        object: napi_value,
        index: u32,
        value: napi_value,
    ) -> napi_status;
    /// Check if the given ArkTS Array has an element at the requested index.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The ArkTS Array.
    ///
    /// * `index` - The name of the property to check.
    ///
    /// * `result` - Whether the property exists on the Array or not.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, object and(or) result is nullptr.
    ///
    /// [`napi_object_expected`] If the param object is not an ArkTS Object.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_has_element(
        env: napi_env,
        object: napi_value,
        index: u32,
        result: *mut bool,
    ) -> napi_status;
    /// Get the requests element of the given ArkTS Array.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The ArkTS Array.
    ///
    /// * `index` - The index of the element to get.
    ///
    /// * `result` - The value of the element.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, object and(or) result is nullptr.
    ///
    /// [`napi_object_expected`] If the param object is not an ArkTS Object.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_element(
        env: napi_env,
        object: napi_value,
        index: u32,
        result: *mut napi_value,
    ) -> napi_status;
    /// Delete the special index from the given ArkTS Array.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The ArkTS Array.
    ///
    /// * `index` - The index of the element to delete.
    ///
    /// * `result` - Whether the execution is succeed or not. Can optionally be ignored by passing nullptr.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, object and(or) key is nullptr.
    ///
    /// [`napi_object_expected`] If the param object is not an ArkTS Object.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_delete_element(
        env: napi_env,
        object: napi_value,
        index: u32,
        result: *mut bool,
    ) -> napi_status;
    /// Efficient define multiple properties on the given ArkTS Object by napi_property_descriptor.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The ArkTS Object.
    ///
    /// * `property_count` - The count of elements in the properties array.
    ///
    /// * `properties` - The properties array.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, object and(or) properties is nullptr.
    ///
    /// [`napi_object_expected`] If the param object is not an ArkTS Object.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_define_properties(
        env: napi_env,
        object: napi_value,
        property_count: usize,
        properties: *const napi_property_descriptor,
    ) -> napi_status;
    /// Checks if the ArkTS value is an ArkTS Array.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The ArkTS value to check.
    ///
    /// * `result` - Whether the given ArkTS value is an ArkTS Array.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_is_array(env: napi_env, value: napi_value, result: *mut bool) -> napi_status;
    /// Obtains the array length.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The napi_value representing the ArkTS Array being queried.
    ///
    /// * `result` - The length of the array.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr;
    ///
    /// [`napi_pending_exception`] There is an uncaught exception occurred before(in) execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_array_length(env: napi_env, value: napi_value, result: *mut u32)
        -> napi_status;
    /// Checks if the two ArkTS values are equal.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `lhs` - The ArkTS value to check.
    ///
    /// * `rhs` - The ArkTS value to check against.
    ///
    /// * `result` - Whether the two given ArkTS values are equal.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_strict_equals(
        env: napi_env,
        lhs: napi_value,
        rhs: napi_value,
        result: *mut bool,
    ) -> napi_status;
    /// Invoke an ArkTS function. This is the primary mechanism to call back into JavaScript.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `recv` - The this value passed to the called function
    ///
    /// * `func` - The ArkTS function to be invoked.
    ///
    /// * `argc` - The count of elements in the argv array.
    ///
    /// * `argv` - ArkTS values passed in as arguments to the function.
    ///
    /// * `result` - Whether the provided 'type_tag' is matched with the tag on the ArkTS object 'value'.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) func is nullptr. If argv is nullptr but argc greater
    ///
    /// than 0.
    ///
    /// [`napi_function_expected`] If the param func is not an ArkTS Function.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_call_function(
        env: napi_env,
        recv: napi_value,
        func: napi_value,
        argc: usize,
        argv: *const napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    /// Instantiate a new ArkTS value using a given napi_value that represents the constructor for the object.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `constructor` - The ArkTS function to be invoked as a constructor.
    ///
    /// * `argc` - The count of elements in the argv array.
    ///
    /// * `argv` - Array of ArkTS values representing the arguments to the constructor. If argc is 0 this parameter may
    /// be omitted by passing in nullptr.
    ///
    /// * `result` - The ArkTS object returned, which in this case is the constructed object.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) func is nullptr. If argv is nullptr but argc greater
    ///
    /// than 0.
    ///
    /// [`napi_function_expected`] If the param func is not an ArkTS Function.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_new_instance(
        env: napi_env,
        constructor: napi_value,
        argc: usize,
        argv: *const napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    /// Invoke instanceof operation on the object.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The ArkTS object to check.
    ///
    /// * `constructor` - The ArkTS constructor function to check against.
    ///
    /// * `result` - Set to true if the given ArkTS object instanceof constructor.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, object, constructor and(or) result is nullptr.
    ///
    /// [`napi_object_expected`] If the param object is not an ArkTS object value.
    ///
    /// [`napi_function_expected`] If the param constructor is not an ArkTS function value.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_instanceof(
        env: napi_env,
        object: napi_value,
        constructor: napi_value,
        result: *mut bool,
    ) -> napi_status;
    /// Obtains callback details about the call like arguments, this from given callback info.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `cbinfo` - The callback info.
    ///
    /// * `argc` - Size of the argv array.
    ///
    /// * `argv` - The Array which arguments will be copied to. If there are more arguments than the provided count, only
    /// the requested number of arguments are copied. If there are fewer arguments provided, the rest argv is
    /// filled with undefined. Can optionally be ignored by passing nullptr.
    ///
    /// * `this_arg` - Receives the ArkTS this argument for the call. Can optionally be ignored by passing nullptr.
    ///
    /// * `data` - Receives the data pointer for the callback. Can optionally be ignored by passing nullptr.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) cbinfo is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_cb_info(
        env: napi_env,
        cbinfo: napi_callback_info,
        argc: *mut usize,
        argv: *mut napi_value,
        this_arg: *mut napi_value,
        data: *mut *mut ::core::ffi::c_void,
    ) -> napi_status;
    /// Obtains callback details about the call like arguments, this from given callback info.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `cbinfo` - The callback info.
    ///
    /// * `result` - The new.target of the constructor call.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, cbinfo and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_new_target(
        env: napi_env,
        cbinfo: napi_callback_info,
        result: *mut napi_value,
    ) -> napi_status;
    /// Defines an ArkTS class, including constructor function and properties.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `utf8name` - Name of the ArkTS constructor function.
    ///
    /// * `length` - The length of the utf8name in bytes, or NAPI_AUTO_LENGTH if it is null-terminated.
    ///
    /// * `constructor` - Callback function that handles constructing instances of the class.
    ///
    /// * `data` - Optional data to be passed to the constructor callback as the data property of the callback info.
    ///
    /// * `property_count` - Number of items in the properties array argument.
    ///
    /// * `properties` - Array of property descriptors.
    ///
    /// * `result` - A napi_value representing the constructor function for the class.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    /// execution.
    ///
    /// [`napi_invalid_arg`] If the param env, utf8name and(or) result is nullptr. If napi_property_descriptor
    /// is nullptr but property_count greater than 0.
    ///
    /// [`napi_function_expected`] If the param func is not an ArkTS Function.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurs in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_define_class(
        env: napi_env,
        utf8name: *const ::core::ffi::c_char,
        length: usize,
        constructor: napi_callback,
        data: *mut ::core::ffi::c_void,
        property_count: usize,
        properties: *const napi_property_descriptor,
        result: *mut napi_value,
    ) -> napi_status;
    /// Wraps a native instance in a ArkTS object. The native instance can be retrieved later using napi_unwrap.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `js_object` - The ArkTS object that will be the wrapper for the native object.
    ///
    /// * `native_object` - The native instance that will be wrapped in the ArkTS object.
    ///
    /// * `finalize_cb` - Native callback that can be used to free the native instance when the JavaScript object has
    /// been garbage-collected.
    ///
    /// * `finalize_hint` - Optional contextual hint that is passed to the finalize callback.
    ///
    /// * `result` - Optional reference to the wrapped object.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, js_object, native_object and(or) finalize_cb is nullptr.
    ///
    /// [`napi_object_expected`] If the param js_object is not an ArkTS Object.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_wrap(
        env: napi_env,
        js_object: napi_value,
        native_object: *mut ::core::ffi::c_void,
        finalize_cb: napi_finalize,
        finalize_hint: *mut ::core::ffi::c_void,
        result: *mut napi_ref,
    ) -> napi_status;
    /// Retrieves a native instance that was previously wrapped in an ArkTS object using napi_wrap.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `js_object` - The ArkTS object.
    ///
    /// * `result` - Pointer to the wrapped native instance.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, js_object and(or) result is nullptr.
    ///
    /// [`napi_object_expected`] If the param js_object is not an ArkTS Object.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_unwrap(
        env: napi_env,
        js_object: napi_value,
        result: *mut *mut ::core::ffi::c_void,
    ) -> napi_status;
    /// Retrieves a native instance that was previously wrapped in the ArkTS object js_object using napi_wrap
    /// and removes the wrapping.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `js_object` - The ArkTS object.
    ///
    /// * `result` - Pointer to the wrapped native instance.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, js_object and(or) result is nullptr.
    ///
    /// [`napi_object_expected`] If the param js_object is not an ArkTS Object.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurred in execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_remove_wrap(
        env: napi_env,
        js_object: napi_value,
        result: *mut *mut ::core::ffi::c_void,
    ) -> napi_status;
    /// Allocates a JS value with external data.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `data` - Allocates a JS value that references external data.
    ///
    /// * `finalize_cb` - Optional callback to call when the external value is being collected.
    ///
    /// * `finalize_hint` - Optional hint that can be passed to the finalize callback function during the garbage
    /// collection process.
    ///
    /// * `result` - A napi_value representing an external value.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env or result is nullptr.
    ///
    /// [`napi_pending_exception`] There is an uncaught exception occurred before(in) execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_external(
        env: napi_env,
        data: *mut ::core::ffi::c_void,
        finalize_cb: napi_finalize,
        finalize_hint: *mut ::core::ffi::c_void,
        result: *mut napi_value,
    ) -> napi_status;
    /// Obtains the external data pointer previously passed through napi_create_external().
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - JavaScript external value.
    ///
    /// * `result` - The data wrapped by the JavaScript external value.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value or result is nullptr;
    ///
    /// [`napi_pending_exception`] There is an uncaught exception occurred before(in) execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_value_external(
        env: napi_env,
        value: napi_value,
        result: *mut *mut ::core::ffi::c_void,
    ) -> napi_status;
    /// Creates a reference for an object to extend its lifespan. The caller needs to manage the reference lifespan.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The napi_value that is being referenced.
    ///
    /// * `initial_refcount` - The initial count for the new reference.
    ///
    /// * `result` - napi_ref pointing to the new reference.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, value or result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_reference(
        env: napi_env,
        value: napi_value,
        initial_refcount: u32,
        result: *mut napi_ref,
    ) -> napi_status;
    /// Deletes the reference passed in.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `ref` - The napi_ref to be deleted.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or ref is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_delete_reference(env: napi_env, ref_: napi_ref) -> napi_status;
    /// Increments the reference count for the reference passed in and returns the count.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `ref` - The napi_ref whose reference count will be incremented.
    ///
    /// * `result` - The new reference count.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or ref is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_reference_ref(env: napi_env, ref_: napi_ref, result: *mut u32) -> napi_status;
    /// Decrements the reference count for the reference passed in and returns the count.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `ref` - The napi_ref whose reference count will be decremented.
    ///
    /// * `result` - The new reference count.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or ref is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_reference_unref(env: napi_env, ref_: napi_ref, result: *mut u32) -> napi_status;
    /// Obtains the ArkTS Object associated with the reference.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `ref` - The napi_ref of the value being requested.
    ///
    /// * `result` - The napi_value referenced by the napi_ref.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, ref or result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_reference_value(
        env: napi_env,
        ref_: napi_ref,
        result: *mut napi_value,
    ) -> napi_status;
    /// Opens a scope.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `result` - napi_value representing the new scope.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_open_handle_scope(env: napi_env, result: *mut napi_handle_scope) -> napi_status;
    /// Closes the scope passed in. After the scope is closed, all references declared in it are closed.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `scope` - The scope to close.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or scope is nullptr.
    ///
    /// [`napi_handle_scope_mismatch`] If there is no scope still existed.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_close_handle_scope(env: napi_env, scope: napi_handle_scope) -> napi_status;
    /// Opens an escapable handle scope from which the declared values can be returned to the outer scope.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `result` - The new scope.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_open_escapable_handle_scope(
        env: napi_env,
        result: *mut napi_escapable_handle_scope,
    ) -> napi_status;
    /// Closes the escapable handle scope passed in.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `scope` - The scope to close.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or scope is nullptr.
    ///
    /// [`napi_handle_scope_mismatch`] If there is no scope still existed.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_close_escapable_handle_scope(
        env: napi_env,
        scope: napi_escapable_handle_scope,
    ) -> napi_status;
    /// Promotes the handle to the input ArkTS object so that it is valid for the lifespan of its outer scope.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `scope` - Current scope.
    ///
    /// * `escapee` - The ArkTS object to be escaped.
    ///
    /// * `result` - The handle to the escaped object in the outer scope.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, scope, escapee or result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_escape_handle(
        env: napi_env,
        scope: napi_escapable_handle_scope,
        escapee: napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    /// Throws an ArkTS error.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `error` - The ArkTS error to be thrown.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or error is nullptr, or error is not an error object.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_throw(env: napi_env, error: napi_value) -> napi_status;
    /// Throws an ArkTS Error with text information.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `code` - Optional error code to set on the error.
    ///
    /// * `msg` - C string representing the text to be associated with the error.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or msg is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_throw_error(
        env: napi_env,
        code: *const ::core::ffi::c_char,
        msg: *const ::core::ffi::c_char,
    ) -> napi_status;
    /// Throws an ArkTS TypeError with text information.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `code` - Optional error code to set on the error.
    ///
    /// * `msg` - C string representing the text to be associated with the error.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or msg is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_throw_type_error(
        env: napi_env,
        code: *const ::core::ffi::c_char,
        msg: *const ::core::ffi::c_char,
    ) -> napi_status;
    /// Throws an ArkTS RangeError with text information.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `code` - Optional error code to set on the error.
    ///
    /// * `msg` - C string representing the text to be associated with the error.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or msg is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_throw_range_error(
        env: napi_env,
        code: *const ::core::ffi::c_char,
        msg: *const ::core::ffi::c_char,
    ) -> napi_status;
    /// Checks whether a 'napi_value' is an error object.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The value to check
    ///
    /// * `result` - Boolean value that is set to true if the value represents an error object, false otherwise.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, value or result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_is_error(env: napi_env, value: napi_value, result: *mut bool) -> napi_status;
    /// Checks whether an exception occurs.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `result` - Boolean value that is true if there is a pending exception.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_is_exception_pending(env: napi_env, result: *mut bool) -> napi_status;
    /// Obtains and clears the latest exception.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `result` - The exception if there is a pending exception; otherwise return a null value.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_and_clear_last_exception(env: napi_env, result: *mut napi_value)
        -> napi_status;
    /// Checks if the ArkTS value is an ArkTS ArrayBuffer.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The ArkTS value to check.
    ///
    /// * `result` - Whether the given ArkTS value is an ArkTS ArrayBuffer.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_is_arraybuffer(env: napi_env, value: napi_value, result: *mut bool) -> napi_status;
    /// Creates an ArkTS ArrayBuffer of the specified size.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `byte_length` - The length in bytes of the array buffer.
    ///
    /// * `data` - The byte buffer of the ArrayBuffer.
    ///
    /// * `result` - A napi_value representing an ArkTS ArrayBuffer.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, data and(or) result is nullptr.
    ///
    /// [`napi_pending_exception`] There is an uncaught exception occurred before(in) execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_arraybuffer(
        env: napi_env,
        byte_length: usize,
        data: *mut *mut ::core::ffi::c_void,
        result: *mut napi_value,
    ) -> napi_status;
    /// The underlying data that ArrayBuffer point to.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `external_data` - Allocates an ArkTS value that references external data.
    ///
    /// * `byte_length` - The length in bytes of the underlying buffer.
    ///
    /// * `finalize_cb` - Optional callback to call when the ArrayBuffer is being collected.
    ///
    /// * `finalize_hint` - Optional hint that can be passed to the finalize callback function during the garbage
    /// collection process.
    ///
    /// * `result` - A napi_value representing an ArkTS ArrayBuffer.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, external_data, finalize_cb and(or) result is nullptr.
    ///
    /// [`napi_pending_exception`] There is an uncaught exception occurred before(in) execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_external_arraybuffer(
        env: napi_env,
        external_data: *mut ::core::ffi::c_void,
        byte_length: usize,
        finalize_cb: napi_finalize,
        finalize_hint: *mut ::core::ffi::c_void,
        result: *mut napi_value,
    ) -> napi_status;
    /// Obtains the underlying data buffer of ArrayBuffer and its length.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `arraybuffer` - The napi_value representing the ArrayBuffer being queried.
    ///
    /// * `data` - The underlying data buffer of the ArrayBuffer.
    ///
    /// * `byte_length` - Length in bytes of the underlying data buffer.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, arraybuffer and(or) byte_length is nullptr.
    ///
    /// [`napi_arraybuffer_expected`] If the param is neither ArkTS TypedArray nor SendableArrayBuffer.
    ///
    /// [`napi_pending_exception`] There is an uncaught exception occurred before(in) execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_arraybuffer_info(
        env: napi_env,
        arraybuffer: napi_value,
        data: *mut *mut ::core::ffi::c_void,
        byte_length: *mut usize,
    ) -> napi_status;
    /// Checks if the ArkTS value is an ArkTS TypedArray.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The ArkTS value to check.
    ///
    /// * `result` - Whether the given ArkTS value is an ArkTS TypedArray.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_is_typedarray(env: napi_env, value: napi_value, result: *mut bool) -> napi_status;
    /// Creates an ArkTS TypeArray from an existing ArrayBuffer.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `type` - The element datatype of the TypedArray.
    ///
    /// * `length` - Number of elements in the TypedArray.
    ///
    /// * `arraybuffer` - The underlying ArrayBuffer that supports the TypedArray.
    ///
    /// * `byte_offset` - The byte offset within the ArrayBuffer from which to start projecting the TypedArray.
    ///
    /// * `result` - A napi_value representing an ArkTS TypedArray.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, arraybuffer and(or) result is nullptr;
    ///
    /// If param type is not a valid napi_typedarray_type.
    ///
    /// [`napi_arraybuffer_expected`] If a non-arraybuffer ArkTS value passed in it.
    ///
    /// [`napi_pending_exception`] There is an uncaught exception occurred before(in) execution.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_typedarray(
        env: napi_env,
        type_: napi_typedarray_type,
        length: usize,
        arraybuffer: napi_value,
        byte_offset: usize,
        result: *mut napi_value,
    ) -> napi_status;
    /// Obtains properties of a TypedArray.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `typedarray` - The napi_value for the TypedArray whose properties are being checked.
    ///
    /// * `type` - The datatype of elements in the TypedArray.
    ///
    /// * `length` - The number of elements in the TypedArray.
    ///
    /// * `data` - The data buffer underlying the TypedArray adjusted by the byte_offset.
    ///
    /// * `arraybuffer` - The ArrayBuffer underlying the TypedArray.
    ///
    /// * `byte_offset` - The byte offset within the underlying arraybuffer
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) typedarray is nullptr;
    ///
    /// If the param typedarray is neither ArkTS TypedArray nor SendableTypedArray.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_typedarray_info(
        env: napi_env,
        typedarray: napi_value,
        type_: *mut napi_typedarray_type,
        length: *mut usize,
        data: *mut *mut ::core::ffi::c_void,
        arraybuffer: *mut napi_value,
        byte_offset: *mut usize,
    ) -> napi_status;
    /// Creates an ArkTS DataView from an existing ArrayBuffer.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `length` - Number of elements in the DataView.
    ///
    /// * `arraybuffer` - The underlying ArrayBuffer that supports the DataView.
    ///
    /// * `byte_offset` - The byte offset within the ArrayBuffer from which to start projecting the DataView.
    ///
    /// * `result` - A napi_value representing an ArkTS DataView.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, arraybuffer and(or) result is nullptr.
    ///
    /// [`napi_arraybuffer_expected`] If a non-arraybuffer ArkTS value passed in it.
    ///
    /// [`napi_pending_exception`] There is an uncaught exception occurred before(in) execution.
    ///
    /// If the sum of byte_length and length is greater than the byte length of
    ///
    /// the arraybuffer.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_dataview(
        env: napi_env,
        length: usize,
        arraybuffer: napi_value,
        byte_offset: usize,
        result: *mut napi_value,
    ) -> napi_status;
    /// Checks if the ArkTS value is an ArkTS DataView.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The ArkTS value to check.
    ///
    /// * `result` - Whether the given ArkTS value is an ArkTS DataView.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value and(or) result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_is_dataview(env: napi_env, value: napi_value, result: *mut bool) -> napi_status;
    /// Obtains properties of a DataView.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `dataview` - The napi_value for the DataView whose properties are being checked.
    ///
    /// * `bytelength` - The number of elements in the DataView.
    ///
    /// * `data` - The data buffer underlying the DataView.
    ///
    /// * `arraybuffer` - The ArrayBuffer underlying the DataView.
    ///
    /// * `byte_offset` - The byte offset within the underlying arraybuffer
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) dataview is nullptr;
    ///
    /// If non-dataview ArkTS value passed in.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_dataview_info(
        env: napi_env,
        dataview: napi_value,
        bytelength: *mut usize,
        data: *mut *mut ::core::ffi::c_void,
        arraybuffer: *mut napi_value,
        byte_offset: *mut usize,
    ) -> napi_status;
    pub fn napi_get_version(env: napi_env, result: *mut u32) -> napi_status;
    /// Creates a deferred object and an ArkTS promise.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `deferred` - The created deferred object which will be passed to 'napi_resolve_deferred()' or
    /// 'napi_reject_deferred()' to resolve or reject the promise.
    ///
    /// * `promise` - The ArkTS promise which is associated with the deferred object.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, deferred or resolution is nullptr.
    ///
    /// [`napi_pending_exception`] If an ArkTS exception existed when the function was called.
    ///
    /// [`napi_generic_failure`] If create promise failed.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_promise(
        env: napi_env,
        deferred: *mut napi_deferred,
        promise: *mut napi_value,
    ) -> napi_status;
    /// Resolves a promise by way of the deferred object associated.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `deferred` - The deferred object which is utilized to resolve the promise.
    ///
    /// * `resolution` - The resolution value used to resolve the promise.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, deferred or resolution is nullptr.
    ///
    /// [`napi_pending_exception`] If an ArkTS exception existed when the function was called.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_resolve_deferred(
        env: napi_env,
        deferred: napi_deferred,
        resolution: napi_value,
    ) -> napi_status;
    /// Rejects a promise by way of the deferred object associated.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `deferred` - The deferred object which is utilized to reject the promise.
    ///
    /// * `rejection` - The rejection value used to reject the promise.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, deferred or rejection is nullptr.
    ///
    /// [`napi_pending_exception`] If an ArkTS exception existed when the function was called.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_reject_deferred(
        env: napi_env,
        deferred: napi_deferred,
        rejection: napi_value,
    ) -> napi_status;
    /// Checks whether the given 'napi_value' is a promise object.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The 'napi_value' to be checked.
    ///
    /// * `is_promise` - Boolean value that is set to true if the 'value' is a promise object, false otherwise.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, value or is_promise is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_is_promise(env: napi_env, value: napi_value, is_promise: *mut bool) -> napi_status;
    pub fn napi_run_script(
        env: napi_env,
        script: napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    pub fn napi_adjust_external_memory(
        env: napi_env,
        change_in_bytes: i64,
        adjusted_value: *mut i64,
    ) -> napi_status;
    /// Creates an ArkTS 'Date' object from C double data
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `time` - ArkTS time value in milliseconds format since 01 January, 1970 UTC.
    ///
    /// * `result` - Created ArkTS data object.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or result is nullptr.
    ///
    /// [`napi_pending_exception`] If an ArkTS exception existed when the function was called.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_date(env: napi_env, time: f64, result: *mut napi_value) -> napi_status;
    /// Checks whether the given ArkTS value is a 'Date' object. You can use this API to check the type
    /// of the parameter passed from ArkTS.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - ArkTS data object.
    ///
    /// * `is_date` - Boolean value that is set to true if the 'value' is a 'Date' object, false otherwise.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, value or is_date is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_is_date(env: napi_env, value: napi_value, is_date: *mut bool) -> napi_status;
    /// Obtains the C equivalent of the given ArkTS 'Date' object.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - ArkTS data object.
    ///
    /// * `result` - C time value in milliseconds format since 01 January, 1970 UTC.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, value or result is nullptr.
    ///
    /// [`napi_pending_exception`] If an ArkTS exception existed when the function was called.
    ///
    /// [`napi_date_expected`] If the 'value' is not a 'Date' object.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_date_value(env: napi_env, value: napi_value, result: *mut f64) -> napi_status;
    /// Adds a 'napi_finalize' callback, which will be called when the ArkTS object is garbage-collected.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `js_object` - The ArkTS object value.
    ///
    /// * `native_object` - Native object to bind with the ArkTS object.
    ///
    /// * `finalize_cb` - Native callback that can be used to free the native object
    /// when the ArkTS object is garbage-collected.
    ///
    /// * `finalize_hint` - Optional contextual hint that is passed to the finalize callback.
    ///
    /// * `result` - Optional reference of the ArkTS object.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn napi_add_finalizer(
        env: napi_env,
        js_object: napi_value,
        native_object: *mut ::core::ffi::c_void,
        finalize_cb: napi_finalize,
        finalize_hint: *mut ::core::ffi::c_void,
        result: *mut napi_ref,
    ) -> napi_status;
    /// Creates an ArkTS BigInt from C int64 data.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - C int64 data.
    ///
    /// * `result` - Created ArkTS BigInt object from C int64 data.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_bigint_int64(
        env: napi_env,
        value: i64,
        result: *mut napi_value,
    ) -> napi_status;
    /// Creates an ArkTS BigInt from C int64 data.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - C int64 data.
    ///
    /// * `result` - Created ArkTS BigInt object from C int64 data.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_bigint_uint64(
        env: napi_env,
        value: u64,
        result: *mut napi_value,
    ) -> napi_status;
    /// Creates a single ArkTS BigInt from a C uint64 array.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `sign_bit` - Sign bit of the BigInt. If sign_bit is 0, the BigInt is positive, otherwise it is negative.
    ///
    /// * `word_count` - The size of the words array.
    ///
    /// * `words` - C uint64 array in little-endian 64-bit format.
    ///
    /// * `result` - Created ArkTS BigInt object from C int64 array.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, words or result is nullptr or word_count is larger than 2147483647.
    ///
    /// [`napi_pending_exception`] If an ArkTS exception existed when the function was called.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_bigint_words(
        env: napi_env,
        sign_bit: ::core::ffi::c_int,
        word_count: usize,
        words: *const u64,
        result: *mut napi_value,
    ) -> napi_status;
    /// Obtains a signed 64-bit integer from an ArkTS BigInt object.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - ArkTS BigInt object.
    ///
    /// * `result` - Pointer points to the location where store the C signed 64-bit integer value.
    ///
    /// * `lossless` - Indicates whether the conversion is lossless. If lossless is true, the conversion is lossless,
    /// false otherwise.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, value, result or lossless is nullptr or word_count is larger than
    ///
    /// 2147483647.
    ///
    /// [`napi_bigint_expected`] If the 'value' is not an ArkTS bigint object.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_value_bigint_int64(
        env: napi_env,
        value: napi_value,
        result: *mut i64,
        lossless: *mut bool,
    ) -> napi_status;
    /// Obtains an unsigned 64-bit integer from an ArkTS BigInt object.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - ArkTS BigInt object.
    ///
    /// * `result` - Pointer points to the location where store the C unsigned 64-bit integer value.
    ///
    /// * `lossless` - Indicates whether the conversion is lossless. If lossless is true, the conversion is lossless,
    /// false otherwise.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, value, result or lossless is nullptr or word_count is larger than
    ///
    /// 2147483647.
    ///
    /// [`napi_bigint_expected`] If the 'value' is not an ArkTS bigint object.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_value_bigint_uint64(
        env: napi_env,
        value: napi_value,
        result: *mut u64,
        lossless: *mut bool,
    ) -> napi_status;
    /// Obtains the underlying 64-bit unsigned (uint64) byte data from an ArkTS BigInt object.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - ArkTS BigInt object.
    ///
    /// * `sign_bit` - Sign bit of the BigInt. If sign_bit is 0, the BigInt is positive, otherwise it is negative.
    ///
    /// * `word_count` - The size of the words array.
    ///
    /// * `words` - C uint64 array in little-endian 64-bit format.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, value or word_count is nullptr or word_count is larger than 2147483647.
    ///
    /// [`napi_bigint_expected`] If the 'value' is not an ArkTS bigint object.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_value_bigint_words(
        env: napi_env,
        value: napi_value,
        sign_bit: *mut ::core::ffi::c_int,
        word_count: *mut usize,
        words: *mut u64,
    ) -> napi_status;
    /// Obtains the names of all properties of an ArkTS object.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - ArkTS object.
    ///
    /// * `key_mode` - Key collection mode. If key_mode is napi_key_include_prototypes, the result includes properties on
    /// prototypes. If key_mode is napi_key_own_only, the result includes only properties directly on own
    /// object.
    ///
    /// * `key_filter` - Which properties to be collected.
    ///
    /// * `key_conversion` - Key conversion mode. If key_conversion is napi_key_keep_numbers, the numbered property keys
    /// will keep number type. If key_conversion is napi_key_numbers_to_strings, the numbered property
    /// keys will be convert to string type.
    ///
    /// * `result` - An array of ArkTS object that represent the property names of the object.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, object or result is nullptr;
    ///
    /// key_mode is not enumeration value of napi_key_collection_mode;
    ///
    /// key_conversion is not enumeration value of napi_key_conversion.
    ///
    /// [`napi_pending_exception`] If an ArkTS exception existed when the function was called.
    ///
    /// [`napi_object_expected`] If object is not object type and function type.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_all_property_names(
        env: napi_env,
        object: napi_value,
        key_mode: napi_key_collection_mode,
        key_filter: napi_key_filter,
        key_conversion: napi_key_conversion,
        result: *mut napi_value,
    ) -> napi_status;
    /// Associates data with the currently running environment.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `data` - Data item to bind with the 'env'.
    ///
    /// * `finalize_cb` - Optional native callback that will be triggered when 'env' is destroyed or this interface
    /// repeatedly calls.
    ///
    /// * `finalize_hint` - Optional contextual hint that is passed to the finalize callback.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn napi_set_instance_data(
        env: napi_env,
        data: *mut ::core::ffi::c_void,
        finalize_cb: napi_finalize,
        finalize_hint: *mut ::core::ffi::c_void,
    ) -> napi_status;
    /// Retrieves the data that was previously associated with the currently running environment.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `data` - Data item is bound with the 'env'.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn napi_get_instance_data(
        env: napi_env,
        data: *mut *mut ::core::ffi::c_void,
    ) -> napi_status;
    /// Detaches the underlying data from an 'ArrayBuffer' object. After the data is detached, you
    /// can operate the data in C/C++.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `arraybuffer` - ArkTS ArrayBuffer object.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or arraybuffer is nullptr, if 'arraybuffer' is not an ArrayBuffer object.
    ///
    /// [`napi_object_expected`] If the 'arraybuffer' is not an ArkTS object.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_detach_arraybuffer(env: napi_env, arraybuffer: napi_value) -> napi_status;
    /// Checks whether the given 'ArrayBuffer' has been detached.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - ArkTS ArrayBuffer object.
    ///
    /// * `result` - Boolean value that is set to true if the 'value' has been detached, false otherwise.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, value or result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_is_detached_arraybuffer(
        env: napi_env,
        value: napi_value,
        result: *mut bool,
    ) -> napi_status;
    pub fn napi_type_tag_object(
        env: napi_env,
        value: napi_value,
        type_tag: *const napi_type_tag,
    ) -> napi_status;
    pub fn napi_check_object_type_tag(
        env: napi_env,
        value: napi_value,
        type_tag: *const napi_type_tag,
        result: *mut bool,
    ) -> napi_status;
    /// Freezes an ArkTS object. Once an object is frozen, its properties are immutable.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The given ArkTS object.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or object is nullptr.
    ///
    /// [`napi_pending_exception`] If an ArkTS exception existed when the function was called.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_object_freeze(env: napi_env, object: napi_value) -> napi_status;
    /// Seals an ArkTS object. Once an object is sealed, its properties cannot be added or deleted, but property
    /// values can be modified.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The given ArkTS object.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or object is nullptr.
    ///
    /// [`napi_pending_exception`] If an ArkTS exception existed when the function was called.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_object_seal(env: napi_env, object: napi_value) -> napi_status;
    /// Registers a native module.
    ///
    /// # Arguments
    ///
    /// * `mod` - Native module of type 'napi_module' to be registered.
    ///
    /// Available since API-level: 10
    pub fn napi_module_register(mod_: *mut napi_module);
    /// Raises a fatal error to terminate the process immediately.
    /// # Arguments
    ///
    /// * `location` - Optional location for the error occurrence.
    ///
    /// * `location_len` - The byte length of the location, or NAPI_AUTO_LENGTH if it is terminated by a null character.
    ///
    /// * `message` - The message associated with the error.
    ///
    /// * `message_len` - The byte length of the message, or NAPI_AUTO_LENGTH if it is terminated by a null character.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_fatal_error(
        location: *const ::core::ffi::c_char,
        location_len: usize,
        message: *const ::core::ffi::c_char,
        message_len: usize,
    ) -> !;
    /// Creates an asynchronous context. The capabilities related to 'async_hook' are not supported currently.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `async_resource` - Object associated with the async work that will be passed to possible 'async_hook'.
    ///
    /// * `async_resource_name` - Identifier for the kind of resource that is being provided for diagnostic information
    /// exposed by the async_hooks API.
    ///
    /// * `result` - The initialized async context.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn napi_async_init(
        env: napi_env,
        async_resource: napi_value,
        async_resource_name: napi_value,
        result: *mut napi_async_context,
    ) -> napi_status;
    /// Destroys the previously created asynchronous context. The capabilities related to 'async_hook' are not
    /// supported currently.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `async_context` - The async context to be destroyed.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn napi_async_destroy(env: napi_env, async_context: napi_async_context) -> napi_status;
    /// Allows an ArkTS function to be called in the asynchronous context. The capabilities related to 'async_hook'
    /// are not supported currently.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `async_context` - The context environment for the async operation.
    ///
    /// * `recv` - The 'this' pointer of the function.
    ///
    /// * `func` - ArkTS function to be called.
    ///
    /// * `argc` - Size of the argument array which is passed to 'func'.
    ///
    /// * `argv` - Argument array.
    ///
    /// * `result` - Result returned by the ArkTS function.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, func and(or) recv is nullptr;
    ///
    /// If the param argc is greater than 0 but argv is nullptr.
    ///
    /// [`napi_object_expected`] If the param recv is not an ArkTS Object.
    ///
    /// [`napi_function_expected`] If the param func is not an ArkTS Function.
    ///
    /// [`napi_pending_exception`] There is an uncaught exception occurred before(in) execution.
    ///
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn napi_make_callback(
        env: napi_env,
        async_context: napi_async_context,
        recv: napi_value,
        func: napi_value,
        argc: usize,
        argv: *const napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    /// Creates an ArkTS ArrayBuffer object of the specified size.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `length` - Bytes size of the underlying arraybuffer.
    ///
    /// * `data` - Raw pointer to the underlying arraybuffer.
    ///
    /// * `result` - Created ArkTS ArrayBuffer object.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, data or result is nullptr, or length is larger than 2097152,
    /// or length is less than zero.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_buffer(
        env: napi_env,
        length: usize,
        data: *mut *mut ::core::ffi::c_void,
        result: *mut napi_value,
    ) -> napi_status;
    /// Creates an ArkTS ArrayBuffer object of the specified size and initializes it with the given data.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.n
    ///
    /// * `length` - Bytes size of the given data.
    ///
    /// * `data` - Given data.
    ///
    /// * `finalize_cb` - Optional native callback that can be used to free the given data when the ArkTS ArrayBuffer
    /// object has been garbage-collected.
    ///
    /// * `finalize_hint` - Optional contextual hint that is passed to the finalize callback.
    ///
    /// * `result` - Created ArkTS ArrayBuffer object.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, data or result is nullptr, or length is larger than 2097152,
    /// or length is less than or equal to zero.
    ///
    /// [`napi_pending_exception`] If an ArkTS exception existed when the function was called.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_external_buffer(
        env: napi_env,
        length: usize,
        data: *mut ::core::ffi::c_void,
        finalize_cb: napi_finalize,
        finalize_hint: *mut ::core::ffi::c_void,
        result: *mut napi_value,
    ) -> napi_status;
    /// Creates an ArkTS ArrayBuffer object of the specified size and initializes it with the given data.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `length` - Bytes size of the given data.
    ///
    /// * `data` - Given data.
    ///
    /// * `result_data` - Raw pointer to the underlying arraybuffer.
    ///
    /// * `result` - Created ArkTS ArrayBuffer object.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, data or result is nullptr, or length is larger than 2097152,
    /// or length is less than or equal to zero.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_buffer_copy(
        env: napi_env,
        length: usize,
        data: *const ::core::ffi::c_void,
        result_data: *mut *mut ::core::ffi::c_void,
        result: *mut napi_value,
    ) -> napi_status;
    /// Checks whether the given ArkTS value is a 'ArrayBuffer' object.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - ArkTS ArrayBuffer object.
    ///
    /// * `result` - Boolean value that is set to true if the 'value' is a 'ArrayBuffer' object, false otherwise.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, value or result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_is_buffer(env: napi_env, value: napi_value, result: *mut bool) -> napi_status;
    /// Obtains the underlying data of 'ArrayBuffer' and its length.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - ArkTS ArrayBuffer object.
    ///
    /// * `data` - Raw pointer to the underlying arraybuffer.
    ///
    /// * `length` - Bytes size of the underlying arraybuffer.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, value or result is nullptr.
    ///
    /// [`napi_arraybuffer_expected`] If the 'value' is not an ArkTS array buffer object.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_buffer_info(
        env: napi_env,
        value: napi_value,
        data: *mut *mut ::core::ffi::c_void,
        length: *mut usize,
    ) -> napi_status;
    /// Allocate a work object that is used to execute logic asynchronously.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `async_resource` - Not supported, can be ignored by passing nullptr.
    ///
    /// * `async_resource_name` - Identifier for the kind of resource that is being provided for diagnostic information
    /// exposed by the HiTrace.
    ///
    /// * `execute` - The native function which should be called to execute the logic asynchronously. The given function
    /// is called from a worker pool thread and can execute in parallel with the main event loop thread.
    ///
    /// * `complete` - The native function which will be called when the asynchronous logic is completed or is cancelled.
    /// The given function is called from the main event loop thread.
    ///
    /// * `data` - User-provided data context. This will be passed back into the execute and complete functions.
    ///
    /// * `result` - The handle to the newly created async work.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, async_resource_name, execute, complete and(or) result is
    ///
    /// nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_async_work(
        env: napi_env,
        async_resource: napi_value,
        async_resource_name: napi_value,
        execute: napi_async_execute_callback,
        complete: napi_async_complete_callback,
        data: *mut ::core::ffi::c_void,
        result: *mut napi_async_work,
    ) -> napi_status;
    /// Free a previously allocated work object.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `work` - The handle returned by the call to napi_create_async_work.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) work is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_delete_async_work(env: napi_env, work: napi_async_work) -> napi_status;
    /// Requests that the previously allocated work be scheduled for execution. Once it returns successfully,
    /// this API must not be called again with the same napi_async_work item or the result will be undefined.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `work` - The handle returned by the call to napi_create_async_work.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) work is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_queue_async_work(env: napi_env, work: napi_async_work) -> napi_status;
    /// Cancels queued work if it has not yet been started. If it has already started executing, it cannot be
    /// cancelled. If successful, the complete callback will be invoked with a status value of napi_cancelled.
    /// The work should not be deleted before the complete callback invocation, even if it has been successfully
    /// cancelled.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `work` - The handle returned by the call to napi_create_async_work.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) work is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_cancel_async_work(env: napi_env, work: napi_async_work) -> napi_status;
    pub fn napi_get_node_version(
        env: napi_env,
        version: *mut *const napi_node_version,
    ) -> napi_status;
    /// Obtains the current libuv loop instance.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `loop` - Libuv event loop.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or loop is nullptr.
    ///
    /// [`napi_generic_failure`] If env is invalid.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_uv_event_loop(env: napi_env, loop_: *mut *mut uv_loop_s) -> napi_status;
    /// Throws UncaughtException to ArkTS.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `err` - Error object which is passed to 'UncaughtException'.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env and(or) err is nullptr;
    ///
    /// If the param err is not an ArkTS Error value.
    ///
    /// [`napi_pending_exception`] There is an uncaught exception occurred before execution.
    ///
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_fatal_exception(env: napi_env, err: napi_value) -> napi_status;
    /// Registers a clean-up hook for releasing resources when the environment exits.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `fun` - Function pointer which will be triggered when environment is destroy.
    ///
    /// * `arg` - The argument is passed to the function pointer 'fun'.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn napi_add_env_cleanup_hook(
        env: napi_env,
        fun: ::core::option::Option<unsafe extern "C" fn(arg: *mut ::core::ffi::c_void)>,
        arg: *mut ::core::ffi::c_void,
    ) -> napi_status;
    /// Unregisters the clean-up hook.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `fun` - Function pointer which will be triggered when environment is destroy.
    ///
    /// * `arg` - The argument is passed to the function pointer 'fun'.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn napi_remove_env_cleanup_hook(
        env: napi_env,
        fun: ::core::option::Option<unsafe extern "C" fn(arg: *mut ::core::ffi::c_void)>,
        arg: *mut ::core::ffi::c_void,
    ) -> napi_status;
    /// Opens a callback scope. The capabilities related to 'async_hook' are not supported currently.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `resource_object` - The resource object to be passed to possible 'async_hook'.
    ///
    /// * `context` - The context environment for the async operation.
    ///
    /// * `result` - The generated callback scope.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn napi_open_callback_scope(
        env: napi_env,
        resource_object: napi_value,
        context: napi_async_context,
        result: *mut napi_callback_scope,
    ) -> napi_status;
    /// Closes the callback scope. The capabilities related to 'async_hook' are not supported currently.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `scope` - The callback scope to be closed.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn napi_close_callback_scope(env: napi_env, scope: napi_callback_scope) -> napi_status;
    /// Creates a thread-safe function.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `func` - ArkTS function to be called.
    ///
    /// * `async_resource` - An optional Object associated with the async work that will be passed to possible
    /// 'async_hooks'.
    ///
    /// * `async_resource_name` - An ArkTS string to provide an identifier for the kind of resource that is being
    /// provided for diagnostic information exposed by the `async_hooks` interface.
    ///
    /// * `max_queue_size` - Maximum size of the event queue in the thread-safe function.
    ///
    /// * `initial_thread_count` - Initial thread count of the thread-safe function.
    ///
    /// * `thread_finalize_data` - Data passed to the finalize callback.
    ///
    /// * `thread_finalize_cb` - Finalize callback function which will be triggered when the thread-safe function is
    /// released.
    ///
    /// * `context` - Optional data is passed to 'call_js_cb'.
    ///
    /// * `call_js_cb` - Callback function which will be triggered after 'napi_call_threadsafe_function()' is called.
    ///
    /// * `result` - The created thread-safe function.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, async_resource_name or result is nullptr; max_queue_size is less than 0;
    ///
    /// initial_thread_count is greater than 128 or less than 0; func and call_js_cb are
    ///
    /// nullptr at same time.
    ///
    /// [`napi_generic_failure`] If create thread-safe function failed.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_create_threadsafe_function(
        env: napi_env,
        func: napi_value,
        async_resource: napi_value,
        async_resource_name: napi_value,
        max_queue_size: usize,
        initial_thread_count: usize,
        thread_finalize_data: *mut ::core::ffi::c_void,
        thread_finalize_cb: napi_finalize,
        context: *mut ::core::ffi::c_void,
        call_js_cb: napi_threadsafe_function_call_js,
        result: *mut napi_threadsafe_function,
    ) -> napi_status;
    /// Obtains the context of a thread-safe function.
    /// # Arguments
    ///
    /// * `func` - The created thread-safe function.
    ///
    /// * `result` - Pointer pointer to the context of the thread-safe function.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If func or result is nullptr.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_get_threadsafe_function_context(
        func: napi_threadsafe_function,
        result: *mut *mut ::core::ffi::c_void,
    ) -> napi_status;
    /// Calls a thread-safe function.
    /// # Arguments
    ///
    /// * `func` - The created thread-safe function.
    ///
    /// * `data` - Data passed to the callback function 'call_js_cb' which is registered by calling
    /// 'napi_create_threadsafe_function()'.
    ///
    /// * `is_blocking` - If true, this function blocks until the event queue is not full. If false, return directly.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If func is nullptr.
    ///
    /// [`napi_queue_full`] If event queue is full.
    ///
    /// [`napi_closing`] If the thread-safe function is closing.
    ///
    /// [`napi_generic_failure`] If call thread-safe function failed.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_call_threadsafe_function(
        func: napi_threadsafe_function,
        data: *mut ::core::ffi::c_void,
        is_blocking: napi_threadsafe_function_call_mode,
    ) -> napi_status;
    /// Acquires a thread-safe function.
    /// # Arguments
    ///
    /// * `func` - The created thread-safe function.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If func is nullptr.
    ///
    /// [`napi_generic_failure`] If acquire thread-safe function failed.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_acquire_threadsafe_function(func: napi_threadsafe_function) -> napi_status;
    /// Releases a thread-safe function.
    /// # Arguments
    ///
    /// * `func` - The created thread-safe function.
    ///
    /// * `mode` - Value of mode can be either 'napi_tsfn_release' to indicate that no more calls should be made
    /// to the thread-safe function from current thread or 'napi_tsfn_abort' to indicate that the queue
    /// of the thread-safe function will be closed and 'napi_closing' will be return when calling
    /// 'napi_call_threadsafe_function()' under the circumstance.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If func is nullptr.
    ///
    /// [`napi_generic_failure`] If release thread-safe function failed.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_release_threadsafe_function(
        func: napi_threadsafe_function,
        mode: napi_threadsafe_function_release_mode,
    ) -> napi_status;
    /// Indicates that the event loop running on the main thread may exit before the thread-safe function
    /// is destroyed.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `func` - The created thread-safe function.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or func is nullptr.
    ///
    /// [`napi_generic_failure`] If unref thread-safe function failed.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_unref_threadsafe_function(
        env: napi_env,
        func: napi_threadsafe_function,
    ) -> napi_status;
    /// Indicates that the event loop running on the main thread should not exit until the thread-safe
    /// function is destroyed.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `func` - The created thread-safe function.
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or func is nullptr.
    ///
    /// [`napi_generic_failure`] If ref thread-safe function failed.
    ///
    ///
    /// Available since API-level: 10
    pub fn napi_ref_threadsafe_function(
        env: napi_env,
        func: napi_threadsafe_function,
    ) -> napi_status;
    /// Registers an asynchronous clean-up hook for releasing resources when the environment exits.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `hook` - The function pointer to call at environment teardown.
    ///
    /// * `arg` - The pointer to pass to `hook` when it gets called.
    ///
    /// * `remove_handle` - Optional handle that refers to the asynchronous cleanup.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn napi_add_async_cleanup_hook(
        env: napi_env,
        hook: napi_async_cleanup_hook,
        arg: *mut ::core::ffi::c_void,
        remove_handle: *mut napi_async_cleanup_hook_handle,
    ) -> napi_status;
    /// Unregisters the asynchronous clean-up hook.
    ///
    /// # Arguments
    ///
    /// * `remove_handle` - Optional handle that refers to the asynchronous cleanup.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn napi_remove_async_cleanup_hook(
        remove_handle: napi_async_cleanup_hook_handle,
    ) -> napi_status;
    /// Obtains the absolute path of the location, from which the addon is loaded.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `result` - The absolute path of the location of the loaded addon.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn node_api_get_module_file_name(
        env: napi_env,
        result: *mut *const ::core::ffi::c_char,
    ) -> napi_status;
    pub fn napi_run_script_path(
        env: napi_env,
        path: *const ::core::ffi::c_char,
        result: *mut napi_value,
    ) -> napi_status;
    pub fn napi_queue_async_work_with_qos(
        env: napi_env,
        work: napi_async_work,
        qos: napi_qos_t,
    ) -> napi_status;
    /// Loads an .abc file as a module. This API returns the namespace of the module.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `path` - Path of the .abc file or name of the module to load.
    ///
    /// * `result` - Result of the module object.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn napi_load_module(
        env: napi_env,
        path: *const ::core::ffi::c_char,
        result: *mut napi_value,
    ) -> napi_status;
    /// Create ArkTS Object with initial properties given by descriptors, note that property key must be String, and
    /// must can not convert to element_index, also all keys must not duplicate.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `result` - The created ArkTS object.
    ///
    /// * `property_count` - Number of the property descriptors.
    ///
    /// * `properties` - Array of property descriptors which are expected to be applied to the ArkTS object.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn napi_create_object_with_properties(
        env: napi_env,
        result: *mut napi_value,
        property_count: usize,
        properties: *const napi_property_descriptor,
    ) -> napi_status;
    /// Create ArkTS Object with initial properties given by keys and values, note that property key must be String,
    /// and must can not convert to element_index, also all keys must not duplicate.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `result` - The absolute path of the location of the loaded addon.
    ///
    /// * `property_count` - Number of the propertied which needs to be applied on the ArkTS object.
    ///
    /// * `keys` - Array of the keys of the properties.
    ///
    /// * `values` - Array of the values of the properties.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn napi_create_object_with_named_properties(
        env: napi_env,
        result: *mut napi_value,
        property_count: usize,
        keys: *mut *const ::core::ffi::c_char,
        values: *const napi_value,
    ) -> napi_status;
    /// This API sets native properties to a object and converts this ArkTS object to native binding object.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `js_object` - The ArkTS value to coerce.
    ///
    /// * `detach_cb` - Native callback that can be used to detach the ArkTS object and the native object.
    ///
    /// * `attach_cb` - Native callback that can be used to bind the ArkTS object and the native object.
    ///
    /// * `native_object` - User-provided native instance to pass to thr detach callback and attach callback.
    ///
    /// * `hint` - Optional hint to pass to the detach callback and attach callback.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 11
    #[cfg(feature = "api-11")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
    pub fn napi_coerce_to_native_binding_object(
        env: napi_env,
        js_object: napi_value,
        detach_cb: napi_native_binding_detach_callback,
        attach_cb: napi_native_binding_attach_callback,
        native_object: *mut ::core::ffi::c_void,
        hint: *mut ::core::ffi::c_void,
    ) -> napi_status;
    /// The module is loaded through the NAPI. By default, the default object is exported from the module.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `path` - Path name of the module to be loaded, like
    /// * `module_info` - Path names of bundle and module, like com.example.application/entry.
    ///
    /// * `result` - Result of loading a module, which is an exported object of the module.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_load_module_with_info(
        env: napi_env,
        path: *const ::core::ffi::c_char,
        module_info: *const ::core::ffi::c_char,
        result: *mut napi_value,
    ) -> napi_status;
    /// Create the ark runtime.
    ///
    /// # Arguments
    ///
    /// * `env` - Indicates the ark runtime environment.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_create_ark_runtime(env: *mut napi_env) -> napi_status;
    /// Destroy the ark runtime.
    ///
    /// # Arguments
    ///
    /// * `env` - Indicates the ark runtime environment.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_destroy_ark_runtime(env: *mut napi_env) -> napi_status;
    /// Defines a sendable class.
    ///
    /// # Arguments
    ///
    /// * `env` - The environment that the API is invoked under.
    ///
    /// * `utf8name` - Name of the ArkTS constructor function.
    ///
    /// * `length` - The length of the utf8name in bytes, or NAPI_AUTO_LENGTH if it is null-terminated.
    ///
    /// * `constructor` - Callback function that handles constructing instances of the class.
    ///
    /// * `data` - Optional data to be passed to the constructor callback as the data property of the callback info.
    ///
    /// * `property_count` - Number of items in the properties array argument.
    ///
    /// * `properties` - Array of property descriptors describing static and instance data properties, accessors, and
    /// methods on the class. See napi_property_descriptor.
    ///
    /// * `parent` - A napi_value representing the Superclass.
    ///
    /// * `result` - A napi_value representing the constructor function for the class.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_define_sendable_class(
        env: napi_env,
        utf8name: *const ::core::ffi::c_char,
        length: usize,
        constructor: napi_callback,
        data: *mut ::core::ffi::c_void,
        property_count: usize,
        properties: *const napi_property_descriptor,
        parent: napi_value,
        result: *mut napi_value,
    ) -> napi_status;
    /// Queries a napi_value to check if it is sendable.
    ///
    /// # Arguments
    ///
    /// * `env` - The environment that the API is invoked under.
    ///
    /// * `value` - The napi_value to be checked.
    ///
    /// * `result` - Boolean value that is set to true if napi_value is sendable, false otherwise.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_is_sendable(env: napi_env, value: napi_value, result: *mut bool) -> napi_status;
    /// Defines a sendable object.
    ///
    /// # Arguments
    ///
    /// * `env` - The environment that the API is invoked under.
    ///
    /// * `property_count` - The count of object properties.
    ///
    /// * `properties` - Object properties.
    ///
    /// * `result` - The created sendable object.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_create_sendable_object_with_properties(
        env: napi_env,
        property_count: usize,
        properties: *const napi_property_descriptor,
        result: *mut napi_value,
    ) -> napi_status;
    /// Wraps a native instance in an ArkTS object.
    ///
    /// # Arguments
    ///
    /// * `env` - The environment that the API is invoked under.
    ///
    /// * `js_object` - The ArkTS object that will be the wrapper for the native object.
    ///
    /// * `native_object` - The native instance that will be wrapped in the ArkTS object.
    ///
    /// * `finalize_cb` - Optional native callback that can be used to free the native instance when the ArkTS object
    /// has been garbage-collected.
    ///
    /// * `finalize_hint` - Optional contextual hint that is passed to the finalize callback.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_wrap_sendable(
        env: napi_env,
        js_object: napi_value,
        native_object: *mut ::core::ffi::c_void,
        finalize_cb: napi_finalize,
        finalize_hint: *mut ::core::ffi::c_void,
    ) -> napi_status;
    /// Wraps a native instance in an ArkTS object.
    ///
    /// # Arguments
    ///
    /// * `env` - The environment that the API is invoked under.
    ///
    /// * `js_object` - The ArkTS object that will be the wrapper for the native object.
    ///
    /// * `native_object` - The native instance that will be wrapped in the ArkTS object.
    ///
    /// * `finalize_cb` - Optional native callback that can be used to free the native instance when the ArkTS object
    /// has been garbage-collected.
    ///
    /// * `finalize_hint` - Optional contextual hint that is passed to the finalize callback.
    ///
    /// * `native_binding_size` - The size of native binding.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_wrap_sendable_with_size(
        env: napi_env,
        js_object: napi_value,
        native_object: *mut ::core::ffi::c_void,
        finalize_cb: napi_finalize,
        finalize_hint: *mut ::core::ffi::c_void,
        native_binding_size: usize,
    ) -> napi_status;
    /// Retrieves a native instance that was previously wrapped in an ArkTS object.
    ///
    /// # Arguments
    ///
    /// * `env` - The environment that the API is invoked under.
    ///
    /// * `js_object` - The object associated with the native instance.
    ///
    /// * `result` - Pointer to the wrapped native instance.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_unwrap_sendable(
        env: napi_env,
        js_object: napi_value,
        result: *mut *mut ::core::ffi::c_void,
    ) -> napi_status;
    /// Retrieves a native instance that was previously wrapped in an ArkTS object and removes the wrapping.
    ///
    /// # Arguments
    ///
    /// * `env` - The environment that the API is invoked under.
    ///
    /// * `js_object` - The object associated with the native instance.
    ///
    /// * `result` - Pointer to the wrapped native instance.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_remove_wrap_sendable(
        env: napi_env,
        js_object: napi_value,
        result: *mut *mut ::core::ffi::c_void,
    ) -> napi_status;
    /// Create a sendable array.
    ///
    /// # Arguments
    ///
    /// * `env` - The environment that the API is invoked under.
    ///
    /// * `result` - A napi_value representing a sendable array.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_create_sendable_array(env: napi_env, result: *mut napi_value) -> napi_status;
    /// Create a sendable array with length.
    ///
    /// # Arguments
    ///
    /// * `env` - The environment that the API is invoked under.
    ///
    /// * `length` - The initial length of the sendable array.
    ///
    /// * `result` - A napi_value representing a sendable array.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_create_sendable_array_with_length(
        env: napi_env,
        length: usize,
        result: *mut napi_value,
    ) -> napi_status;
    /// Create a sendable arraybuffer.
    ///
    /// # Arguments
    ///
    /// * `env` - The environment that the API is invoked under.
    ///
    /// * `byte_length` - The length in bytes of the sendable arraybuffer to create.
    ///
    /// * `data` - Pointer to the underlying byte buffer of the sendable arraybuffer.
    ///
    /// * `result` - A napi_value representing a sendable arraybuffer.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_create_sendable_arraybuffer(
        env: napi_env,
        byte_length: usize,
        data: *mut *mut ::core::ffi::c_void,
        result: *mut napi_value,
    ) -> napi_status;
    /// Create a sendable typedarray.
    ///
    /// # Arguments
    ///
    /// * `env` - The environment that the API is invoked under.
    ///
    /// * `type` - Scalar datatype of the elements within the sendable typedarray.
    ///
    /// * `length` - Number of elements in the typedarray.
    ///
    /// * `arraybuffer` - Sendable arraybuffer underlying the sendable typedarray.
    ///
    /// * `byte_offset` - The byte offset within the sendable arraybuffer from which to start projecting the
    /// sendable typedarray.
    ///
    /// * `result` - A napi_value representing a sendable typedarray.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_create_sendable_typedarray(
        env: napi_env,
        type_: napi_typedarray_type,
        length: usize,
        arraybuffer: napi_value,
        byte_offset: usize,
        result: *mut napi_value,
    ) -> napi_status;
    /// Run the event loop by the given env and running mode in current thread.
    ///
    /// Support to run the native event loop in an asynchronous native thread with the specified running mode.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `mode` - Indicates the running mode of the native event loop.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_run_event_loop(env: napi_env, mode: napi_event_mode) -> napi_status;
    /// Stop the event loop in current thread.
    ///
    /// Support to stop the running event loop in current native thread.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_stop_event_loop(env: napi_env) -> napi_status;
    /// Serialize an ArkTS object.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `object` - The ArkTS object to serialize.
    ///
    /// * `transfer_list` - List of data to transfer in transfer mode.
    ///
    /// * `clone_list` - List of Sendable data to transfer in clone mode.
    ///
    /// * `result` - Serialization result of the ArkTS object.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_serialize(
        env: napi_env,
        object: napi_value,
        transfer_list: napi_value,
        clone_list: napi_value,
        result: *mut *mut ::core::ffi::c_void,
    ) -> napi_status;
    /// Restore serialization data to an ArkTS object.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `buffer` - Data to deserialize.
    ///
    /// * `object` - ArkTS object obtained by deserialization.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_deserialize(
        env: napi_env,
        buffer: *mut ::core::ffi::c_void,
        object: *mut napi_value,
    ) -> napi_status;
    /// Delete serialization data.
    ///
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `buffer` - Data to delete.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_delete_serialization_data(
        env: napi_env,
        buffer: *mut ::core::ffi::c_void,
    ) -> napi_status;
    /// Dispatch a task with specified priority from a native thread to an ArkTS thread, the task will execute
    /// the given thread safe function.
    ///
    /// # Arguments
    ///
    /// * `func` - Indicates the thread safe function.
    ///
    /// * `data` - Indicates the data anticipated to be transferred to the ArkTS thread.
    ///
    /// * `priority` - Indicates the priority of the task dispatched.
    ///
    /// * `isTail` - Indicates the way of the task dispatched into the native event queue. When "isTail" is true,
    /// the task will be dispatched to the tail of the native event queue. Conversely, when "isTail" is
    /// false, the tasks will be dispatched to the head of the native event queue.
    ///
    ///
    /// # Returns
    ///
    /// * Return the function execution status.
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn napi_call_threadsafe_function_with_priority(
        func: napi_threadsafe_function,
        data: *mut ::core::ffi::c_void,
        priority: napi_task_priority,
        isTail: bool,
    ) -> napi_status;
    /// Wraps a native instance in an ArkTS object.
    /// # Arguments
    ///
    /// * `env` - The environment that the API is invoked under.
    ///
    /// * `js_object` - The ArkTS object that will be the wrapper for the native object.
    ///
    /// * `native_object` - The native instance that will be wrapped in the ArkTS object.
    ///
    /// * `finalize_cb` - Optional native callback that can be used to free the native instance when the ArkTS object
    /// has been garbage-collected.
    ///
    /// * `async_finalizer` - A boolean value to determine that finalize_cb execute async or not.
    ///
    /// * `finalize_hint` - Optional contextual hint that is passed to the finalize callback.
    ///
    /// * `native_binding_size` - The size of native binding.
    ///
    /// * `result` - Optional reference to the wrapped object.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, js_object or native_object is nullptr.
    ///
    /// [`napi_object_expected`] If the param js_object is not an ArkTS Object or Function.
    ///
    /// [`napi_pending_exception`] There is an uncaught exception occurred before(in) execution.
    ///
    ///
    /// Available since API-level: 18
    #[cfg(feature = "api-18")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-18")))]
    pub fn napi_wrap_enhance(
        env: napi_env,
        js_object: napi_value,
        native_object: *mut ::core::ffi::c_void,
        finalize_cb: napi_finalize,
        async_finalizer: bool,
        finalize_hint: *mut ::core::ffi::c_void,
        native_binding_size: usize,
        result: *mut napi_ref,
    ) -> napi_status;
    /// To create a new virtual machine context.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `newEnv` - New generated virtual machine context which is expected to be used later.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env is nullptr.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurs in execution.
    ///
    ///
    /// Available since API-level: 20
    #[cfg(feature = "api-20")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
    pub fn napi_create_ark_context(env: napi_env, newEnv: *mut napi_env) -> napi_status;
    /// To switch a virtual machine context which is expected to be used later.
    /// # Arguments
    ///
    /// * `env` - Designated Virtual machine context which is expected to be used as the current virtual machine context.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env is nullptr.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurs in execution.
    ///
    ///
    /// Available since API-level: 20
    #[cfg(feature = "api-20")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
    pub fn napi_switch_ark_context(env: napi_env) -> napi_status;
    /// To destroy a virtual machine context which will not be used again.
    /// # Arguments
    ///
    /// * `env` - Virtual machine context expected to be destroyed.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env is nullptr.
    ///
    /// [`napi_pending_exception`] If have uncaught exception, or exception occurs in execution.
    ///
    ///
    /// Available since API-level: 20
    #[cfg(feature = "api-20")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
    pub fn napi_destroy_ark_context(env: napi_env) -> napi_status;
    /// To open a critical scope.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `scope` - A critical scope of type of napi_critical_scope is generated.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param scope is nullptr.
    ///
    ///
    /// Available since API-level: 21
    #[cfg(feature = "api-21")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
    pub fn napi_open_critical_scope(env: napi_env, scope: *mut napi_critical_scope) -> napi_status;
    /// To close a critical scope.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `scope` - A critical scope to be closed.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param scope is nullptr.
    ///
    ///
    /// Available since API-level: 21
    #[cfg(feature = "api-21")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
    pub fn napi_close_critical_scope(env: napi_env, scope: napi_critical_scope) -> napi_status;
    /// To obtain a ArkTS string buffer cache within the critical scope.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - An ArkTS string object which need be encoded with UTF16 format.
    ///
    /// * `buffer` - String buffer cache of the ArkTS string object value.
    ///
    /// * `length` - Length size of the string buffer cache which needs to be obtained.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If the param env, value, buffer and length is nullptr.
    ///
    ///
    /// Available since API-level: 21
    #[cfg(feature = "api-21")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
    pub fn napi_get_buffer_string_utf16_in_critical_scope(
        env: napi_env,
        value: napi_value,
        buffer: *mut *const char16_t,
        length: *mut usize,
    ) -> napi_status;
    /// Creates a strong reference for an ArkTS object to extend its lifespan. The caller needs to manage the
    /// reference lifespan.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `value` - The napi_value that is being referenced.
    ///
    /// * `result` - napi_strong_ref pointing to the new strong reference.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, value or result is nullptr.
    ///
    ///
    /// Available since API-level: 21
    #[cfg(feature = "api-21")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
    pub fn napi_create_strong_reference(
        env: napi_env,
        value: napi_value,
        result: *mut napi_strong_ref,
    ) -> napi_status;
    /// Deletes the strong reference passed in.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `ref` - The napi_strong_ref to be deleted.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env or ref is nullptr.
    ///
    ///
    /// Available since API-level: 21
    #[cfg(feature = "api-21")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
    pub fn napi_delete_strong_reference(env: napi_env, ref_: napi_strong_ref) -> napi_status;
    /// Obtains the ArkTS Object associated with the strong reference.
    /// # Arguments
    ///
    /// * `env` - Current running virtual machine context.
    ///
    /// * `ref` - The napi_strong_ref of the value being requested.
    ///
    /// * `result` - The napi_value referenced by the napi_strong_ref.
    ///
    ///
    /// # Returns
    ///
    /// * Returns the function execution status.
    /// [`napi_ok`] If the function executed successfully.
    ///
    /// [`napi_invalid_arg`] If env, ref or result is nullptr.
    ///
    ///
    /// Available since API-level: 21
    #[cfg(feature = "api-21")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-21")))]
    pub fn napi_get_strong_reference_value(
        env: napi_env,
        ref_: napi_strong_ref,
        result: *mut napi_value,
    ) -> napi_status;
}
