# @types/netconf

> TypeScript definitions for netconf

Latest version **2.0.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/netconf
pnpm add @types/netconf
yarn add @types/netconf
bun add @types/netconf
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.4 |
| Published | 2023-11-07 |
| First published | 2019-09-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51422 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/netconf
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/netconf
- npm.io page: https://npm.io/package/@types/netconf

## Recent versions

- 2.0.4 (latest) — 2023-11-07
- 2.0.1 (ts3.6) — 2021-07-08
- 2.0.0 (ts2.0) — 2019-09-24
- 2.0.3 — 2023-10-18
- 2.0.2 — 2023-09-23

## README

# Installation
> `npm install --save @types/netconf`

# Summary
This package contains type definitions for netconf (https://github.com/darylturner/node-netconf).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/netconf.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/netconf/index.d.ts)
````ts
export class Client {
    /**
     * Creates a new Client object by passing in the connection parameters. Both password and private key authentication methods are supported
     */
    constructor(params: {
        host: string;
        username: string;
        port?: number | undefined;
        password?: string | undefined;
        pkey?: string | undefined;
    });

    /**
     * Opens a session
     */
    open(callback: (err: any) => void): void;

    /**
     * Sends requests. Requests are sent using the .rpc() method
     */
    rpc(request: any, callback: (err: any, reply: any) => void): void;

    /**
     * Closes the session
     */
    close(callback?: (err: any) => void): void;

    /**
     * Collects some useful information from several RPC calls and presents the results back
     */
    facts(
        callback: (
            err: any,
            facts: { hostname: string; version: string; module: string; uptime: string; serial: string },
        ) => void,
    ): void;

    /**
     * Loads configuration data into candidate-config using NETCONF. Default options are equivalent to "load merge" and would expect configuration data in JunOS curly-brace format
     */
    load(
        args: string | {
            config: any;
            action?: "merge" | "replace" | "override" | "update" | "set" | undefined;
            format?: "text" | "xml" | undefined;
        },
        callback: (err: any, reply: any) => void,
    ): void;

    /**
     * Commits candidate configuration to device
     */
    commit(callback: (err: any, reply: any) => void): void;

    /**
     * Shows difference between running and candidate-config. Equivalent to "show | compare".
     */
    compare(callback: (err: any, diff: any) => void): void;

    /**
     * Discards candidate configuration on device
     */
    rollback(callback: (err: any, reply: any) => void): void;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Leodinas Hao](https://github.com/leodinas-hao).

---
_Source: https://npm.io/package/@types/netconf · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
