1.2.3 • Published 10 months ago

@marxlnfcs/wildduck-api v1.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Wildduck API Client

A NodeJS client to communicate with the Wildduck API.

npm Snyk Vulnerabilities for npm package Website

Warning This library is still in progress and might have some bugs or features that are not working properly. If you find some bugs or missing/not working features, please feel free to create an issue.

You can find all endpoints here: Wildduck API Documentation

Installation

npm i @marxlnfcs/wildduck-api

Usage

import {createWildduckClient} from "./wildduck";

(async () => {

  // create a new client instance
  const client = createWildduckClient({
    baseUrl: 'http://api.wildduck.mail',
    accessToken: 'super-secret-access-key'
  });

  // intercept request for retrieving all users
  client.on(client.users.getUsers).subscribe((event) => {
    console.log(event.request); // AxiosRequestConfig
    console.log(event.response); // AxiosResponse
    console.log(event.error); // AxiosError
  });

  // list all users
  console.log(await client.users.getUsers());
  
});

Wildduck API Client

This simple client implements all Wildduck-API endpoints.

Features

  • Addresses
  • ApplicationPasswords
  • Archive
  • Archive
  • Audit
  • Authentication
  • AutoReplies
  • Certificates
  • DKIM
  • DomainAccess
  • DomainAliases
  • Filters
  • Mailboxes
  • Messages
  • Settings
  • Storage
  • Submission
  • TwoFactorAuth
  • Users
  • Webhooks
  • Exports

Configuration

createWildduckClient({
  baseUrl: string,
  accessToken: string,
  timeout?: number;
  proxy?: ClientProxySettings | string;
  rejectUnauthorized: boolean;
})

ClientOptions

PropertyTypeDefaultDescription
baseUrlstring-URL to the wildduck api
accessTokenstring-Access token to authenticate with the wildduck api
timeoutnumbernullDefines the timeout of api requests in milliseconds
proxyClientProxyOptions, stringnullWhether to use a proxy or not
rejectUnauthorizedbooleantrueIf false, the client rejects all unsecure https connections

ClientProxyOptions

PropertyTypeDefaultDescription
protocolhttp, httpsnullProtocol the proxy uses
urlstringnullProxy URL
hoststringnullHostname of the proxy
portnumbernullPort of the proxy
auth.usernamestringnullUsername to authenticate with
auth.passwordstringnullPassword to authenticate with
1.2.3

10 months ago

1.2.0

12 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.1.4

1 year ago

1.2.2

12 months ago

1.1.3

1 year ago

1.2.1

12 months ago

1.1.2

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago