Commit 123cdacd authored by Ruben Seggers's avatar Ruben Seggers
Browse files

Merge branch 'merge' into 'dev'

Merge

See merge request !1
parents d26a8748 7daeb204
Pipeline #1947 failed with stage
Showing with 2063 additions and 2 deletions
+2063 -2
.idea/
node_modules/
out/
\ No newline at end of file
default:
image: node:latest
before_script:
- npm install
run tests:
stage: test
script:
- ./tools/test_in_ci.sh
\ No newline at end of file
Dockerfile 0 → 100644
FROM node:12 as memri-nodeintegrators
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /usr/src/pyintegrators
COPY ./plugins ./plugins
COPY ./pod ./pod
COPY ./package.json ./package.json
COPY ./package-lock.json ./package-lock.json
RUN npm install
\ No newline at end of file
# nodeIntegrators
## nodeIntegrators
> Integrators integrate your information in your Pod. They import data from external services (Gmail, WhatsApp, etc.), enrich data with indexers (face recognition, spam detection, etc.), and execute actions (sending messages, uploading files, etc.).
Integrators integrate your information in your Pod. They import data from external services (Gmail, WhatsApp, etc.), enrich data with indexers (face recognition, spam detection, etc.), and execute actions (sending messages, uploading files, etc.).
\ No newline at end of file
## Overview
Integrators for Memri have a single repository per language, this repository is the one for Node.js, but others exist for [Python](https://gitlab.memri.io/memri/pyintegrators) and [Rust](https://gitlab.memri.io/memri/rustintegrators).
### Using Docker
Integrators are invoked by the Pod by launching a Docker container. To build the images for these containers, run:
```bash
docker build -t memri-nodeintegrators .
```
### Local build
#### Install
To install the Python package:
```bash
npm install
```
### Testing
To run tests:
```bash
npm run jest
```
### Documentation
[The overall documentation of Memri](https://docs.memri.io/)
[The documentation of nodeIntegrators](https://nodeintegrators.memri.io/)
#### Render documentation locally
In the near future, new documentation will be deployed automatically when a new version is released to the `prod` branch using GitLab pages. To inspect the documentation beforehand, you can generate it by running:
```bash
npm run generate-docs
```
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Note - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<link type="text/css" rel="stylesheet" href="styles/docdash-memri.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav >
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Note.html">Note</a></li><li><a href="Person.html">Person</a></li><li><a href="PodClient.html">PodClient</a><ul class='methods'><li data-type='method'><a href="PodClient.html#createItem">createItem</a></li><li data-type='method'><a href="PodClient.html#getAllItems">getAllItems</a></li><li data-type='method'><a href="PodClient.html#getItem">getItem</a></li><li data-type='method'><a href="PodClient.html#testConnection">testConnection</a></li></ul></li></ul>
<h3>Importers</h3>
<ul>
<li><a>iCloud - contacts</a></li>
<li><a>iCloud - notes</a></li>
</ul>
<h3>Indexers</h3>
</nav>
<div id="main">
<h1 class="page-title">Note</h1>
<section>
<header>
<h2>
Note
</h2>
<div class="class-description usertext">The Note Item class. We create a Note for every iCloud note.</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="Note"><span class="type-signature"></span>new Note<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="plugins_importers_iCloud_notes.js.html">plugins/importers/iCloud/notes.js</a>, <a href="plugins_importers_iCloud_notes.js.html#line7">line 7</a>
</li></ul></dd>
</dl>
</div>
</article>
</section>
</div>
<br class="clear">
<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Person - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<link type="text/css" rel="stylesheet" href="styles/docdash-memri.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav >
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Note.html">Note</a></li><li><a href="Person.html">Person</a></li><li><a href="PodClient.html">PodClient</a><ul class='methods'><li data-type='method'><a href="PodClient.html#createItem">createItem</a></li><li data-type='method'><a href="PodClient.html#getAllItems">getAllItems</a></li><li data-type='method'><a href="PodClient.html#getItem">getItem</a></li><li data-type='method'><a href="PodClient.html#testConnection">testConnection</a></li></ul></li></ul>
<h3>Importers</h3>
<ul>
<li><a>iCloud - contacts</a></li>
<li><a>iCloud - notes</a></li>
</ul>
<h3>Indexers</h3>
</nav>
<div id="main">
<h1 class="page-title">Person</h1>
<section>
<header>
<h2>
Person
</h2>
<div class="class-description usertext">The Person Item class. We create a Person for every iCloud contact.</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="Person"><span class="type-signature"></span>new Person<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="plugins_importers_iCloud_contacts.js.html">plugins/importers/iCloud/contacts.js</a>, <a href="plugins_importers_iCloud_contacts.js.html#line6">line 6</a>
</li></ul></dd>
</dl>
</div>
</article>
</section>
</div>
<br class="clear">
<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PodClient - Documentation</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<link type="text/css" rel="stylesheet" href="styles/docdash-memri.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav >
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Note.html">Note</a></li><li><a href="Person.html">Person</a></li><li><a href="PodClient.html">PodClient</a><ul class='methods'><li data-type='method'><a href="PodClient.html#createItem">createItem</a></li><li data-type='method'><a href="PodClient.html#getAllItems">getAllItems</a></li><li data-type='method'><a href="PodClient.html#getItem">getItem</a></li><li data-type='method'><a href="PodClient.html#testConnection">testConnection</a></li></ul></li></ul>
<h3>Importers</h3>
<ul>
<li><a>iCloud - contacts</a></li>
<li><a>iCloud - notes</a></li>
</ul>
<h3>Indexers</h3>
</nav>
<div id="main">
<h1 class="page-title">PodClient</h1>
<section>
<header>
<h2>
PodClient
</h2>
<div class="class-description usertext">The client that communicates with the Pod.</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="PodClient"><span class="type-signature"></span>new PodClient<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="pod_client.js.html">pod/client.js</a>, <a href="pod_client.js.html#line8">line 8</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="createItem"><span class="type-signature">(async) </span>createItem<span class="signature">(item)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="pod_client.js.html">pod/client.js</a>, <a href="pod_client.js.html#line42">line 42</a>
</li></ul></dd>
</dl>
<div class="description usertext">
Create an item in the Pod.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>item</code></td>
<td class="type">
<span class="param-type">Item</span>
</td>
<td class="description last">The item to be created in the Pod.</td>
</tr>
</tbody>
</table>
<h4 class="name" id="getAllItems"><span class="type-signature">(async) </span>getAllItems<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="pod_client.js.html">pod/client.js</a>, <a href="pod_client.js.html#line54">line 54</a>
</li></ul></dd>
</dl>
<div class="description usertext">
Get all items from Pod
</div>
<h4 class="name" id="getItem"><span class="type-signature">(async) </span>getItem<span class="signature">(uid)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="pod_client.js.html">pod/client.js</a>, <a href="pod_client.js.html#line31">line 31</a>
</li></ul></dd>
</dl>
<div class="description usertext">
Get an item from the Pod.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>uid</code></td>
<td class="type">
<span class="param-type">uid</span>
</td>
<td class="description last">Get the item with this uid.</td>
</tr>
</tbody>
</table>
<h4 class="name" id="testConnection"><span class="type-signature">(async) </span>testConnection<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="pod_client.js.html">pod/client.js</a>, <a href="pod_client.js.html#line18">line 18</a>
</li></ul></dd>
</dl>
<div class="description usertext">
Test the connection with the Pod.
</div>
</article>
</section>
</div>
<br class="clear">
<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>
</body>
</html>
\ No newline at end of file
File added
File added
File added
File added
File added
File added
File added
File added
File added
This diff is collapsed.
File added
File added
File added
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment