1.0.14 • Published 3 years ago

@ee-mail/jmap-client-ts v1.0.14

Weekly downloads
10
License
MIT
Repository
-
Last release
3 years ago

jmap-client-ts

A Jmap Client written in Typescript.

How to use it

Import in in your project (in you package.json), you can reference a commit or a branch to use snapshot versions.

Create the client

let client = new Client({
    accessToken: 'myToken',
    sessionUrl: 'http://jmap.example.com/session,
});

Fetch the session, it will return a promise (of void), the result will be stored on the client and can be accesed later with getSession()

client.fetchSession();

When the fetchSession() promise resolves, you can make requests, the name of the method corresponds to the names in the specs, with lowerCamelCase, and the / replaced by a _, it will return a promise.

client.mailbox_get({
    accountId: Object.keys(jmapClient.getSession().accounts)[0],
    ids: null,
})
1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago