11 Commits
v1.2 ... v1.4

58 changed files with 10016 additions and 1202 deletions

4
.gitignore vendored
View File

@@ -3,4 +3,6 @@
/node_modules
/config.json
/mails.txt
/out
/out
/dist/*
template.html

217
LICENSE Normal file
View File

@@ -0,0 +1,217 @@
Copyright 2020 Dennis Gunia
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

129
README.md
View File

@@ -44,9 +44,9 @@ Der Ausfbau der mail.txt ist:
<mail>;<name>
...
```
Doppelte Mailadressen werden erkannt und dedupliziert.
Es werden drei Ausgaben erzeugt:
- List aller Codes
Es werden zwei Ausgaben erzeugt:
- Eine RegEx vorlage für alle Codes
- Safe-Datei
@@ -96,29 +96,121 @@ ts-node .\index.ts --privkey private.key --decrypt --safe .\out\credentials.json
}
```
## Syntax
## CLI
Das Command-Line-Interface unterscheidet zwischen 3 Aktionen:
- key
- send
- vault
==> Schlüsselpaar Erzeugen
`ts-node .\index.ts --privkey <path-to-private-key> --pubkey <path-to-public-key> --genkey`
Um Hilfe zu den Funktionen anzuzeigen verwenden sie folgendes Kommando:
`./opentoken-linux <action> -h` oder `./opentoken-linux <action> --help`
z.B. `ts-node .\index.ts --privkey private.key --pubkey public.key --genkey`
### Aktion: key
Die Aktion _key_ ist für das verwalten des RSA-Schlüsselpaars verantwortlich.
Derzeit wird allerdings nur das generieren eines Schlüsselpaars unterstützt.
==> Codes Erzeugen und versenden
`ts-node .\index.ts --config <path-to-config-key> --pubkey <path-to-public-key> --send --safe .\out\credentials.json --mails <path-to-mail-list> -html <path-to-html-template>`
Um ein schlüsselpaar zu generieren ist z.B. folgender Befehl zu verwenden:
`./opentoken-linux key --pubkey <pfad zur datei> --privkey <pfad zur datei> --generate`
Achtung: Es wird im Safe geprüft, ob Mailadressen bereits "bedient" wurden. Sollte dies der Fall sein, werden keine Mails an diese Adresse gesendet. Dies lässt sich mit dem Schalter `--force` umgehen.
```
Optional arguments:
-h, --help Show this help message and exit.
-g, --generate Send to all recipients, regardless if mail was
already sent. Overwrites safe with new codes.
-p PUBLICKEY, --pubkey PUBLICKEY
Specify the public key to use
-r PRIVATEKEY, --privkey PRIVATEKEY
Specify the private key to use
```
z.B. `ts-node .\index.ts --config config.json --pubkey public.key --send --safe .\out\credentials.json --mails mail.txt -html template.html`
### Aktion: send
Die Aktion _send_ ist für das genereiern der Codes und das Senden der Mails verantwortlich.
==> Safe entschlüsseln
`ts-node .\index.ts --privkey <path-to-private-key> --decrypt --safe .\out\credentials.json`
Um ein schlüsselpaar zu generieren ist z.B. folgender Befehl zu verwenden:
`./opentoken-linux key --pubkey <pfad zur datei> --config <pfad zur datei> --mails <pfad zur datei> --safe <pfad zur datei> --template <pfad zur datei>`
z.B. `ts-node .\index.ts --privkey private.key --decrypt --safe .\out\credentials.json`
Mit den schalter `--dryrun` werden keine Mails versendet. Zudem werden keine änderungen im Safe vorgenommen.
### Erweiterte Schalter
Mit den schalter `--force` werden alle Mails versendet. Alle Codes werden neu generiert und der Safe wird überschrieben.
Bereits gesendete mails und verwendete Codes werden im safe unverschlüsselt, jedoch ohne Zuordnung hinterlegt. Somit ist es möglich,
nachträglich ohne Private-Key Teilnehmer hinzuzufügen, ohne alle Codes neu zu generieren und alle Mails neu zu versenden. Dies ist jedoch nicht empfohlen, da dadurch die Anonymität nicht gewährleistet werden kann.
Sollte also bereits ein safe unter dem angegebenen Dateinamen existieren, wird dieser so weit wie möglich eingelesen. Sollte dieser nicht existieren, wird ein neuer, leerer Safe erstellt.
```
-h, --help Show this help message and exit.
-f, --force Send to all recipients, regardless if mail was
already sent. Overwrites safe with new codes.
-d, --dryrun Pretend to send mails. No outgoing SMTP connection.
Safe will not be updated.
-p PUBLICKEY, --pubkey PUBLICKEY
Specify the public key to use
-c CONFIGFILE, --config CONFIGFILE
Specify the config file to use
-m MAILLIST, --mails MAILLIST
Specify the maillist to use
-s SAFEFILE, --safe SAFEFILE
Specify the safe file to use
-t HTMLFILE, --template HTMLFILE
Specify the template file to use
```
### Aktion: vault
Die Aktion _vault_ ist für das verwalten des Safes verantwortlich.
Folgende operationen sind derzeit möglich:
- auslesen der verschlüsselten und unverschlüsselten Daten
- revoken (rückziehen) von codes
- erzeugen einer codeliste aller gültigen codes
**Auslesen der verschlüsselten und unverschlüsselten Daten**
Das Auslesen ist mit folgendem Befehl möglich:
`./opentoken-linux key --pubkey <pfad zur datei> --privkey <pfad zur datei> --safe <pfad zur datei>`
Über das Parameter --filter, lässt sich einstellen, welcher Teil des Safes anzuzeigenist.
**Revoken eines token**
Falls ein token aus irgendwelchen Gründen als ungültig markiert werden soll, lässt sich dies mit folgendem Befehl im Safe hinterlegen:
`./opentoken-linux key --pubkey <pfad zur datei> --privkey <pfad zur datei> --safe <pfad zur datei> --revoke <tokenid>`
Der mit `--revoke` angegebene Token wird überprüft. Sollte dieser nicht existieren oder bereitz revoked sein, wird das Programm einfach beendet.
Andernfalls wird dieser Token zur revokationList hinzugefügt.
**Erzeugen einer Code-Liste**
Es kann auch eine Liste mit allen aktuell gültigen codes (zurückgezogene ausgenommen) erzeugt werden.
Dazu kann folgendes Kommando verwendet werden:
`./opentoken-linux key --pubkey <pfad zur datei> --privkey <pfad zur datei> --safe <pfad zur datei> --get-codes`
Mit dem Parameter `--format` kann das Ausgabeformat angegeben werden. Zur auswahl stehen:
- json : Ausgabe als JSON fomratierter string
- regex : Ausgabe als vorformatierter RegEx String
```
-h, --help Show this help message and exit.
--filter {encrypted,unencrypted,all}
Specify the data to show. This parameter may
alternatively be specified via the DATATYPE
environment variable. The default value is "all".
-p PUBLICKEY, --pubkey PUBLICKEY
Specify the public key to use
-r PRIVATEKEY, --privkey PRIVATEKEY
Specify the private key to use
-s SAFEFILE, --safe SAFEFILE
Specify the safe file to use
-g, --get-codes Get a list of all non revoked codes
--format {json,regex}
Specify the output format of --get-codes. This
parameter may alternatively be specified via the
FORMAT environment variable. The default value is
"json".
--revoke TOKEN Revokes a token
```
- `--dryrun` : Mails werden nicht versendet und der Safe wird nicht verändert.
- `--force` : Alle Codes werden neu generiert und alle mails werden gesendet. Ignoriere bereits gesendete mails.
## Gepackte Binaries
Die gepackten Binaries sind für Linux, MacOS und Windoof verfügbar: [Binaries](https://gitlab.dennisgunia.de/dennisgunia/one-time-code-js/-/tree/master/bin)
@@ -191,3 +283,8 @@ Zudem werden die verwendeten Codes und die bereits gesendeten Mailadressen seper
Dies ermöglicht es, nachträglich benutzer hinzuzufügen, ohne allen anderen neue Mails oder gar neue Codes zukommen lassen zu müssen.
Es ist jedoch nocht empfohlen, nachträglich mails hinzuzufügen, da dies, abhängig von der Menge der gleichzeitig hinzugefügten Adressen eine grobe oder ggf. auch sehr genaue zuordnung zwischen Code und Mail der Nachzügler möglich ist.
## Logfile
Opentoken schreibt automatisch eine Logfile mit dem Namen `vault.log` in das aktuelle Verzeichniss. In dieser wird der aktuelle fortschritt dokumentiert. Sollte die Ausführung unerwartet unterbrochen werden, lässt sich aus dieser ermitteln, welche mailadressen bereits verarbeitet wurden.
Zusätzlich werden die einzelnen verschlüsselten Safeeinträge in die Datei geschrieben. Diese können in einem zukünftigen Release mit Hilfe des Private-Keys in eine gültige Safe Datei umgewandelt werden. Diese kann genutzt werden, um nur die verbleibenden Mails zu generieren und zu verschicken.

Binary file not shown.

Binary file not shown.

Binary file not shown.

158
dist/index.js vendored
View File

@@ -1,158 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var fs = __importStar(require("fs"));
var generate_1 = require("./src/generate");
var vault_1 = require("./src/vault");
var configPath = "", action = -1, pubKey = "", privKey = "", safeFile = "", mails = "", html = "", dryrun = false, force = false;
for (var i = 1; i < process.argv.length; i++) {
if (process.argv[i] === "--config") {
if (i + 1 < process.argv.length && !process.argv[i + 1].startsWith("--")) {
configPath = process.argv[i + 1];
}
else {
throw new Error("Invalid params");
}
}
if (process.argv[i] === "--pubkey") {
if (i + 1 < process.argv.length && !process.argv[i + 1].startsWith("--")) {
pubKey = process.argv[i + 1];
}
else {
throw new Error("Invalid params");
}
}
if (process.argv[i] === "--privkey") {
if (i + 1 < process.argv.length && !process.argv[i + 1].startsWith("--")) {
privKey = process.argv[i + 1];
}
else {
throw new Error("Invalid params");
}
}
if (process.argv[i] === "--safe") {
if (i + 1 < process.argv.length && !process.argv[i + 1].startsWith("--")) {
safeFile = process.argv[i + 1];
}
else {
throw new Error("Invalid params");
}
}
if (process.argv[i] === "--mails") {
if (i + 1 < process.argv.length && !process.argv[i + 1].startsWith("--")) {
mails = process.argv[i + 1];
}
else {
throw new Error("Invalid params");
}
}
if (process.argv[i] === "--html") {
if (i + 1 < process.argv.length && !process.argv[i + 1].startsWith("--")) {
html = process.argv[i + 1];
}
else {
throw new Error("Invalid params");
}
}
if (process.argv[i] === "--send") {
action = 1;
}
if (process.argv[i] === "--decrypt") {
action = 2;
}
if (process.argv[i] === "--genkey") {
action = 3;
}
if (process.argv[i] === "--dryrun") {
dryrun = true;
}
if (process.argv[i] === "--force") {
force = true;
}
}
if (action == -1) {
throw new Error("No Action specified");
}
if (!configPath && action == 1) {
throw new Error("Config-Path not specified");
}
if (!pubKey && action != 2) {
throw new Error("Public-Key not specified");
}
if (!safeFile && action != 3) {
throw new Error("Safe-file not specified");
}
if (!privKey && action >= 2) {
throw new Error("Private-Key not specified");
}
if (!mails && action == 1) {
throw new Error("Mail-Input not specified");
}
if (!html && action == 1) {
throw new Error("Mail-Template not specified");
}
if (action == 1) {
var dataSafe_1 = new vault_1.SecureVault(pubKey, privKey);
var confRaw = fs.readFileSync(configPath, 'utf8');
var config = {};
var addition_1 = false;
config = JSON.parse(confRaw);
if (fs.existsSync(safeFile)) {
dataSafe_1.loadData(safeFile);
config.usedTokens = dataSafe_1.getStorage(dataSafe_1.findStorage("usedTokens")[0].u);
config.usedMails = dataSafe_1.getStorage(dataSafe_1.findStorage("usedMails")[0].u);
addition_1 = true;
}
else {
config.usedTokens = [];
config.usedMails = [];
}
try {
config.inFileMail = mails;
config.htmlPath = html;
config.dryrun = dryrun;
config.force = force;
}
catch (error) {
console.error("Cannote read config file!");
process.exit(100);
}
generate_1.generateToken(config, dataSafe_1).then(function (el) {
if (addition_1) {
dataSafe_1.setStorage(dataSafe_1.findStorage("usedTokens")[0].u, el.codes);
dataSafe_1.setStorage(dataSafe_1.findStorage("usedMails")[0].u, el.mails);
dataSafe_1.saveData(safeFile);
}
else {
dataSafe_1.pushStorage('usedTokens', el.codes);
dataSafe_1.pushStorage('usedMails', el.mails);
dataSafe_1.saveData(safeFile);
}
}).catch(function (err) { return console.error("error", err); });
}
else if (action == 2) {
var dataSafe = new vault_1.SecureVault(pubKey, privKey);
dataSafe.loadData(safeFile);
dataSafe.decryptData();
}
else if (action == 3) {
vault_1.SecureVault.genKey(pubKey, privKey);
}

230
dist/src/generate.js vendored
View File

@@ -1,230 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateToken = void 0;
var fs = __importStar(require("fs"));
var path = __importStar(require("path"));
var nodemailer = __importStar(require("nodemailer"));
var cliProgress = __importStar(require("cli-progress"));
var shuffle_1 = require("./util/shuffle");
var token_1 = require("./util/token");
var Handlebars = __importStar(require("handlebars"));
var mailParser_1 = require("./mailParser");
function generateToken(config, dataSafe) {
return new Promise(function (resolve, error) {
mailParser_1.parseMails(config).then(function (res) {
generateCodes(resolve, error, res, config, dataSafe);
});
});
}
exports.generateToken = generateToken;
function generateCodes(resolve, error, mailArray, config, dataSafe) {
return __awaiter(this, void 0, void 0, function () {
var pbar, position, codeArray, checkString, listString, i, code;
return __generator(this, function (_a) {
console.log("\nGenerating codes");
pbar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);
pbar.start(mailArray.length, 0, {
speed: "N/A"
});
position = 0;
codeArray = [];
checkString = '';
listString = '';
for (i = 0; i < mailArray.length; i++) {
code = '';
do {
code = token_1.mkstring(4);
} while ((config.force ? codeArray : __spreadArrays(codeArray, config.usedTokens)).includes(code));
codeArray.push(code);
checkString = checkString + "|" + code;
listString = listString + "\n" + code;
position++;
pbar.update(position);
}
checkString = checkString.substr(1);
listString = listString.substr(1);
pbar.stop();
try {
if (!fs.existsSync(path.dirname(config.outFileMatch))) {
fs.mkdirSync(path.dirname(config.outFileMatch));
}
fs.writeFileSync(config.outFileMatch, checkString);
}
catch (err) {
error(err);
}
sendMails(resolve, error, mailArray, codeArray, config, dataSafe);
return [2];
});
});
}
function sendMails(resolve, error, mailArray, codeArray, config, dataSafe) {
return __awaiter(this, void 0, void 0, function () {
var mailserver, template, htmlSrc, pbar, position, i;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
mailserver = nodemailer.createTransport(config.mail);
try {
htmlSrc = fs.readFileSync(config.htmlPath, "utf8");
template = Handlebars.compile(htmlSrc);
}
catch (error) {
console.error("Cannote read template file!");
error(error);
}
console.log("\nSending mails");
pbar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);
pbar.start(mailArray.length, 0, {
speed: "N/A"
});
position = 0;
shuffle_1.shuffleArray(mailArray);
shuffle_1.shuffleArray(codeArray);
if (config.force) {
dataSafe.clearVault();
}
i = 0;
_a.label = 1;
case 1:
if (!(i < mailArray.length)) return [3, 4];
if (!config.dryrun) {
dataSafe.pushData({
name: mailArray[i].name,
mail: mailArray[i].mail,
code: codeArray[i]
});
}
return [4, send(mailArray[i].name, mailArray[i].mail, codeArray[i], template, mailserver, config)];
case 2:
_a.sent();
position++;
pbar.update(position);
_a.label = 3;
case 3:
i++;
return [3, 1];
case 4:
pbar.stop();
shuffle_1.shuffleArray(mailArray);
shuffle_1.shuffleArray(codeArray);
shuffle_1.shuffleArray(mailArray);
shuffle_1.shuffleArray(codeArray);
resolve({
codes: config.force ? codeArray : (config.dryrun ? config.usedTokens : __spreadArrays(codeArray, config.usedTokens)),
mails: config.force ? mailArray : (config.dryrun ? config.usedMails : __spreadArrays(mailArray, config.usedMails))
});
return [2];
}
});
});
}
function send(name, mail, code, template, mailserver, config) {
return __awaiter(this, void 0, void 0, function () {
var html, mailOptions, error_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!config.dryrun) return [3, 2];
return [4, delay(100)];
case 1:
_a.sent();
console.log("\n\u001B[36m -> dryrun: would send to " + mail + "\u001B[0m");
return [3, 6];
case 2:
html = template({
"name": name,
"mail": mail,
"code": code
});
mailOptions = {
from: config.mailFrom + " <" + config.mail.auth.user + ">",
to: mail,
subject: "Dein Zugangscode zur BJR Wahl",
html: html
};
_a.label = 3;
case 3:
_a.trys.push([3, 5, , 6]);
return [4, mailserver.sendMail(mailOptions)];
case 4:
_a.sent();
return [3, 6];
case 5:
error_1 = _a.sent();
console.log("Error sendign mail to " + mail + " : " + error_1);
return [3, 6];
case 6: return [2];
}
});
});
}
function delay(t, val) {
return new Promise(function (resolve) {
setTimeout(function () {
resolve(val);
}, t);
});
}

View File

@@ -1,70 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseMails = void 0;
var fs = __importStar(require("fs"));
function parseMails(config) {
return new Promise(function (resolve, reject) {
var mailArray = [];
var currSection = "global";
var lineCounter = 0;
var curCounter = 0;
console.log("Reading mails for section " + currSection);
var readline = require('readline'), instream = fs.createReadStream(config.inFileMail), outstream = new (require('stream'))(), rl = readline.createInterface(instream, outstream);
rl.on('line', function (line) {
lineCounter++;
if (line.startsWith('[')) {
if (line.endsWith(']')) {
console.log("Read " + curCounter + " adresses for section " + currSection);
curCounter = 0;
currSection = line.substring(1, line.length - 1);
console.log("Reading mails for section " + currSection);
}
else {
console.error("Error parsing section on line " + lineCounter + ": Syntax Error. Missing closing bracket ]");
}
}
else if (!line.startsWith('#')) {
var ix_1 = line.indexOf(";");
if (ix_1 !== -1) {
if (config.force || config.usedMails.filter(function (el) { return el.mail == line.substr(0, ix_1); }).length == 0) {
mailArray.push({
mail: line.substr(0, ix_1),
name: line.substr(ix_1 + 1)
});
curCounter++;
}
else {
console.error("Skipping " + line.substr(0, ix_1) + ": Already sent");
}
}
else {
console.error("Error parsing mail on line " + lineCounter + ": Syntax Error. Missing ;");
}
}
});
rl.on('close', function (line) {
console.log("Read " + curCounter + " adresses for section " + currSection + "\n" + mailArray.length + " mails read!");
resolve(mailArray);
});
});
}
exports.parseMails = parseMails;

View File

@@ -1,12 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.shuffleArray = void 0;
function shuffleArray(array) {
for (var i = array.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var temp = array[i];
array[i] = array[j];
array[j] = temp;
}
}
exports.shuffleArray = shuffleArray;

View File

@@ -1,13 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mkstring = void 0;
function mkstring(length) {
var result = '';
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
var charactersLength = characters.length;
for (var i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
}
exports.mkstring = mkstring;

222
dist/src/vault.js vendored
View File

@@ -1,222 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SecureVault = void 0;
var crypto = __importStar(require("crypto"));
var uuid = __importStar(require("uuid"));
var path_1 = __importDefault(require("path"));
var fs = __importStar(require("fs"));
var crypto_1 = require("crypto");
var vaultVersion = 'v1.2';
var SecureVault = (function () {
function SecureVault(publicKey, privateKey) {
this.storage = [];
this.safe = {
items: [],
publicKey: publicKey ? fs.readFileSync(path_1.default.resolve(publicKey)) : undefined,
privateKey: privateKey ? fs.readFileSync(path_1.default.resolve(privateKey)) : undefined
};
this.privPath = publicKey ? path_1.default.resolve(publicKey) : undefined,
this.pubPath = privateKey ? path_1.default.resolve(privateKey) : undefined;
}
SecureVault.prototype.pushData = function (data) {
return __awaiter(this, void 0, void 0, function () {
var txtData, key, iv, cipher, encrypted, buffer, asym_encrypted, u;
return __generator(this, function (_a) {
txtData = JSON.stringify(data);
key = crypto.randomBytes(32);
iv = crypto.randomBytes(16);
cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(key), iv);
encrypted = cipher.update(txtData);
encrypted = Buffer.concat([encrypted, cipher.final()]);
buffer = new Buffer(key);
if (!this.safe.publicKey) {
throw new Error("Public Key not found");
}
asym_encrypted = crypto.publicEncrypt(this.safe.publicKey, buffer);
u = uuid.v4();
this.safe.items.push({
u: u,
d: encrypted.toString('hex'),
k: asym_encrypted.toString("base64"),
iv: iv.toString('hex')
});
return [2, u];
});
});
};
SecureVault.prototype.saveData = function (path) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
fs.writeFileSync(path, JSON.stringify({
version: vaultVersion,
vault: this.safe.items,
storage: this.storage
}));
return [2];
});
});
};
SecureVault.prototype.loadData = function (path) {
return __awaiter(this, void 0, void 0, function () {
var loaded;
return __generator(this, function (_a) {
loaded = JSON.parse(fs.readFileSync(path, 'utf8'));
switch (loaded.version) {
case 'v1.1':
this.safe.items = loaded.vault;
break;
case 'v1.2':
this.safe.items = loaded.vault;
this.storage = loaded.storage;
break;
default:
console.error("Unknown or unsupported vault file version: " + loaded.version);
}
return [2];
});
});
};
SecureVault.prototype.decryptData = function () {
return __awaiter(this, void 0, void 0, function () {
var _this = this;
return __generator(this, function (_a) {
this.safe.items.forEach(function (el) {
var buffer = new Buffer(el.k, "base64");
if (!_this.safe.privateKey) {
throw new Error("Private Key not found");
}
var key = crypto.privateDecrypt(_this.safe.privateKey, buffer);
var iv = Buffer.from(el.iv, 'hex');
var encryptedText = Buffer.from(el.d, 'hex');
var decipher = crypto.createDecipheriv('aes-256-cbc', key, iv);
var decrypted = decipher.update(encryptedText);
decrypted = Buffer.concat([decrypted, decipher.final()]);
var obj = JSON.parse(decrypted.toString());
console.log(obj);
});
return [2];
});
});
};
SecureVault.genKey = function (publicKeyDir, privateKeyDir) {
crypto_1.generateKeyPair('rsa', {
modulusLength: 4096,
publicKeyEncoding: {
type: 'pkcs1',
format: 'pem'
},
privateKeyEncoding: {
type: 'pkcs1',
format: 'pem',
}
}, function (err, publicKey, privateKey) {
fs.writeFileSync(privateKeyDir, privateKey);
fs.writeFileSync(publicKeyDir, publicKey);
});
};
SecureVault.prototype.pushStorage = function (tag, data) {
if (vaultVersion !== 'v1.2') {
throw new Error("Storage not supported in " + vaultVersion);
}
else {
var objJsonStr = JSON.stringify(data);
var objJsonB64 = Buffer.from(objJsonStr).toString("base64");
this.storage.push({
u: uuid.v4(),
d: objJsonB64,
t: tag
});
}
};
SecureVault.prototype.setStorage = function (suuid, data) {
if (vaultVersion !== 'v1.2') {
throw new Error("Storage not supported in " + vaultVersion);
}
else {
var objJsonStr = JSON.stringify(data);
var objJsonB64 = Buffer.from(objJsonStr, "utf8").toString("base64");
this.storage.filter(function (el) { return el.u == suuid; })[0].d = objJsonB64;
}
};
SecureVault.prototype.getStorage = function (suuid) {
if (vaultVersion !== 'v1.2') {
throw new Error("Storage not supported in " + vaultVersion);
}
else {
var data = this.storage.filter(function (el) { return el.u == suuid; })[0];
var objJsonB64 = new Buffer(data.d, 'base64');
return JSON.parse(objJsonB64.toString('utf8'));
}
};
SecureVault.prototype.findStorage = function (tag) {
if (vaultVersion !== 'v1.2') {
throw new Error("Storage not supported in " + vaultVersion);
}
else {
return this.storage.filter(function (el) { return el.t == tag; });
}
};
SecureVault.prototype.clearVault = function () {
this.safe.items = [];
};
return SecureVault;
}());
exports.SecureVault = SecureVault;

1
docs/assets/css/main.css Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 B

51
docs/assets/js/main.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

880
docs/classes/keyaction.html Normal file
View File

@@ -0,0 +1,880 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>KeyAction | opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="keyaction.html">KeyAction</a>
</li>
</ul>
<h1>Class KeyAction</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="tsd-signature-type">CommandLineAction</span>
<ul class="tsd-hierarchy">
<li>
<span class="target">KeyAction</span>
</li>
</ul>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Constructors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="keyaction.html#constructor" class="tsd-kind-icon">constructor</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="keyaction.html#_generate" class="tsd-kind-icon">_generate</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="keyaction.html#_privkey" class="tsd-kind-icon">_privkey</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="keyaction.html#_pubkey" class="tsd-kind-icon">_pubkey</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#actionname" class="tsd-kind-icon">action<wbr>Name</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#documentation" class="tsd-kind-icon">documentation</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#summary" class="tsd-kind-icon">summary</a></li>
</ul>
</section>
<section class="tsd-index-section tsd-is-inherited">
<h3>Accessors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#parameters" class="tsd-kind-icon">parameters</a></li>
<li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#remainder" class="tsd-kind-icon">remainder</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#definechoiceparameter" class="tsd-kind-icon">define<wbr>Choice<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#definecommandlineremainder" class="tsd-kind-icon">define<wbr>Command<wbr>Line<wbr>Remainder</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#defineflagparameter" class="tsd-kind-icon">define<wbr>Flag<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#defineintegerparameter" class="tsd-kind-icon">define<wbr>Integer<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#definestringlistparameter" class="tsd-kind-icon">define<wbr>String<wbr>List<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#definestringparameter" class="tsd-kind-icon">define<wbr>String<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#getchoiceparameter" class="tsd-kind-icon">get<wbr>Choice<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#getflagparameter" class="tsd-kind-icon">get<wbr>Flag<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#getintegerparameter" class="tsd-kind-icon">get<wbr>Integer<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#getstringlistparameter" class="tsd-kind-icon">get<wbr>String<wbr>List<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#getstringparameter" class="tsd-kind-icon">get<wbr>String<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="keyaction.html#ondefineparameters" class="tsd-kind-icon">on<wbr>Define<wbr>Parameters</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="keyaction.html#onexecute" class="tsd-kind-icon">on<wbr>Execute</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="keyaction.html#renderhelptext" class="tsd-kind-icon">render<wbr>Help<wbr>Text</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
<a name="constructor" class="tsd-anchor"></a>
<h3>constructor</h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
<li class="tsd-signature tsd-kind-icon">new <wbr>Key<wbr>Action<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="keyaction.html" class="tsd-signature-type">KeyAction</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides CommandLineAction.__constructor</p>
<ul>
<li>Defined in src/cli/KeyAction.ts:27</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <a href="keyaction.html" class="tsd-signature-type">KeyAction</a></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_generate" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _generate</h3>
<div class="tsd-signature tsd-kind-icon">_generate<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineFlagParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/KeyAction.ts:25</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_privkey" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _privkey</h3>
<div class="tsd-signature tsd-kind-icon">_privkey<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineStringParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/KeyAction.ts:27</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_pubkey" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _pubkey</h3>
<div class="tsd-signature tsd-kind-icon">_pubkey<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineStringParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/KeyAction.ts:26</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="actionname" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> action<wbr>Name</h3>
<div class="tsd-signature tsd-kind-icon">action<wbr>Name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#actionname">actionName</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:25</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>{@inheritDoc ICommandLineActionOptions.actionName}</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="documentation" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> documentation</h3>
<div class="tsd-signature tsd-kind-icon">documentation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#documentation">documentation</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:29</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>{@inheritDoc ICommandLineActionOptions.documentation}</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="summary" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> summary</h3>
<div class="tsd-signature tsd-kind-icon">summary<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#summary">summary</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:27</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>{@inheritDoc ICommandLineActionOptions.summary}</p>
</div>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-inherited">
<h2>Accessors</h2>
<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<a name="parameters" class="tsd-anchor"></a>
<h3>parameters</h3>
<ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> parameters<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ReadonlyArray</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">CommandLineParameter</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#parameters">parameters</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:229</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns a collection of the parameters that were defined for this object.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">ReadonlyArray</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">CommandLineParameter</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<a name="remainder" class="tsd-anchor"></a>
<h3>remainder</h3>
<ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> remainder<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineRemainder</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#remainder">remainder</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:234</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>If {@link CommandLineParameterProvider.defineCommandLineRemainder} was called,
this object captures any remaining command line arguments after the recognized portion.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineRemainder</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="definechoiceparameter" class="tsd-anchor"></a>
<h3>define<wbr>Choice<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>Choice<wbr>Parameter<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineChoiceDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineChoiceParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#definechoiceparameter">defineChoiceParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:245</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a command-line parameter whose value must be a string from a fixed set of
allowable choices (similar to an enum).</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Example of a choice parameter:</p>
<pre><code><span class="hljs-built_in">example</span>-tool --<span class="hljs-built_in">log</span>-level warn</code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineChoiceDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineChoiceParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="definecommandlineremainder" class="tsd-anchor"></a>
<h3>define<wbr>Command<wbr>Line<wbr>Remainder</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>Command<wbr>Line<wbr>Remainder<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineRemainderDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineRemainder</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#definecommandlineremainder">defineCommandLineRemainder</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:327</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a rule that captures any remaining command line arguments after the recognized portion.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This feature is useful for commands that pass their arguments along to an external tool, relying on
that tool to perform validation. (It could also be used to parse parameters without any validation
or documentation, but that is not recommended.)</p>
<p>Example of capturing the remainder after an optional flag parameter.</p>
<pre><code>example-tool --my-flag <span class="hljs-keyword">this</span> <span class="hljs-keyword">is</span> the remainder</code></pre>
<p>In the &quot;--help&quot; documentation, the remainder rule will be represented as &quot;...&quot;.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineRemainderDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineRemainder</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="defineflagparameter" class="tsd-anchor"></a>
<h3>define<wbr>Flag<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>Flag<wbr>Parameter<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineFlagDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineFlagParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#defineflagparameter">defineFlagParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:262</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a command-line switch whose boolean value is true if the switch is provided,
and false otherwise.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Example usage of a flag parameter:</p>
<pre><code>example-tool <span class="hljs-comment">--debug</span></code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineFlagDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineFlagParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="defineintegerparameter" class="tsd-anchor"></a>
<h3>define<wbr>Integer<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>Integer<wbr>Parameter<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineIntegerDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineIntegerParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#defineintegerparameter">defineIntegerParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:278</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a command-line parameter whose argument is an integer.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Example usage of an integer parameter:</p>
<pre><code><span class="hljs-built_in">example</span>-tool --<span class="hljs-built_in">max</span>-attempts <span class="hljs-number">5</span></code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineIntegerDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineIntegerParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="definestringlistparameter" class="tsd-anchor"></a>
<h3>define<wbr>String<wbr>List<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>String<wbr>List<wbr>Parameter<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineStringListDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineStringListParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#definestringlistparameter">defineStringListParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:311</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a command-line parameter whose argument is a single text string. The parameter can be
specified multiple times to build a list.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Example usage of a string list parameter:</p>
<pre><code>example-tool --<span class="hljs-builtin-name">add</span> file1.txt --<span class="hljs-builtin-name">add</span> file2.txt --<span class="hljs-builtin-name">add</span> file3.txt</code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineStringListDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineStringListParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="definestringparameter" class="tsd-anchor"></a>
<h3>define<wbr>String<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>String<wbr>Parameter<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineStringDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineStringParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#definestringparameter">defineStringParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:294</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a command-line parameter whose argument is a single text string.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Example usage of a string parameter:</p>
<pre><code>example-tool --<span class="hljs-keyword">message</span> <span class="hljs-string">&quot;Hello, world!&quot;</span></code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineStringDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineStringParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="getchoiceparameter" class="tsd-anchor"></a>
<h3>get<wbr>Choice<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">get<wbr>Choice<wbr>Parameter<span class="tsd-signature-symbol">(</span>parameterLongName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineChoiceParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#getchoiceparameter">getChoiceParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:251</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the CommandLineChoiceParameter with the specified long name.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This method throws an exception if the parameter is not defined.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>parameterLongName: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineChoiceParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="getflagparameter" class="tsd-anchor"></a>
<h3>get<wbr>Flag<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">get<wbr>Flag<wbr>Parameter<span class="tsd-signature-symbol">(</span>parameterLongName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineFlagParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#getflagparameter">getFlagParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:268</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the CommandLineFlagParameter with the specified long name.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This method throws an exception if the parameter is not defined.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>parameterLongName: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineFlagParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="getintegerparameter" class="tsd-anchor"></a>
<h3>get<wbr>Integer<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">get<wbr>Integer<wbr>Parameter<span class="tsd-signature-symbol">(</span>parameterLongName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineIntegerParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#getintegerparameter">getIntegerParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:284</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the CommandLineIntegerParameter with the specified long name.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This method throws an exception if the parameter is not defined.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>parameterLongName: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineIntegerParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="getstringlistparameter" class="tsd-anchor"></a>
<h3>get<wbr>String<wbr>List<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">get<wbr>String<wbr>List<wbr>Parameter<span class="tsd-signature-symbol">(</span>parameterLongName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineStringListParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#getstringlistparameter">getStringListParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:333</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the CommandLineStringListParameter with the specified long name.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This method throws an exception if the parameter is not defined.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>parameterLongName: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineStringListParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="getstringparameter" class="tsd-anchor"></a>
<h3>get<wbr>String<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">get<wbr>String<wbr>Parameter<span class="tsd-signature-symbol">(</span>parameterLongName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineStringParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#getstringparameter">getStringParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:300</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the CommandLineStringParameter with the specified long name.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This method throws an exception if the parameter is not defined.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>parameterLongName: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineStringParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<a name="ondefineparameters" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagProtected">Protected</span> on<wbr>Define<wbr>Parameters</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<li class="tsd-signature tsd-kind-icon">on<wbr>Define<wbr>Parameters<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides CommandLineAction.onDefineParameters</p>
<ul>
<li>Defined in src/cli/KeyAction.ts:44</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<a name="onexecute" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagProtected">Protected</span> on<wbr>Execute</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<li class="tsd-signature tsd-kind-icon">on<wbr>Execute<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides CommandLineAction.onExecute</p>
<ul>
<li>Defined in src/cli/KeyAction.ts:38</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="renderhelptext" class="tsd-anchor"></a>
<h3>render<wbr>Help<wbr>Text</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">render<wbr>Help<wbr>Text<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#renderhelptext">renderHelpText</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:337</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Generates the command-line help text.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
</ul>
<ul class="current">
<li class="current tsd-kind-class">
<a href="keyaction.html" class="tsd-kind-icon">Key<wbr>Action</a>
<ul>
<li class=" tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
<a href="keyaction.html#constructor" class="tsd-kind-icon">constructor</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="keyaction.html#_generate" class="tsd-kind-icon">_generate</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="keyaction.html#_privkey" class="tsd-kind-icon">_privkey</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="keyaction.html#_pubkey" class="tsd-kind-icon">_pubkey</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#actionname" class="tsd-kind-icon">action<wbr>Name</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#documentation" class="tsd-kind-icon">documentation</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#summary" class="tsd-kind-icon">summary</a>
</li>
<li class=" tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#parameters" class="tsd-kind-icon">parameters</a>
</li>
<li class=" tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#remainder" class="tsd-kind-icon">remainder</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#definechoiceparameter" class="tsd-kind-icon">define<wbr>Choice<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#definecommandlineremainder" class="tsd-kind-icon">define<wbr>Command<wbr>Line<wbr>Remainder</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#defineflagparameter" class="tsd-kind-icon">define<wbr>Flag<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#defineintegerparameter" class="tsd-kind-icon">define<wbr>Integer<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#definestringlistparameter" class="tsd-kind-icon">define<wbr>String<wbr>List<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#definestringparameter" class="tsd-kind-icon">define<wbr>String<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#getchoiceparameter" class="tsd-kind-icon">get<wbr>Choice<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#getflagparameter" class="tsd-kind-icon">get<wbr>Flag<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#getintegerparameter" class="tsd-kind-icon">get<wbr>Integer<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#getstringlistparameter" class="tsd-kind-icon">get<wbr>String<wbr>List<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#getstringparameter" class="tsd-kind-icon">get<wbr>String<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<a href="keyaction.html#ondefineparameters" class="tsd-kind-icon">on<wbr>Define<wbr>Parameters</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<a href="keyaction.html#onexecute" class="tsd-kind-icon">on<wbr>Execute</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="keyaction.html#renderhelptext" class="tsd-kind-icon">render<wbr>Help<wbr>Text</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-class">
<a href="opentokencli.html" class="tsd-kind-icon">Open<wbr>TokenCLI</a>
</li>
<li class=" tsd-kind-class">
<a href="sendaction.html" class="tsd-kind-icon">Send<wbr>Action</a>
</li>
<li class=" tsd-kind-class">
<a href="vaultaction.html" class="tsd-kind-icon">Vault<wbr>Action</a>
</li>
<li class=" tsd-kind-interface">
<a href="../interfaces/otglobalconfig.html" class="tsd-kind-icon">OTGlobal<wbr>Config</a>
</li>
<li class=" tsd-kind-variable">
<a href="../globals.html#commandline" class="tsd-kind-icon">command<wbr>Line</a>
</li>
<li class=" tsd-kind-function">
<a href="../globals.html#delay" class="tsd-kind-icon">delay</a>
</li>
<li class=" tsd-kind-function">
<a href="../globals.html#mkstringcn" class="tsd-kind-icon">mkstringCN</a>
</li>
<li class=" tsd-kind-function">
<a href="../globals.html#shufflearray" class="tsd-kind-icon">shuffle<wbr>Array</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,936 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>SendAction | opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="sendaction.html">SendAction</a>
</li>
</ul>
<h1>Class SendAction</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="tsd-signature-type">CommandLineAction</span>
<ul class="tsd-hierarchy">
<li>
<span class="target">SendAction</span>
</li>
</ul>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Constructors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="sendaction.html#constructor" class="tsd-kind-icon">constructor</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="sendaction.html#_config" class="tsd-kind-icon">_config</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="sendaction.html#_dryrun" class="tsd-kind-icon">_dryrun</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="sendaction.html#_force" class="tsd-kind-icon">_force</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="sendaction.html#_maillist" class="tsd-kind-icon">_maillist</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="sendaction.html#_pubkey" class="tsd-kind-icon">_pubkey</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="sendaction.html#_safe" class="tsd-kind-icon">_safe</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="sendaction.html#_template" class="tsd-kind-icon">_template</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#actionname" class="tsd-kind-icon">action<wbr>Name</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#documentation" class="tsd-kind-icon">documentation</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#summary" class="tsd-kind-icon">summary</a></li>
</ul>
</section>
<section class="tsd-index-section tsd-is-inherited">
<h3>Accessors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#parameters" class="tsd-kind-icon">parameters</a></li>
<li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#remainder" class="tsd-kind-icon">remainder</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#definechoiceparameter" class="tsd-kind-icon">define<wbr>Choice<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#definecommandlineremainder" class="tsd-kind-icon">define<wbr>Command<wbr>Line<wbr>Remainder</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#defineflagparameter" class="tsd-kind-icon">define<wbr>Flag<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#defineintegerparameter" class="tsd-kind-icon">define<wbr>Integer<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#definestringlistparameter" class="tsd-kind-icon">define<wbr>String<wbr>List<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#definestringparameter" class="tsd-kind-icon">define<wbr>String<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#getchoiceparameter" class="tsd-kind-icon">get<wbr>Choice<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#getflagparameter" class="tsd-kind-icon">get<wbr>Flag<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#getintegerparameter" class="tsd-kind-icon">get<wbr>Integer<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#getstringlistparameter" class="tsd-kind-icon">get<wbr>String<wbr>List<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#getstringparameter" class="tsd-kind-icon">get<wbr>String<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="sendaction.html#ondefineparameters" class="tsd-kind-icon">on<wbr>Define<wbr>Parameters</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="sendaction.html#onexecute" class="tsd-kind-icon">on<wbr>Execute</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="sendaction.html#renderhelptext" class="tsd-kind-icon">render<wbr>Help<wbr>Text</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
<a name="constructor" class="tsd-anchor"></a>
<h3>constructor</h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
<li class="tsd-signature tsd-kind-icon">new <wbr>Send<wbr>Action<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="sendaction.html" class="tsd-signature-type">SendAction</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides CommandLineAction.__constructor</p>
<ul>
<li>Defined in src/cli/SendAction.ts:31</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <a href="sendaction.html" class="tsd-signature-type">SendAction</a></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_config" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _config</h3>
<div class="tsd-signature tsd-kind-icon">_config<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineStringParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/SendAction.ts:28</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_dryrun" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _dryrun</h3>
<div class="tsd-signature tsd-kind-icon">_dryrun<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineFlagParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/SendAction.ts:26</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_force" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _force</h3>
<div class="tsd-signature tsd-kind-icon">_force<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineFlagParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/SendAction.ts:25</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_maillist" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _maillist</h3>
<div class="tsd-signature tsd-kind-icon">_maillist<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineStringParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/SendAction.ts:31</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_pubkey" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _pubkey</h3>
<div class="tsd-signature tsd-kind-icon">_pubkey<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineStringParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/SendAction.ts:27</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_safe" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _safe</h3>
<div class="tsd-signature tsd-kind-icon">_safe<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineStringParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/SendAction.ts:29</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_template" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _template</h3>
<div class="tsd-signature tsd-kind-icon">_template<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineStringParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/SendAction.ts:30</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="actionname" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> action<wbr>Name</h3>
<div class="tsd-signature tsd-kind-icon">action<wbr>Name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#actionname">actionName</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:25</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>{@inheritDoc ICommandLineActionOptions.actionName}</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="documentation" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> documentation</h3>
<div class="tsd-signature tsd-kind-icon">documentation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#documentation">documentation</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:29</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>{@inheritDoc ICommandLineActionOptions.documentation}</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="summary" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> summary</h3>
<div class="tsd-signature tsd-kind-icon">summary<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#summary">summary</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:27</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>{@inheritDoc ICommandLineActionOptions.summary}</p>
</div>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-inherited">
<h2>Accessors</h2>
<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<a name="parameters" class="tsd-anchor"></a>
<h3>parameters</h3>
<ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> parameters<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ReadonlyArray</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">CommandLineParameter</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#parameters">parameters</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:229</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns a collection of the parameters that were defined for this object.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">ReadonlyArray</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">CommandLineParameter</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<a name="remainder" class="tsd-anchor"></a>
<h3>remainder</h3>
<ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> remainder<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineRemainder</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#remainder">remainder</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:234</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>If {@link CommandLineParameterProvider.defineCommandLineRemainder} was called,
this object captures any remaining command line arguments after the recognized portion.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineRemainder</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="definechoiceparameter" class="tsd-anchor"></a>
<h3>define<wbr>Choice<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>Choice<wbr>Parameter<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineChoiceDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineChoiceParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#definechoiceparameter">defineChoiceParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:245</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a command-line parameter whose value must be a string from a fixed set of
allowable choices (similar to an enum).</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Example of a choice parameter:</p>
<pre><code><span class="hljs-built_in">example</span>-tool --<span class="hljs-built_in">log</span>-level warn</code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineChoiceDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineChoiceParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="definecommandlineremainder" class="tsd-anchor"></a>
<h3>define<wbr>Command<wbr>Line<wbr>Remainder</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>Command<wbr>Line<wbr>Remainder<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineRemainderDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineRemainder</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#definecommandlineremainder">defineCommandLineRemainder</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:327</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a rule that captures any remaining command line arguments after the recognized portion.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This feature is useful for commands that pass their arguments along to an external tool, relying on
that tool to perform validation. (It could also be used to parse parameters without any validation
or documentation, but that is not recommended.)</p>
<p>Example of capturing the remainder after an optional flag parameter.</p>
<pre><code>example-tool --my-flag <span class="hljs-keyword">this</span> <span class="hljs-keyword">is</span> the remainder</code></pre>
<p>In the &quot;--help&quot; documentation, the remainder rule will be represented as &quot;...&quot;.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineRemainderDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineRemainder</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="defineflagparameter" class="tsd-anchor"></a>
<h3>define<wbr>Flag<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>Flag<wbr>Parameter<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineFlagDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineFlagParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#defineflagparameter">defineFlagParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:262</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a command-line switch whose boolean value is true if the switch is provided,
and false otherwise.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Example usage of a flag parameter:</p>
<pre><code>example-tool <span class="hljs-comment">--debug</span></code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineFlagDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineFlagParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="defineintegerparameter" class="tsd-anchor"></a>
<h3>define<wbr>Integer<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>Integer<wbr>Parameter<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineIntegerDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineIntegerParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#defineintegerparameter">defineIntegerParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:278</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a command-line parameter whose argument is an integer.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Example usage of an integer parameter:</p>
<pre><code><span class="hljs-built_in">example</span>-tool --<span class="hljs-built_in">max</span>-attempts <span class="hljs-number">5</span></code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineIntegerDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineIntegerParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="definestringlistparameter" class="tsd-anchor"></a>
<h3>define<wbr>String<wbr>List<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>String<wbr>List<wbr>Parameter<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineStringListDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineStringListParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#definestringlistparameter">defineStringListParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:311</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a command-line parameter whose argument is a single text string. The parameter can be
specified multiple times to build a list.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Example usage of a string list parameter:</p>
<pre><code>example-tool --<span class="hljs-builtin-name">add</span> file1.txt --<span class="hljs-builtin-name">add</span> file2.txt --<span class="hljs-builtin-name">add</span> file3.txt</code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineStringListDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineStringListParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="definestringparameter" class="tsd-anchor"></a>
<h3>define<wbr>String<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>String<wbr>Parameter<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineStringDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineStringParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#definestringparameter">defineStringParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:294</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a command-line parameter whose argument is a single text string.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Example usage of a string parameter:</p>
<pre><code>example-tool --<span class="hljs-keyword">message</span> <span class="hljs-string">&quot;Hello, world!&quot;</span></code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineStringDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineStringParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="getchoiceparameter" class="tsd-anchor"></a>
<h3>get<wbr>Choice<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">get<wbr>Choice<wbr>Parameter<span class="tsd-signature-symbol">(</span>parameterLongName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineChoiceParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#getchoiceparameter">getChoiceParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:251</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the CommandLineChoiceParameter with the specified long name.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This method throws an exception if the parameter is not defined.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>parameterLongName: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineChoiceParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="getflagparameter" class="tsd-anchor"></a>
<h3>get<wbr>Flag<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">get<wbr>Flag<wbr>Parameter<span class="tsd-signature-symbol">(</span>parameterLongName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineFlagParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#getflagparameter">getFlagParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:268</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the CommandLineFlagParameter with the specified long name.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This method throws an exception if the parameter is not defined.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>parameterLongName: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineFlagParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="getintegerparameter" class="tsd-anchor"></a>
<h3>get<wbr>Integer<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">get<wbr>Integer<wbr>Parameter<span class="tsd-signature-symbol">(</span>parameterLongName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineIntegerParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#getintegerparameter">getIntegerParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:284</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the CommandLineIntegerParameter with the specified long name.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This method throws an exception if the parameter is not defined.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>parameterLongName: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineIntegerParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="getstringlistparameter" class="tsd-anchor"></a>
<h3>get<wbr>String<wbr>List<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">get<wbr>String<wbr>List<wbr>Parameter<span class="tsd-signature-symbol">(</span>parameterLongName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineStringListParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#getstringlistparameter">getStringListParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:333</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the CommandLineStringListParameter with the specified long name.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This method throws an exception if the parameter is not defined.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>parameterLongName: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineStringListParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="getstringparameter" class="tsd-anchor"></a>
<h3>get<wbr>String<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">get<wbr>String<wbr>Parameter<span class="tsd-signature-symbol">(</span>parameterLongName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineStringParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#getstringparameter">getStringParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:300</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the CommandLineStringParameter with the specified long name.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This method throws an exception if the parameter is not defined.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>parameterLongName: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineStringParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<a name="ondefineparameters" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagProtected">Protected</span> on<wbr>Define<wbr>Parameters</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<li class="tsd-signature tsd-kind-icon">on<wbr>Define<wbr>Parameters<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides CommandLineAction.onDefineParameters</p>
<ul>
<li>Defined in src/cli/SendAction.ts:55</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<a name="onexecute" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagProtected">Protected</span> on<wbr>Execute</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<li class="tsd-signature tsd-kind-icon">on<wbr>Execute<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides CommandLineAction.onExecute</p>
<ul>
<li>Defined in src/cli/SendAction.ts:41</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="renderhelptext" class="tsd-anchor"></a>
<h3>render<wbr>Help<wbr>Text</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">render<wbr>Help<wbr>Text<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#renderhelptext">renderHelpText</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:337</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Generates the command-line help text.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-class">
<a href="keyaction.html" class="tsd-kind-icon">Key<wbr>Action</a>
</li>
<li class=" tsd-kind-class">
<a href="opentokencli.html" class="tsd-kind-icon">Open<wbr>TokenCLI</a>
</li>
</ul>
<ul class="current">
<li class="current tsd-kind-class">
<a href="sendaction.html" class="tsd-kind-icon">Send<wbr>Action</a>
<ul>
<li class=" tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
<a href="sendaction.html#constructor" class="tsd-kind-icon">constructor</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="sendaction.html#_config" class="tsd-kind-icon">_config</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="sendaction.html#_dryrun" class="tsd-kind-icon">_dryrun</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="sendaction.html#_force" class="tsd-kind-icon">_force</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="sendaction.html#_maillist" class="tsd-kind-icon">_maillist</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="sendaction.html#_pubkey" class="tsd-kind-icon">_pubkey</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="sendaction.html#_safe" class="tsd-kind-icon">_safe</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="sendaction.html#_template" class="tsd-kind-icon">_template</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#actionname" class="tsd-kind-icon">action<wbr>Name</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#documentation" class="tsd-kind-icon">documentation</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#summary" class="tsd-kind-icon">summary</a>
</li>
<li class=" tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#parameters" class="tsd-kind-icon">parameters</a>
</li>
<li class=" tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#remainder" class="tsd-kind-icon">remainder</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#definechoiceparameter" class="tsd-kind-icon">define<wbr>Choice<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#definecommandlineremainder" class="tsd-kind-icon">define<wbr>Command<wbr>Line<wbr>Remainder</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#defineflagparameter" class="tsd-kind-icon">define<wbr>Flag<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#defineintegerparameter" class="tsd-kind-icon">define<wbr>Integer<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#definestringlistparameter" class="tsd-kind-icon">define<wbr>String<wbr>List<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#definestringparameter" class="tsd-kind-icon">define<wbr>String<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#getchoiceparameter" class="tsd-kind-icon">get<wbr>Choice<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#getflagparameter" class="tsd-kind-icon">get<wbr>Flag<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#getintegerparameter" class="tsd-kind-icon">get<wbr>Integer<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#getstringlistparameter" class="tsd-kind-icon">get<wbr>String<wbr>List<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#getstringparameter" class="tsd-kind-icon">get<wbr>String<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<a href="sendaction.html#ondefineparameters" class="tsd-kind-icon">on<wbr>Define<wbr>Parameters</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<a href="sendaction.html#onexecute" class="tsd-kind-icon">on<wbr>Execute</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="sendaction.html#renderhelptext" class="tsd-kind-icon">render<wbr>Help<wbr>Text</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-class">
<a href="vaultaction.html" class="tsd-kind-icon">Vault<wbr>Action</a>
</li>
<li class=" tsd-kind-interface">
<a href="../interfaces/otglobalconfig.html" class="tsd-kind-icon">OTGlobal<wbr>Config</a>
</li>
<li class=" tsd-kind-variable">
<a href="../globals.html#commandline" class="tsd-kind-icon">command<wbr>Line</a>
</li>
<li class=" tsd-kind-function">
<a href="../globals.html#delay" class="tsd-kind-icon">delay</a>
</li>
<li class=" tsd-kind-function">
<a href="../globals.html#mkstringcn" class="tsd-kind-icon">mkstringCN</a>
</li>
<li class=" tsd-kind-function">
<a href="../globals.html#shufflearray" class="tsd-kind-icon">shuffle<wbr>Array</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>

View File

@@ -0,0 +1,743 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>SecureVault | opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="../modules/svault.html">SVault</a>
</li>
<li>
<a href="svault.securevault.html">SecureVault</a>
</li>
</ul>
<h1>Class SecureVault</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Class representing a SecureVault.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">SecureVault</span>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Constructors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="svault.securevault.html#constructor" class="tsd-kind-icon">constructor</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-class"><a href="svault.securevault.html#privpath" class="tsd-kind-icon">priv<wbr>Path</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="svault.securevault.html#pubpath" class="tsd-kind-icon">pub<wbr>Path</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="svault.securevault.html#safe" class="tsd-kind-icon">safe</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="svault.securevault.html#storage" class="tsd-kind-icon">storage</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#clearvault" class="tsd-kind-icon">clear<wbr>Vault</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#decryptdata" class="tsd-kind-icon">decrypt<wbr>Data</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#findstorage" class="tsd-kind-icon">find<wbr>Storage</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#getallstorage" class="tsd-kind-icon">get<wbr>All<wbr>Storage</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#getstorage" class="tsd-kind-icon">get<wbr>Storage</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#loaddata" class="tsd-kind-icon">load<wbr>Data</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#pushdata" class="tsd-kind-icon">push<wbr>Data</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#pushstorage" class="tsd-kind-icon">push<wbr>Storage</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#savedata" class="tsd-kind-icon">save<wbr>Data</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#setstorage" class="tsd-kind-icon">set<wbr>Storage</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#writetransaction" class="tsd-kind-icon">write<wbr>Transaction</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="svault.securevault.html#genkey" class="tsd-kind-icon">gen<wbr>Key</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class">
<a name="constructor" class="tsd-anchor"></a>
<h3>constructor</h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">new <wbr>Secure<wbr>Vault<span class="tsd-signature-symbol">(</span>publicKey<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span>, privateKey<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="svault.securevault.html" class="tsd-signature-type">SecureVault</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:76</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Create a SecureVault.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> publicKey: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Path to public key.</p>
</div>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> privateKey: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Path to private key.</p>
</div>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="svault.securevault.html" class="tsd-signature-type">SecureVault</a></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="privpath" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> priv<wbr>Path</h3>
<div class="tsd-signature tsd-kind-icon">priv<wbr>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:72</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Path to private key</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="pubpath" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> pub<wbr>Path</h3>
<div class="tsd-signature tsd-kind-icon">pub<wbr>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:74</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Path to public key</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="safe" class="tsd-anchor"></a>
<h3>safe</h3>
<div class="tsd-signature tsd-kind-icon">safe<span class="tsd-signature-symbol">:</span> <a href="../interfaces/svault.securevaultlist.html" class="tsd-signature-type">secureVaultList</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:70</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Safe object</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="storage" class="tsd-anchor"></a>
<h3>storage</h3>
<div class="tsd-signature tsd-kind-icon">storage<span class="tsd-signature-symbol">:</span> <a href="../interfaces/svault.storageitem.html" class="tsd-signature-type">StorageItem</a><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:76</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Array of unencrypted items</p>
</div>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="clearvault" class="tsd-anchor"></a>
<h3>clear<wbr>Vault</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">clear<wbr>Vault<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:303</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Clears all encrypted items from safe.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="decryptdata" class="tsd-anchor"></a>
<h3>decrypt<wbr>Data</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">decrypt<wbr>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/svault.securevaultitem.html" class="tsd-signature-type">SecureVaultItem</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:175</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Decrypts safe data.
Requires specified and loaded private key.
Prints data to console.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/svault.securevaultitem.html" class="tsd-signature-type">SecureVaultItem</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>Resolves promise after decrypted</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="findstorage" class="tsd-anchor"></a>
<h3>find<wbr>Storage</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">find<wbr>Storage<span class="tsd-signature-symbol">(</span>tag<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/svault.storageitem.html" class="tsd-signature-type">StorageItem</a><span class="tsd-signature-symbol">[]</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:292</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Gets list of UUIDs matching the tag.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>tag: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>tag to search for</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="../interfaces/svault.storageitem.html" class="tsd-signature-type">StorageItem</a><span class="tsd-signature-symbol">[]</span></h4>
<p>UUID from item.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="getallstorage" class="tsd-anchor"></a>
<h3>get<wbr>All<wbr>Storage</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">get<wbr>All<wbr>Storage<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/svault.storageitem.html" class="tsd-signature-type">StorageItem</a><span class="tsd-signature-symbol">[]</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:270</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Gets all unencrypted data as array.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <a href="../interfaces/svault.storageitem.html" class="tsd-signature-type">StorageItem</a><span class="tsd-signature-symbol">[]</span></h4>
<p>Data from item.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="getstorage" class="tsd-anchor"></a>
<h3>get<wbr>Storage</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">get<wbr>Storage<span class="tsd-signature-symbol">(</span>suuid<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:256</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Gets unencrypted data of item specified by suuid.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>suuid: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>UUID for item</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
<p>Data from item.</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="loaddata" class="tsd-anchor"></a>
<h3>load<wbr>Data</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">load<wbr>Data<span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:153</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Loads safe from file and check compatibility</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>path: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>Path to safefile.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>Resolves promise after loaded</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="pushdata" class="tsd-anchor"></a>
<h3>push<wbr>Data</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">push<wbr>Data<span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:100</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Encrypts and appends data to SecureVault.
Also writes data to transaction log using @function writeTransaction</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>data: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>Path to public key.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>Returns the uuid of the added object as promise</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="pushstorage" class="tsd-anchor"></a>
<h3>push<wbr>Storage</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">push<wbr>Storage<span class="tsd-signature-symbol">(</span>tag<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:222</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Appends unencrypted data to safe.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>tag: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>Tag for item</p>
</div>
</li>
<li>
<h5>data: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>Data to store.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="savedata" class="tsd-anchor"></a>
<h3>save<wbr>Data</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">save<wbr>Data<span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:140</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Saves safe to file</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>path: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>Path to safefile.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>Resolves promise after loaded</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="setstorage" class="tsd-anchor"></a>
<h3>set<wbr>Storage</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">set<wbr>Storage<span class="tsd-signature-symbol">(</span>suuid<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:241</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Sets unencrypted data for item specified by suuid.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>suuid: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>UUID for item</p>
</div>
</li>
<li>
<h5>data: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>Data to store.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="writetransaction" class="tsd-anchor"></a>
<h3>write<wbr>Transaction</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">write<wbr>Transaction<span class="tsd-signature-symbol">(</span>payload<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:131</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Writes data to the vault log file located at ./vault.log</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>payload: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>Text to append</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static">
<a name="genkey" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> gen<wbr>Key</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static">
<li class="tsd-signature tsd-kind-icon">gen<wbr>Key<span class="tsd-signature-symbol">(</span>publicKeyDir<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, privateKeyDir<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:200</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Generates RSA keypair.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>publicKeyDir: <span class="tsd-signature-type">string</span></h5>
</li>
<li>
<h5>privateKeyDir: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mlgenerator.html">MLGenerator</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_key.html">MLLogic_<wbr><wbr>Key</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_send.html">MLLogic_<wbr><wbr>Send</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_vault.html">MLLogic_<wbr><wbr>Vault</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mlparser.html">MLParser</a>
</li>
<li class="current tsd-kind-namespace">
<a href="../modules/svault.html">SVault</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
</ul>
<ul class="current">
<li class="current tsd-kind-class tsd-parent-kind-namespace">
<a href="svault.securevault.html" class="tsd-kind-icon">Secure<wbr>Vault</a>
<ul>
<li class=" tsd-kind-constructor tsd-parent-kind-class">
<a href="svault.securevault.html#constructor" class="tsd-kind-icon">constructor</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="svault.securevault.html#privpath" class="tsd-kind-icon">priv<wbr>Path</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="svault.securevault.html#pubpath" class="tsd-kind-icon">pub<wbr>Path</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="svault.securevault.html#safe" class="tsd-kind-icon">safe</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="svault.securevault.html#storage" class="tsd-kind-icon">storage</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="svault.securevault.html#clearvault" class="tsd-kind-icon">clear<wbr>Vault</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="svault.securevault.html#decryptdata" class="tsd-kind-icon">decrypt<wbr>Data</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="svault.securevault.html#findstorage" class="tsd-kind-icon">find<wbr>Storage</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="svault.securevault.html#getallstorage" class="tsd-kind-icon">get<wbr>All<wbr>Storage</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="svault.securevault.html#getstorage" class="tsd-kind-icon">get<wbr>Storage</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="svault.securevault.html#loaddata" class="tsd-kind-icon">load<wbr>Data</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="svault.securevault.html#pushdata" class="tsd-kind-icon">push<wbr>Data</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="svault.securevault.html#pushstorage" class="tsd-kind-icon">push<wbr>Storage</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="svault.securevault.html#savedata" class="tsd-kind-icon">save<wbr>Data</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="svault.securevault.html#setstorage" class="tsd-kind-icon">set<wbr>Storage</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="svault.securevault.html#writetransaction" class="tsd-kind-icon">write<wbr>Transaction</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static">
<a href="svault.securevault.html#genkey" class="tsd-kind-icon">gen<wbr>Key</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
<a href="../interfaces/svault.securevaultitem.html" class="tsd-kind-icon">Secure<wbr>Vault<wbr>Item</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
<a href="../interfaces/svault.storageitem.html" class="tsd-kind-icon">Storage<wbr>Item</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
<a href="../interfaces/svault.securevaultlist.html" class="tsd-kind-icon">secure<wbr>Vault<wbr>List</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported">
<a href="../modules/svault.html#vaultversion" class="tsd-kind-icon">vault<wbr>Version</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>

View File

@@ -0,0 +1,936 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>VaultAction | opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="vaultaction.html">VaultAction</a>
</li>
</ul>
<h1>Class VaultAction</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="tsd-signature-type">CommandLineAction</span>
<ul class="tsd-hierarchy">
<li>
<span class="target">VaultAction</span>
</li>
</ul>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Constructors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="vaultaction.html#constructor" class="tsd-kind-icon">constructor</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="vaultaction.html#_filter" class="tsd-kind-icon">_filter</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="vaultaction.html#_format" class="tsd-kind-icon">_format</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="vaultaction.html#_getcodes" class="tsd-kind-icon">_get<wbr>Codes</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="vaultaction.html#_privkey" class="tsd-kind-icon">_privkey</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="vaultaction.html#_pubkey" class="tsd-kind-icon">_pubkey</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="vaultaction.html#_revoke" class="tsd-kind-icon">_revoke</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="vaultaction.html#_safe" class="tsd-kind-icon">_safe</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#actionname" class="tsd-kind-icon">action<wbr>Name</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#documentation" class="tsd-kind-icon">documentation</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#summary" class="tsd-kind-icon">summary</a></li>
</ul>
</section>
<section class="tsd-index-section tsd-is-inherited">
<h3>Accessors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#parameters" class="tsd-kind-icon">parameters</a></li>
<li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#remainder" class="tsd-kind-icon">remainder</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#definechoiceparameter" class="tsd-kind-icon">define<wbr>Choice<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#definecommandlineremainder" class="tsd-kind-icon">define<wbr>Command<wbr>Line<wbr>Remainder</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#defineflagparameter" class="tsd-kind-icon">define<wbr>Flag<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#defineintegerparameter" class="tsd-kind-icon">define<wbr>Integer<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#definestringlistparameter" class="tsd-kind-icon">define<wbr>String<wbr>List<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#definestringparameter" class="tsd-kind-icon">define<wbr>String<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#getchoiceparameter" class="tsd-kind-icon">get<wbr>Choice<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#getflagparameter" class="tsd-kind-icon">get<wbr>Flag<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#getintegerparameter" class="tsd-kind-icon">get<wbr>Integer<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#getstringlistparameter" class="tsd-kind-icon">get<wbr>String<wbr>List<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#getstringparameter" class="tsd-kind-icon">get<wbr>String<wbr>Parameter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="vaultaction.html#ondefineparameters" class="tsd-kind-icon">on<wbr>Define<wbr>Parameters</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="vaultaction.html#onexecute" class="tsd-kind-icon">on<wbr>Execute</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="vaultaction.html#renderhelptext" class="tsd-kind-icon">render<wbr>Help<wbr>Text</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
<a name="constructor" class="tsd-anchor"></a>
<h3>constructor</h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
<li class="tsd-signature tsd-kind-icon">new <wbr>Vault<wbr>Action<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="vaultaction.html" class="tsd-signature-type">VaultAction</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides CommandLineAction.__constructor</p>
<ul>
<li>Defined in src/cli/VaultAction.ts:31</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <a href="vaultaction.html" class="tsd-signature-type">VaultAction</a></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_filter" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _filter</h3>
<div class="tsd-signature tsd-kind-icon">_filter<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineChoiceParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/VaultAction.ts:25</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_format" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _format</h3>
<div class="tsd-signature tsd-kind-icon">_format<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineChoiceParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/VaultAction.ts:30</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_getcodes" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _get<wbr>Codes</h3>
<div class="tsd-signature tsd-kind-icon">_get<wbr>Codes<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineFlagParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/VaultAction.ts:29</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_privkey" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _privkey</h3>
<div class="tsd-signature tsd-kind-icon">_privkey<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineStringParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/VaultAction.ts:27</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_pubkey" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _pubkey</h3>
<div class="tsd-signature tsd-kind-icon">_pubkey<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineStringParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/VaultAction.ts:26</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_revoke" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _revoke</h3>
<div class="tsd-signature tsd-kind-icon">_revoke<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineStringParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/VaultAction.ts:31</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="_safe" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _safe</h3>
<div class="tsd-signature tsd-kind-icon">_safe<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CommandLineStringParameter</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/cli/VaultAction.ts:28</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="actionname" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> action<wbr>Name</h3>
<div class="tsd-signature tsd-kind-icon">action<wbr>Name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#actionname">actionName</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:25</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>{@inheritDoc ICommandLineActionOptions.actionName}</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="documentation" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> documentation</h3>
<div class="tsd-signature tsd-kind-icon">documentation<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#documentation">documentation</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:29</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>{@inheritDoc ICommandLineActionOptions.documentation}</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="summary" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> summary</h3>
<div class="tsd-signature tsd-kind-icon">summary<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#summary">summary</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:27</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>{@inheritDoc ICommandLineActionOptions.summary}</p>
</div>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-inherited">
<h2>Accessors</h2>
<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<a name="parameters" class="tsd-anchor"></a>
<h3>parameters</h3>
<ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> parameters<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ReadonlyArray</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">CommandLineParameter</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#parameters">parameters</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:229</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns a collection of the parameters that were defined for this object.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">ReadonlyArray</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">CommandLineParameter</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<a name="remainder" class="tsd-anchor"></a>
<h3>remainder</h3>
<ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> remainder<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineRemainder</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#remainder">remainder</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:234</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>If {@link CommandLineParameterProvider.defineCommandLineRemainder} was called,
this object captures any remaining command line arguments after the recognized portion.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineRemainder</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="definechoiceparameter" class="tsd-anchor"></a>
<h3>define<wbr>Choice<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>Choice<wbr>Parameter<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineChoiceDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineChoiceParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#definechoiceparameter">defineChoiceParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:245</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a command-line parameter whose value must be a string from a fixed set of
allowable choices (similar to an enum).</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Example of a choice parameter:</p>
<pre><code><span class="hljs-built_in">example</span>-tool --<span class="hljs-built_in">log</span>-level warn</code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineChoiceDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineChoiceParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="definecommandlineremainder" class="tsd-anchor"></a>
<h3>define<wbr>Command<wbr>Line<wbr>Remainder</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>Command<wbr>Line<wbr>Remainder<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineRemainderDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineRemainder</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#definecommandlineremainder">defineCommandLineRemainder</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:327</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a rule that captures any remaining command line arguments after the recognized portion.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This feature is useful for commands that pass their arguments along to an external tool, relying on
that tool to perform validation. (It could also be used to parse parameters without any validation
or documentation, but that is not recommended.)</p>
<p>Example of capturing the remainder after an optional flag parameter.</p>
<pre><code>example-tool --my-flag <span class="hljs-keyword">this</span> <span class="hljs-keyword">is</span> the remainder</code></pre>
<p>In the &quot;--help&quot; documentation, the remainder rule will be represented as &quot;...&quot;.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineRemainderDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineRemainder</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="defineflagparameter" class="tsd-anchor"></a>
<h3>define<wbr>Flag<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>Flag<wbr>Parameter<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineFlagDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineFlagParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#defineflagparameter">defineFlagParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:262</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a command-line switch whose boolean value is true if the switch is provided,
and false otherwise.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Example usage of a flag parameter:</p>
<pre><code>example-tool <span class="hljs-comment">--debug</span></code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineFlagDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineFlagParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="defineintegerparameter" class="tsd-anchor"></a>
<h3>define<wbr>Integer<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>Integer<wbr>Parameter<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineIntegerDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineIntegerParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#defineintegerparameter">defineIntegerParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:278</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a command-line parameter whose argument is an integer.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Example usage of an integer parameter:</p>
<pre><code><span class="hljs-built_in">example</span>-tool --<span class="hljs-built_in">max</span>-attempts <span class="hljs-number">5</span></code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineIntegerDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineIntegerParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="definestringlistparameter" class="tsd-anchor"></a>
<h3>define<wbr>String<wbr>List<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>String<wbr>List<wbr>Parameter<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineStringListDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineStringListParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#definestringlistparameter">defineStringListParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:311</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a command-line parameter whose argument is a single text string. The parameter can be
specified multiple times to build a list.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Example usage of a string list parameter:</p>
<pre><code>example-tool --<span class="hljs-builtin-name">add</span> file1.txt --<span class="hljs-builtin-name">add</span> file2.txt --<span class="hljs-builtin-name">add</span> file3.txt</code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineStringListDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineStringListParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="definestringparameter" class="tsd-anchor"></a>
<h3>define<wbr>String<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">define<wbr>String<wbr>Parameter<span class="tsd-signature-symbol">(</span>definition<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ICommandLineStringDefinition</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineStringParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#definestringparameter">defineStringParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:294</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Defines a command-line parameter whose argument is a single text string.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Example usage of a string parameter:</p>
<pre><code>example-tool --<span class="hljs-keyword">message</span> <span class="hljs-string">&quot;Hello, world!&quot;</span></code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>definition: <span class="tsd-signature-type">ICommandLineStringDefinition</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineStringParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="getchoiceparameter" class="tsd-anchor"></a>
<h3>get<wbr>Choice<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">get<wbr>Choice<wbr>Parameter<span class="tsd-signature-symbol">(</span>parameterLongName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineChoiceParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#getchoiceparameter">getChoiceParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:251</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the CommandLineChoiceParameter with the specified long name.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This method throws an exception if the parameter is not defined.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>parameterLongName: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineChoiceParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="getflagparameter" class="tsd-anchor"></a>
<h3>get<wbr>Flag<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">get<wbr>Flag<wbr>Parameter<span class="tsd-signature-symbol">(</span>parameterLongName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineFlagParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#getflagparameter">getFlagParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:268</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the CommandLineFlagParameter with the specified long name.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This method throws an exception if the parameter is not defined.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>parameterLongName: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineFlagParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="getintegerparameter" class="tsd-anchor"></a>
<h3>get<wbr>Integer<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">get<wbr>Integer<wbr>Parameter<span class="tsd-signature-symbol">(</span>parameterLongName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineIntegerParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#getintegerparameter">getIntegerParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:284</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the CommandLineIntegerParameter with the specified long name.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This method throws an exception if the parameter is not defined.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>parameterLongName: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineIntegerParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="getstringlistparameter" class="tsd-anchor"></a>
<h3>get<wbr>String<wbr>List<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">get<wbr>String<wbr>List<wbr>Parameter<span class="tsd-signature-symbol">(</span>parameterLongName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineStringListParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#getstringlistparameter">getStringListParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:333</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the CommandLineStringListParameter with the specified long name.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This method throws an exception if the parameter is not defined.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>parameterLongName: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineStringListParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="getstringparameter" class="tsd-anchor"></a>
<h3>get<wbr>String<wbr>Parameter</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">get<wbr>String<wbr>Parameter<span class="tsd-signature-symbol">(</span>parameterLongName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CommandLineStringParameter</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#getstringparameter">getStringParameter</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:300</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the CommandLineStringParameter with the specified long name.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>This method throws an exception if the parameter is not defined.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>parameterLongName: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">CommandLineStringParameter</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<a name="ondefineparameters" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagProtected">Protected</span> on<wbr>Define<wbr>Parameters</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<li class="tsd-signature tsd-kind-icon">on<wbr>Define<wbr>Parameters<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides CommandLineAction.onDefineParameters</p>
<ul>
<li>Defined in src/cli/VaultAction.ts:55</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<a name="onexecute" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagProtected">Protected</span> on<wbr>Execute</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<li class="tsd-signature tsd-kind-icon">on<wbr>Execute<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides CommandLineAction.onExecute</p>
<ul>
<li>Defined in src/cli/VaultAction.ts:41</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="renderhelptext" class="tsd-anchor"></a>
<h3>render<wbr>Help<wbr>Text</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">render<wbr>Help<wbr>Text<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="keyaction.html">KeyAction</a>.<a href="keyaction.html#renderhelptext">renderHelpText</a></p>
<ul>
<li>Defined in node_modules/@rushstack/ts-command-line/dist/ts-command-line.d.ts:337</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Generates the command-line help text.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-class">
<a href="keyaction.html" class="tsd-kind-icon">Key<wbr>Action</a>
</li>
<li class=" tsd-kind-class">
<a href="opentokencli.html" class="tsd-kind-icon">Open<wbr>TokenCLI</a>
</li>
<li class=" tsd-kind-class">
<a href="sendaction.html" class="tsd-kind-icon">Send<wbr>Action</a>
</li>
</ul>
<ul class="current">
<li class="current tsd-kind-class">
<a href="vaultaction.html" class="tsd-kind-icon">Vault<wbr>Action</a>
<ul>
<li class=" tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
<a href="vaultaction.html#constructor" class="tsd-kind-icon">constructor</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="vaultaction.html#_filter" class="tsd-kind-icon">_filter</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="vaultaction.html#_format" class="tsd-kind-icon">_format</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="vaultaction.html#_getcodes" class="tsd-kind-icon">_get<wbr>Codes</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="vaultaction.html#_privkey" class="tsd-kind-icon">_privkey</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="vaultaction.html#_pubkey" class="tsd-kind-icon">_pubkey</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="vaultaction.html#_revoke" class="tsd-kind-icon">_revoke</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a href="vaultaction.html#_safe" class="tsd-kind-icon">_safe</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#actionname" class="tsd-kind-icon">action<wbr>Name</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#documentation" class="tsd-kind-icon">documentation</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#summary" class="tsd-kind-icon">summary</a>
</li>
<li class=" tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#parameters" class="tsd-kind-icon">parameters</a>
</li>
<li class=" tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#remainder" class="tsd-kind-icon">remainder</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#definechoiceparameter" class="tsd-kind-icon">define<wbr>Choice<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#definecommandlineremainder" class="tsd-kind-icon">define<wbr>Command<wbr>Line<wbr>Remainder</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#defineflagparameter" class="tsd-kind-icon">define<wbr>Flag<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#defineintegerparameter" class="tsd-kind-icon">define<wbr>Integer<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#definestringlistparameter" class="tsd-kind-icon">define<wbr>String<wbr>List<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#definestringparameter" class="tsd-kind-icon">define<wbr>String<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#getchoiceparameter" class="tsd-kind-icon">get<wbr>Choice<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#getflagparameter" class="tsd-kind-icon">get<wbr>Flag<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#getintegerparameter" class="tsd-kind-icon">get<wbr>Integer<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#getstringlistparameter" class="tsd-kind-icon">get<wbr>String<wbr>List<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#getstringparameter" class="tsd-kind-icon">get<wbr>String<wbr>Parameter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<a href="vaultaction.html#ondefineparameters" class="tsd-kind-icon">on<wbr>Define<wbr>Parameters</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
<a href="vaultaction.html#onexecute" class="tsd-kind-icon">on<wbr>Execute</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="vaultaction.html#renderhelptext" class="tsd-kind-icon">render<wbr>Help<wbr>Text</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-interface">
<a href="../interfaces/otglobalconfig.html" class="tsd-kind-icon">OTGlobal<wbr>Config</a>
</li>
<li class=" tsd-kind-variable">
<a href="../globals.html#commandline" class="tsd-kind-icon">command<wbr>Line</a>
</li>
<li class=" tsd-kind-function">
<a href="../globals.html#delay" class="tsd-kind-icon">delay</a>
</li>
<li class=" tsd-kind-function">
<a href="../globals.html#mkstringcn" class="tsd-kind-icon">mkstringCN</a>
</li>
<li class=" tsd-kind-function">
<a href="../globals.html#shufflearray" class="tsd-kind-icon">shuffle<wbr>Array</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>

314
docs/globals.html Normal file
View File

@@ -0,0 +1,314 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="assets/js/search.json" data-base=".">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="globals.html">Globals</a>
</li>
</ul>
<h1>opentoken</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Namespaces</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-namespace"><a href="modules/mlgenerator.html" class="tsd-kind-icon">MLGenerator</a></li>
<li class="tsd-kind-namespace"><a href="modules/mllogic_key.html" class="tsd-kind-icon">MLLogic_<wbr><wbr>Key</a></li>
<li class="tsd-kind-namespace"><a href="modules/mllogic_send.html" class="tsd-kind-icon">MLLogic_<wbr><wbr>Send</a></li>
<li class="tsd-kind-namespace"><a href="modules/mllogic_vault.html" class="tsd-kind-icon">MLLogic_<wbr><wbr>Vault</a></li>
<li class="tsd-kind-namespace"><a href="modules/mlparser.html" class="tsd-kind-icon">MLParser</a></li>
<li class="tsd-kind-namespace"><a href="modules/svault.html" class="tsd-kind-icon">SVault</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Classes</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-class"><a href="classes/keyaction.html" class="tsd-kind-icon">Key<wbr>Action</a></li>
<li class="tsd-kind-class"><a href="classes/opentokencli.html" class="tsd-kind-icon">Open<wbr>TokenCLI</a></li>
<li class="tsd-kind-class"><a href="classes/sendaction.html" class="tsd-kind-icon">Send<wbr>Action</a></li>
<li class="tsd-kind-class"><a href="classes/vaultaction.html" class="tsd-kind-icon">Vault<wbr>Action</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Interfaces</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-interface"><a href="interfaces/otglobalconfig.html" class="tsd-kind-icon">OTGlobal<wbr>Config</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Variables</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-variable"><a href="globals.html#commandline" class="tsd-kind-icon">command<wbr>Line</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Functions</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-function"><a href="globals.html#delay" class="tsd-kind-icon">delay</a></li>
<li class="tsd-kind-function"><a href="globals.html#mkstringcn" class="tsd-kind-icon">mkstringCN</a></li>
<li class="tsd-kind-function"><a href="globals.html#shufflearray" class="tsd-kind-icon">shuffle<wbr>Array</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Variables</h2>
<section class="tsd-panel tsd-member tsd-kind-variable">
<a name="commandline" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagConst">Const</span> command<wbr>Line</h3>
<div class="tsd-signature tsd-kind-icon">command<wbr>Line<span class="tsd-signature-symbol">:</span> <a href="classes/opentokencli.html" class="tsd-signature-type">OpenTokenCLI</a><span class="tsd-signature-symbol"> = new OpenTokenCLI()</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in index.ts:25</li>
</ul>
</aside>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Functions</h2>
<section class="tsd-panel tsd-member tsd-kind-function">
<a name="delay" class="tsd-anchor"></a>
<h3>delay</h3>
<ul class="tsd-signatures tsd-kind-function">
<li class="tsd-signature tsd-kind-icon">delay<span class="tsd-signature-symbol">(</span>t<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/util/misc.ts:44</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Wraps setTimeout into Promise</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>t: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>Millisceonds</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function">
<a name="mkstringcn" class="tsd-anchor"></a>
<h3>mkstringCN</h3>
<ul class="tsd-signatures tsd-kind-function">
<li class="tsd-signature tsd-kind-icon">mkstringCN<span class="tsd-signature-symbol">(</span>length<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/util/misc.ts:30</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Generate random string with specified length.
Generates only numbers and capital letters.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>length: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
<p>length of String</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<p>generated string</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function">
<a name="shufflearray" class="tsd-anchor"></a>
<h3>shuffle<wbr>Array</h3>
<ul class="tsd-signatures tsd-kind-function">
<li class="tsd-signature tsd-kind-icon">shuffle<wbr>Array<span class="tsd-signature-symbol">(</span>array<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/util/shuffle.ts:5</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Randomize items in an array</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>array: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h5>
<div class="tsd-comment tsd-typography">
<p>Array to be shuffeled</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals current ">
<a href="globals.html"><em>Globals</em></a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/mlgenerator.html">MLGenerator</a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/mllogic_key.html">MLLogic_<wbr><wbr>Key</a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/mllogic_send.html">MLLogic_<wbr><wbr>Send</a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/mllogic_vault.html">MLLogic_<wbr><wbr>Vault</a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/mlparser.html">MLParser</a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/svault.html">SVault</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-class">
<a href="classes/keyaction.html" class="tsd-kind-icon">Key<wbr>Action</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/opentokencli.html" class="tsd-kind-icon">Open<wbr>TokenCLI</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/sendaction.html" class="tsd-kind-icon">Send<wbr>Action</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/vaultaction.html" class="tsd-kind-icon">Vault<wbr>Action</a>
</li>
<li class=" tsd-kind-interface">
<a href="interfaces/otglobalconfig.html" class="tsd-kind-icon">OTGlobal<wbr>Config</a>
</li>
<li class=" tsd-kind-variable">
<a href="globals.html#commandline" class="tsd-kind-icon">command<wbr>Line</a>
</li>
<li class=" tsd-kind-function">
<a href="globals.html#delay" class="tsd-kind-icon">delay</a>
</li>
<li class=" tsd-kind-function">
<a href="globals.html#mkstringcn" class="tsd-kind-icon">mkstringCN</a>
</li>
<li class=" tsd-kind-function">
<a href="globals.html#shufflearray" class="tsd-kind-icon">shuffle<wbr>Array</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="assets/js/main.js"></script>
</body>
</html>

326
docs/index.html Normal file
View File

@@ -0,0 +1,326 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="assets/js/search.json" data-base=".">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="globals.html">Globals</a>
</li>
</ul>
<h1>opentoken</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<div class="tsd-panel tsd-typography">
<a href="#one-time-codejs" id="one-time-codejs" style="color: inherit; text-decoration: none;">
<h1>one-time-code.js</h1>
</a>
<p>Dies ist ein Programm zum erzeugen von anonymen Schlüsseln. Diese werden automatisch den Teilnehmern zugesendet.
Zudem wird ein asymetrisch verschlüsselter Safe erstellt.</p>
<a href="#zweck" id="zweck" style="color: inherit; text-decoration: none;">
<h2>Zweck</h2>
</a>
<p>Für ananoyme Wahlen muss sichergestellt werden, dass:</p>
<ol>
<li>Nur berechtigter Personen abstimmen können</li>
<li>Jeder Wähler nicht rückverfolgbar ist</li>
<li>Jeder Wähler nur einmal abstimmen kann</li>
</ol>
<p>Punkte 1. und 2. Lassen sich mit dieser Anwendug realisieren.</p>
<a href="#funktionsprinzip" id="funktionsprinzip" style="color: inherit; text-decoration: none;">
<h2>Funktionsprinzip</h2>
</a>
<p>Diese Anwendung muss auf zwei Systemen installiert sein. Beide Systeme dürfen nicht aufeinander Zugreifen können und müssen von verschiedenen Personen bedient werden.
Die beiden Systeme sind:</p>
<ul>
<li>System A &amp; Person A: Hier werden die Schlüssel erzeugt, benutzern zufällig zugewiesen und versendet. </li>
<li>System B &amp; Person B: Hier wird das Schlüsselpaar erzeugt und hier kann der Safe entschlüsselt werden.</li>
<li>Person C: Erhält von Person A die gültigen Codes und verifiziert die eingehenden Wahlzettel.</li>
</ul>
<p>Da Person A die SChlüssel-Nutzer Zuordnung zu keinem Zeitpunkt kennt, kann sie auch die selbe Person wie Person C sein.</p>
<a href="#schritt-1" id="schritt-1" style="color: inherit; text-decoration: none;">
<h3>Schritt 1</h3>
</a>
<p>Auf System B wird ein Schlüsselpaar erzeugt. Dies besteht aus dem Öffentlichen und Privaten schlüssel.</p>
<ul>
<li>Der Öffentliche schlüssel dient zur Verschlüsselung der Daten und kann nicht zum entschlüsseln verwendet werden.</li>
<li>Der Private schlüssel dient zur entschlüsselung des Safes und darf System B NIEMALS verlassen.</li>
</ul>
<p>Dazu wird z.B. folgender Befehl ausgeführt:
`ts-node .\index.ts --privkey private.key --pubkey public.key --genkey</p>
<p>Der erzeugte Öffentliche schlüssel muss an Person A übergeben werden. Diese nutzt den Schlüssel auf System A zum verschlüsseln des Passwortsafes.</p>
<a href="#schritt-2" id="schritt-2" style="color: inherit; text-decoration: none;">
<h3>Schritt 2</h3>
</a>
<p>Auf System A werden jetzt die Codes erzeugt und an die Nutzer versendet.
Die Nutzer-Schlüssel zuweisung erfolgt temporär auf System A, ist jedoch nicht auslesbar und wird unmittelbar im Passwortsafe gespeichert.</p>
<p>Person A führt folgenden Befehl aus:
`ts-node .\index.ts --config config.json --pubkey public.key --send --safe .\out\credentials.json --mails mail.txt -html template.html</p>
<p>Dabei wird eine Liste mit den Mails und Namen sowie der schlüssel übergeben.</p>
<p>Der Ausfbau der mail.txt ist:</p>
<pre><code><span class="hljs-tag">&lt;<span class="hljs-name">mail</span>&gt;</span>;<span class="hljs-tag">&lt;<span class="hljs-name">name</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">mail</span>&gt;</span>;<span class="hljs-tag">&lt;<span class="hljs-name">name</span>&gt;</span>
...</code></pre>
<p>Es werden drei Ausgaben erzeugt:</p>
<ul>
<li>Eine RegEx vorlage für alle Codes</li>
<li>Safe-Datei</li>
</ul>
<p>Die Speicherorte der Code-Files werden in der config.json angegeben.
Der Safe wird an Person B weitergegeben. </p>
<p>Das Programm versendet automatisch Mails an alle Personen. Die HTML Vorlage wird mit --html angegeben.
In der Vorlage werden folgende Zeichenketten ersetzt:
<code>{{code}} =&gt; Genereirter Code </code>{{name}}
=&gt; Name
`{{mail}}
=&gt; Mail</p>
<p>Der SMTP-Relay-Server wird in der config.json angegeben.
Geenaue Doku: <a href="https://nodemailer.com/smtp/">https://nodemailer.com/smtp/</a></p>
<a href="#schritt-3" id="schritt-3" style="color: inherit; text-decoration: none;">
<h3>Schritt 3</h3>
</a>
<p>Ggf. muss der Safe entschlüsselt werden. Beispielfälle wären: </p>
<ul>
<li>Teilnehmer hat keinen Zugriff auf das Mailkonto</li>
<li>Teilnehmer hat seinen Code vergessen</li>
<li>Mail wurd durch den Spamfilter entfernt</li>
</ul>
<p>Person B muss dann mit dem Privaten Schlüssel den Safe auslesen und dem Teilnehmer seinen Code zukommen lassen.
Dazu muss golgender Befehl ausgeführt werden:
ts-node .\index.ts --privkey private.key --decrypt --safe .\out\credentials.json</p>
<a href="#config-datei" id="config-datei" style="color: inherit; text-decoration: none;">
<h2>Config-Datei</h2>
</a>
<pre><code>{
<span class="hljs-attr">&quot;mail&quot;</span>:{
<span class="hljs-attr">&quot;host&quot;</span>: <span class="hljs-string">&quot;&lt;mailserver&gt;&quot;</span>,
<span class="hljs-attr">&quot;port&quot;</span>: &lt;mailport&gt;,
<span class="hljs-attr">&quot;secure&quot;</span>: &lt;use ssl&gt;,
<span class="hljs-attr">&quot;auth&quot;</span>: {
<span class="hljs-attr">&quot;user&quot;</span>: <span class="hljs-string">&quot;&lt;mail-user&gt;&quot;</span>,
<span class="hljs-attr">&quot;pass&quot;</span>: <span class="hljs-string">&quot;&lt;mail-password&gt;&quot;</span>
},
<span class="hljs-attr">&quot;tls&quot;</span>: {
<span class="hljs-attr">&quot;rejectUnauthorized&quot;</span>: <span class="hljs-literal">false</span>,
<span class="hljs-attr">&quot;ciphers&quot;</span>:<span class="hljs-string">&quot;SSLv3&quot;</span>
}
},
<span class="hljs-attr">&quot;mailFrom&quot;</span>: <span class="hljs-string">&quot;&lt;absender name&gt;&quot;</span>,
<span class="hljs-attr">&quot;outFileMatch&quot;</span>: <span class="hljs-string">&quot;&lt;ausgabedatei regex&gt;&quot;</span>
}</code></pre>
<a href="#syntax" id="syntax" style="color: inherit; text-decoration: none;">
<h2>Syntax</h2>
</a>
<p>==&gt; Schlüsselpaar Erzeugen
<code>ts-node .\index.ts --privkey &lt;path-to-private-key&gt; --pubkey &lt;path-to-public-key&gt; --genkey</code></p>
<p>z.B. <code>ts-node .\index.ts --privkey private.key --pubkey public.key --genkey</code></p>
<p>==&gt; Codes Erzeugen und versenden
<code>ts-node .\index.ts --config &lt;path-to-config-key&gt; --pubkey &lt;path-to-public-key&gt; --send --safe credentials.json --mails &lt;path-to-mail-list&gt; -html &lt;path-to-html-template&gt;</code></p>
<p>Achtung: Es wird im Safe geprüft, ob Mailadressen bereits &quot;bedient&quot; wurden. Sollte dies der Fall sein, werden keine Mails an diese Adresse gesendet. Dies lässt sich mit dem Schalter <code>--force</code> umgehen.</p>
<p>z.B. <code>ts-node .\index.ts --config config.json --pubkey public.key --send --safe credentials.json --mails mail.txt -html template.html</code></p>
<p>==&gt; Safe entschlüsseln
<code>ts-node .\index.ts --privkey &lt;path-to-private-key&gt; --decrypt --safe credentials.json</code></p>
<p>z.B. <code>ts-node .\index.ts --privkey private.key --decrypt --safe credentials.json</code></p>
<a href="#erweiterte-schalter" id="erweiterte-schalter" style="color: inherit; text-decoration: none;">
<h3>Erweiterte Schalter</h3>
</a>
<ul>
<li><code>--dryrun</code> : Mails werden nicht versendet und der Safe wird nicht verändert.</li>
<li><code>--force</code> : Alle Codes werden neu generiert und alle mails werden gesendet. Ignoriere bereits gesendete mails.</li>
</ul>
<a href="#gepackte-binaries" id="gepackte-binaries" style="color: inherit; text-decoration: none;">
<h2>Gepackte Binaries</h2>
</a>
<p>Die gepackten Binaries sind für Linux, MacOS und Windoof verfügbar: <a href="https://gitlab.dennisgunia.de/dennisgunia/one-time-code-js/-/tree/master/bin">Binaries</a></p>
<p>Die befehle ändern sich wie folgt:</p>
<p>==&gt; Schlüsselpaar Erzeuge
<code>./opentoken --privkey &lt;path-to-private-key&gt; --pubkey &lt;path-to-public-key&gt; --genkey</code></p>
<p>z.B. <code>./opentoken --privkey private.key --pubkey public.key --genkey</code></p>
<p>==&gt; Codes Erzeugen und versenden
<code>./opentoken --config &lt;path-to-config-key&gt; --pubkey &lt;path-to-public-key&gt; --send --safe .\out\credentials.json --mails &lt;path-to-mail-list&gt; -html &lt;path-to-html-template&gt;</code></p>
<p>z.B. <code>./opentoken --config config.json --pubkey public.key --send --safe .\out\credentials.json --mails mail.txt -html template.html</code></p>
<p>==&gt; Safe entschlüsseln
<code>./opentoken --privkey &lt;path-to-private-key&gt; --decrypt --safe .\out\credentials.json</code></p>
<p>z.B. <code>./opentoken --privkey private.key --decrypt --safe .\out\credentials.json</code></p>
<a href="#ausführen-des-quellcodes" id="ausführen-des-quellcodes" style="color: inherit; text-decoration: none;">
<h2>Ausführen des Quellcodes</h2>
</a>
<p>Der Sourcecode kann auch über ts-node ausgeführt werden.
Dazu ist Node.js Version 12 zu verwenden</p>
<p><code>nvm use 12</code></p>
<p>Zum Ausführen sind folgende npm Pakete notwendig:</p>
<ul>
<li>typescript</li>
<li>tslint</li>
<li>ts-node</li>
</ul>
<p>Installerien sie diese mit:
<code>npm install -g typescript tslint ts-node</code></p>
<p>Clonen sie dieses Repository auf ihren lokalen rechner und wechseln sie anschließend in dessen verzeichniss:</p>
<p><code>git clone https://gitlab.dennisgunia.de/dennisgunia/one-time-code-js.git</code></p>
<p><code>cd one-time-code-js</code></p>
<p>Installieren sie alle lokalen npm Pakete</p>
<p><code>npm install</code></p>
<p>Kopieren Sie die Config-Template und passen Sie die SMTP-Zugangsdaten an:</p>
<p><code>cp config.template.json config.json</code></p>
<p><code>vim config.json</code></p>
<p>Das Skript kann nun über <code>npm run-script exec</code> oder <code>ts-node index.js</code> ausgeführt werden.</p>
<a href="#packen-des-quellcodes" id="packen-des-quellcodes" style="color: inherit; text-decoration: none;">
<h2>Packen des Quellcodes</h2>
</a>
<p>Zum Packen des Quellcodes ist das npm-Paket <code>pkg</code> zu installieren:</p>
<p><code>npm install -g pkg</code></p>
<p>Anschließend wird der Code in JS transpiliert und durch pkg gepackt:</p>
<p><code>npm run-script build</code></p>
<p>Die Binaries werden in <code>./bin</code> gespeichert. Diese sind auch auf Systemen ohne node.js ausführbar.</p>
<a href="#was-landet-im-safe" id="was-landet-im-safe" style="color: inherit; text-decoration: none;">
<h2>Was landet im Safe?</h2>
</a>
<p>Im safe landen die verschlüsselten Zuordnungen zwischen Codes und Mailadressen.</p>
<p>Zudem werden die verwendeten Codes und die bereits gesendeten Mailadressen seperat voneinander und zufällig gemischt in Klartext gespeichert.</p>
<p>Dies ermöglicht es, nachträglich benutzer hinzuzufügen, ohne allen anderen neue Mails oder gar neue Codes zukommen lassen zu müssen.</p>
<p>Es ist jedoch nocht empfohlen, nachträglich mails hinzuzufügen, da dies, abhängig von der Menge der gleichzeitig hinzugefügten Adressen eine grobe oder ggf. auch sehr genaue zuordnung zwischen Code und Mail der Nachzügler möglich ist. </p>
</div>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="globals.html"><em>Globals</em></a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/mlgenerator.html">MLGenerator</a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/mllogic_key.html">MLLogic_<wbr><wbr>Key</a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/mllogic_send.html">MLLogic_<wbr><wbr>Send</a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/mllogic_vault.html">MLLogic_<wbr><wbr>Vault</a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/mlparser.html">MLParser</a>
</li>
<li class=" tsd-kind-namespace">
<a href="modules/svault.html">SVault</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-class">
<a href="classes/keyaction.html" class="tsd-kind-icon">Key<wbr>Action</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/opentokencli.html" class="tsd-kind-icon">Open<wbr>TokenCLI</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/sendaction.html" class="tsd-kind-icon">Send<wbr>Action</a>
</li>
<li class=" tsd-kind-class">
<a href="classes/vaultaction.html" class="tsd-kind-icon">Vault<wbr>Action</a>
</li>
<li class=" tsd-kind-interface">
<a href="interfaces/otglobalconfig.html" class="tsd-kind-icon">OTGlobal<wbr>Config</a>
</li>
<li class=" tsd-kind-variable">
<a href="globals.html#commandline" class="tsd-kind-icon">command<wbr>Line</a>
</li>
<li class=" tsd-kind-function">
<a href="globals.html#delay" class="tsd-kind-icon">delay</a>
</li>
<li class=" tsd-kind-function">
<a href="globals.html#mkstringcn" class="tsd-kind-icon">mkstringCN</a>
</li>
<li class=" tsd-kind-function">
<a href="globals.html#shufflearray" class="tsd-kind-icon">shuffle<wbr>Array</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="assets/js/main.js"></script>
</body>
</html>

View File

@@ -0,0 +1,224 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>MLGenReturn | opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="../modules/mlgenerator.html">MLGenerator</a>
</li>
<li>
<a href="mlgenerator.mlgenreturn.html">MLGenReturn</a>
</li>
</ul>
<h1>Interface MLGenReturn</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Interface used to Return codes and mails form the main Function <a href="../modules/mlgenerator.html#generatetoken">generateToken</a></p>
</div>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">MLGenReturn</span>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="mlgenerator.mlgenreturn.html#codes" class="tsd-kind-icon">codes</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="mlgenerator.mlgenreturn.html#mails" class="tsd-kind-icon">mails</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="codes" class="tsd-anchor"></a>
<h3>codes</h3>
<div class="tsd-signature tsd-kind-icon">codes<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/generate.ts:45</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>List of generated codes</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="mails" class="tsd-anchor"></a>
<h3>mails</h3>
<div class="tsd-signature tsd-kind-icon">mails<span class="tsd-signature-symbol">:</span> <a href="mlparser.mlitem.html" class="tsd-signature-type">MLItem</a><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/generate.ts:47</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>List of processed mails</p>
</div>
</div>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class="current tsd-kind-namespace">
<a href="../modules/mlgenerator.html">MLGenerator</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_key.html">MLLogic_<wbr><wbr>Key</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_send.html">MLLogic_<wbr><wbr>Send</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_vault.html">MLLogic_<wbr><wbr>Vault</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mlparser.html">MLParser</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/svault.html">SVault</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
</ul>
<ul class="current">
<li class="current tsd-kind-interface tsd-parent-kind-namespace">
<a href="mlgenerator.mlgenreturn.html" class="tsd-kind-icon">MLGen<wbr>Return</a>
<ul>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="mlgenerator.mlgenreturn.html#codes" class="tsd-kind-icon">codes</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="mlgenerator.mlgenreturn.html#mails" class="tsd-kind-icon">mails</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<a href="../modules/mlgenerator.html#generatecodes" class="tsd-kind-icon">generate<wbr>Codes</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-namespace">
<a href="../modules/mlgenerator.html#generatetoken" class="tsd-kind-icon">generate<wbr>Token</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<a href="../modules/mlgenerator.html#send" class="tsd-kind-icon">send</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<a href="../modules/mlgenerator.html#sendmails" class="tsd-kind-icon">send<wbr>Mails</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>

View File

@@ -0,0 +1,215 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>MLItem | opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="../modules/mlparser.html">MLParser</a>
</li>
<li>
<a href="mlparser.mlitem.html">MLItem</a>
</li>
</ul>
<h1>Interface MLItem</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Interface containing properties of a single mail line</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">MLItem</span>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="mlparser.mlitem.html#mail" class="tsd-kind-icon">mail</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="mlparser.mlitem.html#name" class="tsd-kind-icon">name</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="mail" class="tsd-anchor"></a>
<h3>mail</h3>
<div class="tsd-signature tsd-kind-icon">mail<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/mailParser.ts:37</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>mail adress parsed form file</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="name" class="tsd-anchor"></a>
<h3>name</h3>
<div class="tsd-signature tsd-kind-icon">name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/mailParser.ts:39</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>name parsed form file</p>
</div>
</div>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mlgenerator.html">MLGenerator</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_key.html">MLLogic_<wbr><wbr>Key</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_send.html">MLLogic_<wbr><wbr>Send</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_vault.html">MLLogic_<wbr><wbr>Vault</a>
</li>
<li class="current tsd-kind-namespace">
<a href="../modules/mlparser.html">MLParser</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/svault.html">SVault</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
</ul>
<ul class="current">
<li class="current tsd-kind-interface tsd-parent-kind-namespace">
<a href="mlparser.mlitem.html" class="tsd-kind-icon">MLItem</a>
<ul>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="mlparser.mlitem.html#mail" class="tsd-kind-icon">mail</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="mlparser.mlitem.html#name" class="tsd-kind-icon">name</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-function tsd-parent-kind-namespace">
<a href="../modules/mlparser.html#parsemails" class="tsd-kind-icon">parse<wbr>Mails</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>

View File

@@ -0,0 +1,348 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>OTGlobalConfig | opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="otglobalconfig.html">OTGlobalConfig</a>
</li>
</ul>
<h1>Interface OTGlobalConfig</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Interface containing all config properties for opentoken</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">OTGlobalConfig</span>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#dryrun" class="tsd-kind-icon">dryrun</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#force" class="tsd-kind-icon">force</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#htmlpath" class="tsd-kind-icon">html<wbr>Path</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#infilemail" class="tsd-kind-icon">in<wbr>File<wbr>Mail</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#mail" class="tsd-kind-icon">mail</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#mailfrom" class="tsd-kind-icon">mail<wbr>From</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#outfilematch" class="tsd-kind-icon">out<wbr>File<wbr>Match</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#usedmails" class="tsd-kind-icon">used<wbr>Mails</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#usedtokens" class="tsd-kind-icon">used<wbr>Tokens</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="dryrun" class="tsd-anchor"></a>
<h3>dryrun</h3>
<div class="tsd-signature tsd-kind-icon">dryrun<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/config.type.ts:43</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>switch for dryrun</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="force" class="tsd-anchor"></a>
<h3>force</h3>
<div class="tsd-signature tsd-kind-icon">force<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/config.type.ts:45</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>switch for force</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="htmlpath" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> html<wbr>Path</h3>
<div class="tsd-signature tsd-kind-icon">html<wbr>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/config.type.ts:35</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>path to file containing mail template</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="infilemail" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> in<wbr>File<wbr>Mail</h3>
<div class="tsd-signature tsd-kind-icon">in<wbr>File<wbr>Mail<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/config.type.ts:33</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>path to file containing mails</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="mail" class="tsd-anchor"></a>
<h3>mail</h3>
<div class="tsd-signature tsd-kind-icon">mail<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">SMTPTransport</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/config.type.ts:27</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>nodemailer SMTP configuration</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="mailfrom" class="tsd-anchor"></a>
<h3>mail<wbr>From</h3>
<div class="tsd-signature tsd-kind-icon">mail<wbr>From<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/config.type.ts:29</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>sender alias</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="outfilematch" class="tsd-anchor"></a>
<h3>out<wbr>File<wbr>Match</h3>
<div class="tsd-signature tsd-kind-icon">out<wbr>File<wbr>Match<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/config.type.ts:31</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>path to file containing matches</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="usedmails" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> used<wbr>Mails</h3>
<div class="tsd-signature tsd-kind-icon">used<wbr>Mails<span class="tsd-signature-symbol">:</span> <a href="mlparser.mlitem.html" class="tsd-signature-type">MLItem</a><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/config.type.ts:40</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>List of used mail adresses</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="usedtokens" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> used<wbr>Tokens</h3>
<div class="tsd-signature tsd-kind-icon">used<wbr>Tokens<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/config.type.ts:38</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>List of used tokens</p>
</div>
</div>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-class">
<a href="../classes/keyaction.html" class="tsd-kind-icon">Key<wbr>Action</a>
</li>
<li class=" tsd-kind-class">
<a href="../classes/opentokencli.html" class="tsd-kind-icon">Open<wbr>TokenCLI</a>
</li>
<li class=" tsd-kind-class">
<a href="../classes/sendaction.html" class="tsd-kind-icon">Send<wbr>Action</a>
</li>
<li class=" tsd-kind-class">
<a href="../classes/vaultaction.html" class="tsd-kind-icon">Vault<wbr>Action</a>
</li>
</ul>
<ul class="current">
<li class="current tsd-kind-interface">
<a href="otglobalconfig.html" class="tsd-kind-icon">OTGlobal<wbr>Config</a>
<ul>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="otglobalconfig.html#dryrun" class="tsd-kind-icon">dryrun</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="otglobalconfig.html#force" class="tsd-kind-icon">force</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="otglobalconfig.html#htmlpath" class="tsd-kind-icon">html<wbr>Path</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="otglobalconfig.html#infilemail" class="tsd-kind-icon">in<wbr>File<wbr>Mail</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="otglobalconfig.html#mail" class="tsd-kind-icon">mail</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="otglobalconfig.html#mailfrom" class="tsd-kind-icon">mail<wbr>From</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="otglobalconfig.html#outfilematch" class="tsd-kind-icon">out<wbr>File<wbr>Match</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="otglobalconfig.html#usedmails" class="tsd-kind-icon">used<wbr>Mails</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="otglobalconfig.html#usedtokens" class="tsd-kind-icon">used<wbr>Tokens</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-variable">
<a href="../globals.html#commandline" class="tsd-kind-icon">command<wbr>Line</a>
</li>
<li class=" tsd-kind-function">
<a href="../globals.html#delay" class="tsd-kind-icon">delay</a>
</li>
<li class=" tsd-kind-function">
<a href="../globals.html#mkstringcn" class="tsd-kind-icon">mkstringCN</a>
</li>
<li class=" tsd-kind-function">
<a href="../globals.html#shufflearray" class="tsd-kind-icon">shuffle<wbr>Array</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>

View File

@@ -0,0 +1,262 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>SecureVaultItem | opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="../modules/svault.html">SVault</a>
</li>
<li>
<a href="svault.securevaultitem.html">SecureVaultItem</a>
</li>
</ul>
<h1>Interface SecureVaultItem</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Interface for an vault item containing encrypted data</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">SecureVaultItem</span>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.securevaultitem.html#d" class="tsd-kind-icon">d</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.securevaultitem.html#iv" class="tsd-kind-icon">iv</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.securevaultitem.html#k" class="tsd-kind-icon">k</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.securevaultitem.html#u" class="tsd-kind-icon">u</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="d" class="tsd-anchor"></a>
<h3>d</h3>
<div class="tsd-signature tsd-kind-icon">d<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:43</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>data</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="iv" class="tsd-anchor"></a>
<h3>iv</h3>
<div class="tsd-signature tsd-kind-icon">iv<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:47</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>init vector</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="k" class="tsd-anchor"></a>
<h3>k</h3>
<div class="tsd-signature tsd-kind-icon">k<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:45</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>key</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="u" class="tsd-anchor"></a>
<h3>u</h3>
<div class="tsd-signature tsd-kind-icon">u<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:41</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>uuid</p>
</div>
</div>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mlgenerator.html">MLGenerator</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_key.html">MLLogic_<wbr><wbr>Key</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_send.html">MLLogic_<wbr><wbr>Send</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_vault.html">MLLogic_<wbr><wbr>Vault</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mlparser.html">MLParser</a>
</li>
<li class="current tsd-kind-namespace">
<a href="../modules/svault.html">SVault</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-class tsd-parent-kind-namespace">
<a href="../classes/svault.securevault.html" class="tsd-kind-icon">Secure<wbr>Vault</a>
</li>
</ul>
<ul class="current">
<li class="current tsd-kind-interface tsd-parent-kind-namespace">
<a href="svault.securevaultitem.html" class="tsd-kind-icon">Secure<wbr>Vault<wbr>Item</a>
<ul>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="svault.securevaultitem.html#d" class="tsd-kind-icon">d</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="svault.securevaultitem.html#iv" class="tsd-kind-icon">iv</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="svault.securevaultitem.html#k" class="tsd-kind-icon">k</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="svault.securevaultitem.html#u" class="tsd-kind-icon">u</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
<a href="svault.storageitem.html" class="tsd-kind-icon">Storage<wbr>Item</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
<a href="svault.securevaultlist.html" class="tsd-kind-icon">secure<wbr>Vault<wbr>List</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported">
<a href="../modules/svault.html#vaultversion" class="tsd-kind-icon">vault<wbr>Version</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>

View File

@@ -0,0 +1,228 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>secureVaultList | opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="../modules/svault.html">SVault</a>
</li>
<li>
<a href="svault.securevaultlist.html">secureVaultList</a>
</li>
</ul>
<h1>Interface secureVaultList</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Interface for secureVault Array</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">secureVaultList</span>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.securevaultlist.html#items" class="tsd-kind-icon">items</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.securevaultlist.html#privatekey" class="tsd-kind-icon">private<wbr>Key</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.securevaultlist.html#publickey" class="tsd-kind-icon">public<wbr>Key</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="items" class="tsd-anchor"></a>
<h3>items</h3>
<div class="tsd-signature tsd-kind-icon">items<span class="tsd-signature-symbol">:</span> <a href="svault.securevaultitem.html" class="tsd-signature-type">SecureVaultItem</a><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:62</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="privatekey" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> private<wbr>Key</h3>
<div class="tsd-signature tsd-kind-icon">private<wbr>Key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Buffer</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:64</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="publickey" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> public<wbr>Key</h3>
<div class="tsd-signature tsd-kind-icon">public<wbr>Key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Buffer</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:63</li>
</ul>
</aside>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mlgenerator.html">MLGenerator</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_key.html">MLLogic_<wbr><wbr>Key</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_send.html">MLLogic_<wbr><wbr>Send</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_vault.html">MLLogic_<wbr><wbr>Vault</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mlparser.html">MLParser</a>
</li>
<li class="current tsd-kind-namespace">
<a href="../modules/svault.html">SVault</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-class tsd-parent-kind-namespace">
<a href="../classes/svault.securevault.html" class="tsd-kind-icon">Secure<wbr>Vault</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
<a href="svault.securevaultitem.html" class="tsd-kind-icon">Secure<wbr>Vault<wbr>Item</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
<a href="svault.storageitem.html" class="tsd-kind-icon">Storage<wbr>Item</a>
</li>
</ul>
<ul class="current">
<li class="current tsd-kind-interface tsd-parent-kind-namespace">
<a href="svault.securevaultlist.html" class="tsd-kind-icon">secure<wbr>Vault<wbr>List</a>
<ul>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="svault.securevaultlist.html#items" class="tsd-kind-icon">items</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="svault.securevaultlist.html#privatekey" class="tsd-kind-icon">private<wbr>Key</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="svault.securevaultlist.html#publickey" class="tsd-kind-icon">public<wbr>Key</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported">
<a href="../modules/svault.html#vaultversion" class="tsd-kind-icon">vault<wbr>Version</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>

View File

@@ -0,0 +1,243 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>StorageItem | opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="../modules/svault.html">SVault</a>
</li>
<li>
<a href="svault.storageitem.html">StorageItem</a>
</li>
</ul>
<h1>Interface StorageItem</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Interface for an vault item containing unencrypted data</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">StorageItem</span>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.storageitem.html#d" class="tsd-kind-icon">d</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.storageitem.html#t" class="tsd-kind-icon">t</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.storageitem.html#u" class="tsd-kind-icon">u</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="d" class="tsd-anchor"></a>
<h3>d</h3>
<div class="tsd-signature tsd-kind-icon">d<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:55</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>data</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="t" class="tsd-anchor"></a>
<h3>t</h3>
<div class="tsd-signature tsd-kind-icon">t<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:57</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>tag (can be used to find specific items)</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="u" class="tsd-anchor"></a>
<h3>u</h3>
<div class="tsd-signature tsd-kind-icon">u<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:53</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>uuid</p>
</div>
</div>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mlgenerator.html">MLGenerator</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_key.html">MLLogic_<wbr><wbr>Key</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_send.html">MLLogic_<wbr><wbr>Send</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mllogic_vault.html">MLLogic_<wbr><wbr>Vault</a>
</li>
<li class=" tsd-kind-namespace">
<a href="../modules/mlparser.html">MLParser</a>
</li>
<li class="current tsd-kind-namespace">
<a href="../modules/svault.html">SVault</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-class tsd-parent-kind-namespace">
<a href="../classes/svault.securevault.html" class="tsd-kind-icon">Secure<wbr>Vault</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
<a href="svault.securevaultitem.html" class="tsd-kind-icon">Secure<wbr>Vault<wbr>Item</a>
</li>
</ul>
<ul class="current">
<li class="current tsd-kind-interface tsd-parent-kind-namespace">
<a href="svault.storageitem.html" class="tsd-kind-icon">Storage<wbr>Item</a>
<ul>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="svault.storageitem.html#d" class="tsd-kind-icon">d</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="svault.storageitem.html#t" class="tsd-kind-icon">t</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface">
<a href="svault.storageitem.html#u" class="tsd-kind-icon">u</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
<a href="svault.securevaultlist.html" class="tsd-kind-icon">secure<wbr>Vault<wbr>List</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported">
<a href="../modules/svault.html#vaultversion" class="tsd-kind-icon">vault<wbr>Version</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>

View File

@@ -0,0 +1,506 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>MLGenerator | opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="mlgenerator.html">MLGenerator</a>
</li>
</ul>
<h1>Namespace MLGenerator</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Namespace containing the code for Generating the Code and delivering the mails</p>
</div>
</div>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Interfaces</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-interface tsd-parent-kind-namespace"><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-kind-icon">MLGen<wbr>Return</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Functions</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported"><a href="mlgenerator.html#generatecodes" class="tsd-kind-icon">generate<wbr>Codes</a></li>
<li class="tsd-kind-function tsd-parent-kind-namespace"><a href="mlgenerator.html#generatetoken" class="tsd-kind-icon">generate<wbr>Token</a></li>
<li class="tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported"><a href="mlgenerator.html#send" class="tsd-kind-icon">send</a></li>
<li class="tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported"><a href="mlgenerator.html#sendmails" class="tsd-kind-icon">send<wbr>Mails</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Functions</h2>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<a name="generatecodes" class="tsd-anchor"></a>
<h3>generate<wbr>Codes</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<li class="tsd-signature tsd-kind-icon">generate<wbr>Codes<span class="tsd-signature-symbol">(</span>resolve<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">?: </span><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span>, error<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>reason<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span>, mailArray<span class="tsd-signature-symbol">: </span><a href="../interfaces/mlparser.mlitem.html" class="tsd-signature-type">MLItem</a><span class="tsd-signature-symbol">[]</span>, config<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, dataSafe<span class="tsd-signature-symbol">: </span><a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/generate.ts:79</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Generate the same amout of codes as distinct mail adresses and stores them to the list file
This function also includes previously used tokens to prevent duplicate tokens.
Rejects if matchfile cannot be saved.</p>
</div>
<dl class="tsd-comment-tags">
<dt>internal</dt>
<dd></dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>resolve: <span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">?: </span><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h5>
<div class="tsd-comment tsd-typography">
<p>Callback to resolve promise</p>
</div>
<ul class="tsd-parameters">
<li class="tsd-parameter-signature">
<ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">?: </span><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> value: <a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</li>
</ul>
</li>
<li>
<h5>error: <span class="tsd-signature-symbol">(</span>reason<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h5>
<div class="tsd-comment tsd-typography">
<p>Callback to reject promise</p>
</div>
<ul class="tsd-parameters">
<li class="tsd-parameter-signature">
<ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>reason<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> reason: <span class="tsd-signature-type">any</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</li>
</ul>
</li>
<li>
<h5>mailArray: <a href="../interfaces/mlparser.mlitem.html" class="tsd-signature-type">MLItem</a><span class="tsd-signature-symbol">[]</span></h5>
<div class="tsd-comment tsd-typography">
<p>list of mail adresses</p>
</div>
</li>
<li>
<h5>config: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>Main configuration object
This Function uses the following variables:
usedTokens -&gt; List of previosly used tokens
outFileMatch -&gt; Path to match file</p>
</div>
</li>
<li>
<h5>dataSafe: <a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a></h5>
<div class="tsd-comment tsd-typography">
<p>Main safe used for logging and storing data</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace">
<a name="generatetoken" class="tsd-anchor"></a>
<h3>generate<wbr>Token</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace">
<li class="tsd-signature tsd-kind-icon">generate<wbr>Token<span class="tsd-signature-symbol">(</span>config<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, dataSafe<span class="tsd-signature-symbol">: </span><a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/generate.ts:56</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Main function used to generate and deliver codes</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>config: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>Main configuration object</p>
</div>
</li>
<li>
<h5>dataSafe: <a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a></h5>
<div class="tsd-comment tsd-typography">
<p>Main safe used for logging and storing data</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a><span class="tsd-signature-symbol">&gt;</span></h4>
<p>used codes and processed mails</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<a name="send" class="tsd-anchor"></a>
<h3>send</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<li class="tsd-signature tsd-kind-icon">send<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, mail<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, code<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, template<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HandlebarsTemplateDelegate</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span>, mailserver<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Mail</span>, config<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, dataSafe<span class="tsd-signature-symbol">: </span><a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/generate.ts:206</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Reads template file and compiles template.
Iterate through mails and codes, randomly assign code to mail and send mail to recipient.
If dryrun is enabled, mails will not be sent and new mails won&#39;t be included in return.
Rejects if template cannot be read.</p>
</div>
<dl class="tsd-comment-tags">
<dt>internal</dt>
<dd></dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>name: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>Name of recpipient</p>
</div>
</li>
<li>
<h5>mail: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>Mail of recpipient</p>
</div>
</li>
<li>
<h5>code: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>Code of recpipient</p>
</div>
</li>
<li>
<h5>template: <span class="tsd-signature-type">HandlebarsTemplateDelegate</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h5>
<div class="tsd-comment tsd-typography">
<p>compiled mail template</p>
</div>
</li>
<li>
<h5>mailserver: <span class="tsd-signature-type">Mail</span></h5>
<div class="tsd-comment tsd-typography">
<p>Mailserver settings</p>
</div>
</li>
<li>
<h5>config: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>Main configuration object
This Function uses the following variables:
mail.auth.user -&gt; sender mail adress
mailFrom -&gt; sender mail ailas
dryrun -&gt; Boolean value. If true no mails will be sent.</p>
</div>
</li>
<li>
<h5>dataSafe: <a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a></h5>
<div class="tsd-comment tsd-typography">
<p>Main safe used for logging and storing data</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<a name="sendmails" class="tsd-anchor"></a>
<h3>send<wbr>Mails</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<li class="tsd-signature tsd-kind-icon">send<wbr>Mails<span class="tsd-signature-symbol">(</span>resolve<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">?: </span><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span>, error<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>reason<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span>, mailArray<span class="tsd-signature-symbol">: </span><a href="../interfaces/mlparser.mlitem.html" class="tsd-signature-type">MLItem</a><span class="tsd-signature-symbol">[]</span>, codeArray<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span>, config<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, dataSafe<span class="tsd-signature-symbol">: </span><a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/generate.ts:138</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Reads template file and compiles template.
Iterate through mails and codes, randomly assign code to mail and send mail to recipient.
If dryrun is enabled, mails will not be sent and new mails won&#39;t be included in return.
Rejects if template cannot be read.</p>
</div>
<dl class="tsd-comment-tags">
<dt>internal</dt>
<dd></dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>resolve: <span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">?: </span><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h5>
<div class="tsd-comment tsd-typography">
<p>Callback to resolve promise</p>
</div>
<ul class="tsd-parameters">
<li class="tsd-parameter-signature">
<ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">?: </span><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> value: <a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</li>
</ul>
</li>
<li>
<h5>error: <span class="tsd-signature-symbol">(</span>reason<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h5>
<div class="tsd-comment tsd-typography">
<p>Callback to reject promise</p>
</div>
<ul class="tsd-parameters">
<li class="tsd-parameter-signature">
<ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>reason<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> reason: <span class="tsd-signature-type">any</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</li>
</ul>
</li>
<li>
<h5>mailArray: <a href="../interfaces/mlparser.mlitem.html" class="tsd-signature-type">MLItem</a><span class="tsd-signature-symbol">[]</span></h5>
<div class="tsd-comment tsd-typography">
<p>list of mail adresses</p>
</div>
</li>
<li>
<h5>codeArray: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5>
<div class="tsd-comment tsd-typography">
<p>list of generated codes</p>
</div>
</li>
<li>
<h5>config: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>Main configuration object
This Function uses the following variables:
htmlPath -&gt; Path to html template
dryrun -&gt; Boolean value. If true no mails will be sent and list won&#39;t be updated.
force -&gt; Boolean value. If true all mails are resent.
usedTokens -&gt; Array of Strings. Specifies already used tokens adresses.
usedMails -&gt; Array of Strings. Specifies already served mail adresses.
mail -&gt; mailserver settings</p>
</div>
</li>
<li>
<h5>dataSafe: <a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a></h5>
<div class="tsd-comment tsd-typography">
<p>Main safe used for logging and storing data</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class="current tsd-kind-namespace">
<a href="mlgenerator.html">MLGenerator</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mllogic_key.html">MLLogic_<wbr><wbr>Key</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mllogic_send.html">MLLogic_<wbr><wbr>Send</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mllogic_vault.html">MLLogic_<wbr><wbr>Vault</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mlparser.html">MLParser</a>
</li>
<li class=" tsd-kind-namespace">
<a href="svault.html">SVault</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
<a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-kind-icon">MLGen<wbr>Return</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<a href="mlgenerator.html#generatecodes" class="tsd-kind-icon">generate<wbr>Codes</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-namespace">
<a href="mlgenerator.html#generatetoken" class="tsd-kind-icon">generate<wbr>Token</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<a href="mlgenerator.html#send" class="tsd-kind-icon">send</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<a href="mlgenerator.html#sendmails" class="tsd-kind-icon">send<wbr>Mails</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>

View File

@@ -0,0 +1,184 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>MLLogic_Key | opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="mllogic_key.html">MLLogic_Key</a>
</li>
</ul>
<h1>Namespace MLLogic_Key</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Namespace containing the code for the Key CLI Command.</p>
</div>
</div>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Functions</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-function tsd-parent-kind-namespace"><a href="mllogic_key.html#generate" class="tsd-kind-icon">generate</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Functions</h2>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace">
<a name="generate" class="tsd-anchor"></a>
<h3>generate</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace">
<li class="tsd-signature tsd-kind-icon">generate<span class="tsd-signature-symbol">(</span>privkey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span>, pubkey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/logic/KeyLogic.ts:27</li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>privkey: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></h5>
</li>
<li>
<h5>pubkey: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class=" tsd-kind-namespace">
<a href="mlgenerator.html">MLGenerator</a>
</li>
<li class="current tsd-kind-namespace">
<a href="mllogic_key.html">MLLogic_<wbr><wbr>Key</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mllogic_send.html">MLLogic_<wbr><wbr>Send</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mllogic_vault.html">MLLogic_<wbr><wbr>Vault</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mlparser.html">MLParser</a>
</li>
<li class=" tsd-kind-namespace">
<a href="svault.html">SVault</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-function tsd-parent-kind-namespace">
<a href="mllogic_key.html#generate" class="tsd-kind-icon">generate</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>

View File

@@ -0,0 +1,199 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>MLLogic_Send | opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="mllogic_send.html">MLLogic_Send</a>
</li>
</ul>
<h1>Namespace MLLogic_Send</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Namespace containing the code for the Send CLI Command.</p>
</div>
</div>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Functions</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-function tsd-parent-kind-namespace"><a href="mllogic_send.html#send" class="tsd-kind-icon">send</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Functions</h2>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace">
<a name="send" class="tsd-anchor"></a>
<h3>send</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace">
<li class="tsd-signature tsd-kind-icon">send<span class="tsd-signature-symbol">(</span>_force<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span>, _dryrun<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span>, _pubkey<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, _config<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, _safe<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, _template<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, _maillist<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/logic/SendLogic.ts:31</li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>_force: <span class="tsd-signature-type">boolean</span></h5>
</li>
<li>
<h5>_dryrun: <span class="tsd-signature-type">boolean</span></h5>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> _pubkey: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;&quot;</span></h5>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> _config: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;&quot;</span></h5>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> _safe: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;&quot;</span></h5>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> _template: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;&quot;</span></h5>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> _maillist: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;&quot;</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class=" tsd-kind-namespace">
<a href="mlgenerator.html">MLGenerator</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mllogic_key.html">MLLogic_<wbr><wbr>Key</a>
</li>
<li class="current tsd-kind-namespace">
<a href="mllogic_send.html">MLLogic_<wbr><wbr>Send</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mllogic_vault.html">MLLogic_<wbr><wbr>Vault</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mlparser.html">MLParser</a>
</li>
<li class=" tsd-kind-namespace">
<a href="svault.html">SVault</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-function tsd-parent-kind-namespace">
<a href="mllogic_send.html#send" class="tsd-kind-icon">send</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>

View File

@@ -0,0 +1,295 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>MLLogic_Vault | opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="mllogic_vault.html">MLLogic_Vault</a>
</li>
</ul>
<h1>Namespace MLLogic_Vault</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Namespace containing the code for the Vault CLI Command.</p>
</div>
</div>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Functions</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported"><a href="mllogic_vault.html#getcodes" class="tsd-kind-icon">get<wbr>Codes</a></li>
<li class="tsd-kind-function tsd-parent-kind-namespace"><a href="mllogic_vault.html#open" class="tsd-kind-icon">open</a></li>
<li class="tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported"><a href="mllogic_vault.html#printasjson" class="tsd-kind-icon">print<wbr>AsJSON</a></li>
<li class="tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported"><a href="mllogic_vault.html#revoketoken" class="tsd-kind-icon">revoke<wbr>Token</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Functions</h2>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<a name="getcodes" class="tsd-anchor"></a>
<h3>get<wbr>Codes</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<li class="tsd-signature tsd-kind-icon">get<wbr>Codes<span class="tsd-signature-symbol">(</span>dataSafe<span class="tsd-signature-symbol">: </span><a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a>, _format<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/logic/VaultLogic.ts:96</li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>dataSafe: <a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a></h5>
</li>
<li>
<h5>_format: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace">
<a name="open" class="tsd-anchor"></a>
<h3>open</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace">
<li class="tsd-signature tsd-kind-icon">open<span class="tsd-signature-symbol">(</span>_filter<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, _pubkey<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, _privkey<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, _safe<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, _getCodes<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span>, _format<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, _revoke<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/logic/VaultLogic.ts:29</li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> _filter: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;&quot;</span></h5>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> _pubkey: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;&quot;</span></h5>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> _privkey: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;&quot;</span></h5>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> _safe: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;&quot;</span></h5>
</li>
<li>
<h5>_getCodes: <span class="tsd-signature-type">boolean</span></h5>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> _format: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &quot;&quot;</span></h5>
</li>
<li>
<h5>_revoke: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<a name="printasjson" class="tsd-anchor"></a>
<h3>print<wbr>AsJSON</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<li class="tsd-signature tsd-kind-icon">print<wbr>AsJSON<span class="tsd-signature-symbol">(</span>_filter<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, dataSafe<span class="tsd-signature-symbol">: </span><a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a>, vault<span class="tsd-signature-symbol">: </span><a href="../interfaces/svault.securevaultitem.html" class="tsd-signature-type">SecureVaultItem</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/logic/VaultLogic.ts:51</li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>_filter: <span class="tsd-signature-type">string</span></h5>
</li>
<li>
<h5>dataSafe: <a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a></h5>
</li>
<li>
<h5>vault: <a href="../interfaces/svault.securevaultitem.html" class="tsd-signature-type">SecureVaultItem</a><span class="tsd-signature-symbol">[]</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<a name="revoketoken" class="tsd-anchor"></a>
<h3>revoke<wbr>Token</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<li class="tsd-signature tsd-kind-icon">revoke<wbr>Token<span class="tsd-signature-symbol">(</span>dataSafe<span class="tsd-signature-symbol">: </span><a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a>, _revoke<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, _safe<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/logic/VaultLogic.ts:69</li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>dataSafe: <a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a></h5>
</li>
<li>
<h5>_revoke: <span class="tsd-signature-type">string</span></h5>
</li>
<li>
<h5>_safe: <span class="tsd-signature-type">string</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class=" tsd-kind-namespace">
<a href="mlgenerator.html">MLGenerator</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mllogic_key.html">MLLogic_<wbr><wbr>Key</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mllogic_send.html">MLLogic_<wbr><wbr>Send</a>
</li>
<li class="current tsd-kind-namespace">
<a href="mllogic_vault.html">MLLogic_<wbr><wbr>Vault</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mlparser.html">MLParser</a>
</li>
<li class=" tsd-kind-namespace">
<a href="svault.html">SVault</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<a href="mllogic_vault.html#getcodes" class="tsd-kind-icon">get<wbr>Codes</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-namespace">
<a href="mllogic_vault.html#open" class="tsd-kind-icon">open</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<a href="mllogic_vault.html#printasjson" class="tsd-kind-icon">print<wbr>AsJSON</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
<a href="mllogic_vault.html#revoketoken" class="tsd-kind-icon">revoke<wbr>Token</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>

210
docs/modules/mlparser.html Normal file
View File

@@ -0,0 +1,210 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>MLParser | opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="mlparser.html">MLParser</a>
</li>
</ul>
<h1>Namespace MLParser</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Namespace containing the code for Parsing the mail list.</p>
</div>
</div>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Interfaces</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-interface tsd-parent-kind-namespace"><a href="../interfaces/mlparser.mlitem.html" class="tsd-kind-icon">MLItem</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Functions</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-function tsd-parent-kind-namespace"><a href="mlparser.html#parsemails" class="tsd-kind-icon">parse<wbr>Mails</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Functions</h2>
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace">
<a name="parsemails" class="tsd-anchor"></a>
<h3>parse<wbr>Mails</h3>
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace">
<li class="tsd-signature tsd-kind-icon">parse<wbr>Mails<span class="tsd-signature-symbol">(</span>config<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, dataSafe<span class="tsd-signature-symbol">: </span><a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/mlparser.mlitem.html" class="tsd-signature-type">MLItem</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/mailParser.ts:54</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Encrypts and appends data to SecureVault.
Also writes data to transaction log using @function writeTransaction</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>config: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>Reference to config object.
This Function uses the following variables:
inFileMail -&gt; String reference to mail list
force -&gt; Boolean value. If true all mails are resent.
usedMails -&gt; Array of Strings. Specifies already served mail adresses.</p>
</div>
</li>
<li>
<h5>dataSafe: <a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a></h5>
<div class="tsd-comment tsd-typography">
<p>Reference to safe object. This is needed for writing to the vault.log file</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/mlparser.mlitem.html" class="tsd-signature-type">MLItem</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>Returns an array of all parsed mail adresses as promise</p>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class=" tsd-kind-namespace">
<a href="mlgenerator.html">MLGenerator</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mllogic_key.html">MLLogic_<wbr><wbr>Key</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mllogic_send.html">MLLogic_<wbr><wbr>Send</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mllogic_vault.html">MLLogic_<wbr><wbr>Vault</a>
</li>
<li class="current tsd-kind-namespace">
<a href="mlparser.html">MLParser</a>
</li>
<li class=" tsd-kind-namespace">
<a href="svault.html">SVault</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
<a href="../interfaces/mlparser.mlitem.html" class="tsd-kind-icon">MLItem</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-namespace">
<a href="mlparser.html#parsemails" class="tsd-kind-icon">parse<wbr>Mails</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>

199
docs/modules/svault.html Normal file
View File

@@ -0,0 +1,199 @@
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>SVault | opentoken</title>
<meta name="description" content="Documentation for opentoken">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">opentoken</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="svault.html">SVault</a>
</li>
</ul>
<h1>Namespace SVault</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Namespace containing the code for the SecureVault.</p>
</div>
</div>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Classes</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-class tsd-parent-kind-namespace"><a href="../classes/svault.securevault.html" class="tsd-kind-icon">Secure<wbr>Vault</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Interfaces</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-interface tsd-parent-kind-namespace"><a href="../interfaces/svault.securevaultitem.html" class="tsd-kind-icon">Secure<wbr>Vault<wbr>Item</a></li>
<li class="tsd-kind-interface tsd-parent-kind-namespace"><a href="../interfaces/svault.storageitem.html" class="tsd-kind-icon">Storage<wbr>Item</a></li>
<li class="tsd-kind-interface tsd-parent-kind-namespace"><a href="../interfaces/svault.securevaultlist.html" class="tsd-kind-icon">secure<wbr>Vault<wbr>List</a></li>
</ul>
</section>
<section class="tsd-index-section tsd-is-not-exported">
<h3>Variables</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported"><a href="svault.html#vaultversion" class="tsd-kind-icon">vault<wbr>Version</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-not-exported">
<h2>Variables</h2>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported">
<a name="vaultversion" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagConst">Const</span> vault<wbr>Version</h3>
<div class="tsd-signature tsd-kind-icon">vault<wbr>Version<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"v1.2"</span><span class="tsd-signature-symbol"> = &quot;v1.2&quot;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/vault.ts:36</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>vault version number. This variable will be added to the safe file and is used to chack compatibility.</p>
</div>
</div>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class=" tsd-kind-namespace">
<a href="mlgenerator.html">MLGenerator</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mllogic_key.html">MLLogic_<wbr><wbr>Key</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mllogic_send.html">MLLogic_<wbr><wbr>Send</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mllogic_vault.html">MLLogic_<wbr><wbr>Vault</a>
</li>
<li class=" tsd-kind-namespace">
<a href="mlparser.html">MLParser</a>
</li>
<li class="current tsd-kind-namespace">
<a href="svault.html">SVault</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-class tsd-parent-kind-namespace">
<a href="../classes/svault.securevault.html" class="tsd-kind-icon">Secure<wbr>Vault</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
<a href="../interfaces/svault.securevaultitem.html" class="tsd-kind-icon">Secure<wbr>Vault<wbr>Item</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
<a href="../interfaces/svault.storageitem.html" class="tsd-kind-icon">Storage<wbr>Item</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
<a href="../interfaces/svault.securevaultlist.html" class="tsd-kind-icon">secure<wbr>Vault<wbr>List</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported">
<a href="svault.html#vaultversion" class="tsd-kind-icon">vault<wbr>Version</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>

121
index.ts
View File

@@ -1,102 +1,27 @@
import * as fs from 'fs'
import { generateToken } from './src/generate'
import { SecureVault } from './src/vault'
import { exit } from 'process';
let configPath = "", action = -1, pubKey = "", privKey = "", safeFile = "", mails = "", html = "", dryrun = false, force = false;
// parse cli args
for (let i = 1; i < process.argv.length ; i++){
if (process.argv[i] === "--config"){
if (i + 1 < process.argv.length && !process.argv[i+1].startsWith("--")){
configPath = process.argv[i+1];
}else {throw new Error("Invalid params")}
}
if (process.argv[i] === "--pubkey"){
if (i + 1 < process.argv.length && !process.argv[i+1].startsWith("--")){
pubKey = process.argv[i+1];
}else {throw new Error("Invalid params")}
}
if (process.argv[i] === "--privkey"){
if (i + 1 < process.argv.length && !process.argv[i+1].startsWith("--")){
privKey = process.argv[i+1];
}else {throw new Error("Invalid params")}
}
if (process.argv[i] === "--safe"){
if (i + 1 < process.argv.length && !process.argv[i+1].startsWith("--")){
safeFile = process.argv[i+1];
}else {throw new Error("Invalid params")}
}
if (process.argv[i] === "--mails"){
if (i + 1 < process.argv.length && !process.argv[i+1].startsWith("--")){
mails = process.argv[i+1];
}else {throw new Error("Invalid params")}
}
if (process.argv[i] === "--html"){
if (i + 1 < process.argv.length && !process.argv[i+1].startsWith("--")){
html = process.argv[i+1];
}else {throw new Error("Invalid params")}
}
if (process.argv[i] === "--send"){ action = 1 }
if (process.argv[i] === "--decrypt"){ action = 2 }
if (process.argv[i] === "--genkey"){ action = 3 }
if (process.argv[i] === "--dryrun"){ dryrun = true }
if (process.argv[i] === "--force"){ force = true }
}
if ( action == -1){ throw new Error("No Action specified") }
if (!configPath && action == 1){ throw new Error("Config-Path not specified") }
if (!pubKey && action != 2){ throw new Error("Public-Key not specified") }
if (!safeFile && action != 3){ throw new Error("Safe-file not specified") }
if (!privKey && action >= 2){ throw new Error("Private-Key not specified") }
if (!mails && action == 1){ throw new Error("Mail-Input not specified") }
if (!html && action == 1){ throw new Error("Mail-Template not specified") }
/**
* Dennis Gunia (c) 2020
*
* Entry point for opentoken. This file parses the cli parameters and runs the specified actions with the specified ßparameters.
*
*
* @summary Open-Token entry point
* @author Dennis Gunia <info@dennisgunia.de>
* @license Licensed under the Apache License, Version 2.0 (the "License").
*
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
import { OpenTokenCLI } from './src/cli/OpenTokenCLI';
if (action == 1){
let dataSafe: SecureVault = new SecureVault(pubKey,privKey);
// load config
const confRaw = fs.readFileSync(configPath, 'utf8')
let config:any = {}
let addition: boolean = false; // wenn nur weitere hinzugefügt werden
config = JSON.parse(confRaw)
// load safe if present
if (fs.existsSync(safeFile)){
dataSafe.loadData(safeFile);
config.usedTokens = dataSafe.getStorage(dataSafe.findStorage("usedTokens")[0].u);
config.usedMails = dataSafe.getStorage(dataSafe.findStorage("usedMails")[0].u);
addition = true;
}else{
config.usedTokens = [];
config.usedMails = [];
}
try {
config.inFileMail = mails;
config.htmlPath = html;
config.dryrun = dryrun;
config.force = force;
} catch (error) {
console.error("Cannote read config file!")
process.exit(100);
}
generateToken(config,dataSafe).then(el => {
if (addition){
dataSafe.setStorage(dataSafe.findStorage("usedTokens")[0].u,el.codes)
dataSafe.setStorage(dataSafe.findStorage("usedMails")[0].u,el.mails)
dataSafe.saveData(safeFile);
}else{
dataSafe.pushStorage('usedTokens',el.codes)
dataSafe.pushStorage('usedMails',el.mails)
dataSafe.saveData(safeFile);
}
}).catch(err => console.error("error", err))
}else if(action == 2){
let dataSafe: SecureVault = new SecureVault(pubKey,privKey);
dataSafe.loadData(safeFile);
dataSafe.decryptData();
}else if(action == 3){
SecureVault.genKey(pubKey,privKey);
}
const commandLine: OpenTokenCLI = new OpenTokenCLI();
commandLine.execute();

41
package-lock.json generated
View File

@@ -4,6 +4,29 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@rushstack/ts-command-line": {
"version": "4.7.3",
"resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.7.3.tgz",
"integrity": "sha512-8FNrUSbMgKLgRVcsg1STsIC2xAdyes7qJtVwg36hSnBAMZgCCIM+Z36nnxyrnYTS/6qwiXv7fwVaUxXH+SyiAQ==",
"requires": {
"@types/argparse": "1.0.38",
"argparse": "~1.0.9",
"colors": "~1.2.1",
"string-argv": "~0.3.1"
},
"dependencies": {
"colors": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.2.5.tgz",
"integrity": "sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg=="
}
}
},
"@types/argparse": {
"version": "1.0.38",
"resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz",
"integrity": "sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA=="
},
"@types/cli-progress": {
"version": "3.8.0",
"resolved": "https://registry.npmjs.org/@types/cli-progress/-/cli-progress-3.8.0.tgz",
@@ -43,6 +66,14 @@
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
},
"argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"requires": {
"sprintf-js": "~1.0.2"
}
},
"cli-progress": {
"version": "3.8.2",
"resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.8.2.tgz",
@@ -104,6 +135,16 @@
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
},
"sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
},
"string-argv": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz",
"integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg=="
},
"string-width": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",

View File

@@ -11,6 +11,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@rushstack/ts-command-line": "^4.7.3",
"@types/cli-progress": "^3.8.0",
"@types/handlebars": "^4.1.0",
"@types/node": "^14.11.1",

67
src/cli/KeyAction.ts Normal file
View File

@@ -0,0 +1,67 @@
/**
* Dennis Gunia (c) 2020
*
* CLI Key-Action CommandLineAction Implementation.
*
* @summary CLI Key-Action CommandLineAction Implementation.
* @author Dennis Gunia <info@dennisgunia.de>
* @license Licensed under the Apache License, Version 2.0 (the "License").
*
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
import { CommandLineAction, CommandLineFlagParameter, CommandLineChoiceParameter, CommandLineStringParameter } from "@rushstack/ts-command-line";
import { MLLogic_Key } from "../logic/KeyLogic";
export class KeyAction extends CommandLineAction {
private _generate!: CommandLineFlagParameter;
private _pubkey!: CommandLineStringParameter;
private _privkey!: CommandLineStringParameter;
public constructor() {
super({
actionName: 'key',
summary: 'Manage RSA Keypair',
documentation: 'Manage RSA Keypair'
});
}
protected onExecute(): Promise<void> { // abstract
return new Promise<void>((resolve,reject) => {
MLLogic_Key.generate(this._privkey.value,this._pubkey.value);
})
}
protected onDefineParameters(): void { // abstract
this._generate = this.defineFlagParameter({
parameterLongName: '--generate',
parameterShortName: '-g',
description: 'Send to all recipients, regardless if mail was already sent. Overwrites safe with new codes.'
});
this._pubkey = this.defineStringParameter({
parameterLongName: '--pubkey',
parameterShortName: '-p',
description: 'Specify the public key to use',
required: true,
argumentName: "PUBLICKEY"
})
this._privkey = this.defineStringParameter({
parameterLongName: '--privkey',
parameterShortName: '-r',
description: 'Specify the private key to use',
required: true,
argumentName: "PRIVATEKEY"
})
}
}

52
src/cli/OpenTokenCLI.ts Normal file
View File

@@ -0,0 +1,52 @@
import { CommandLineParser, CommandLineFlagParameter } from "@rushstack/ts-command-line";
/**
* Dennis Gunia (c) 2020
*
* CommandLineAction Implementation.
*
* @summary CommandLineAction Implementation.
* @author Dennis Gunia <info@dennisgunia.de>
* @license Licensed under the Apache License, Version 2.0 (the "License").
*
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
import { KeyAction } from "./KeyAction";
import { SendAction } from "./SendAction";
import { VaultAction } from "./VaultAction";
export class OpenTokenCLI extends CommandLineParser {
private _verbose!: CommandLineFlagParameter;
public constructor() {
super({
toolFilename: 'opentoken',
toolDescription: 'The "opentoken" tool is to generate codes and deliver them to a list of recpipients without disclosing which user has which token.'
});
this.addAction(new SendAction());
this.addAction(new VaultAction());
this.addAction(new KeyAction());
}
protected onDefineParameters(): void { // abstract
this._verbose = this.defineFlagParameter({
parameterLongName: '--verbose',
parameterShortName: '-v',
description: 'Show extra logging detail'
});
}
protected onExecute(): Promise<void> { // override
return super.onExecute();
}
}

108
src/cli/SendAction.ts Normal file
View File

@@ -0,0 +1,108 @@
/**
* Dennis Gunia (c) 2020
*
* CLI Send-Action CommandLineAction Implementation.
*
* @summary CLI Send-Action CommandLineAction Implementation.
* @author Dennis Gunia <info@dennisgunia.de>
* @license Licensed under the Apache License, Version 2.0 (the "License").
*
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
import { CommandLineAction, CommandLineFlagParameter, CommandLineChoiceParameter, CommandLineStringParameter } from "@rushstack/ts-command-line";
import { MLLogic_Send } from "../logic/SendLogic";
export class SendAction extends CommandLineAction {
private _force!: CommandLineFlagParameter;
private _dryrun!: CommandLineFlagParameter;
private _pubkey!: CommandLineStringParameter;
private _config!: CommandLineStringParameter;
private _safe!: CommandLineStringParameter;
private _template!: CommandLineStringParameter;
private _maillist!: CommandLineStringParameter;
public constructor() {
super({
actionName: 'send',
summary: 'Generates codes, sends mails and stores results in safe',
documentation: 'Generates codes, sends mails and stores results in safe'
});
}
protected onExecute(): Promise<void> { // abstract
return new Promise<void>((resolve,reject) => {
MLLogic_Send.send(
this._force.value,
this._dryrun.value,
this._pubkey.value,
this._config.value,
this._safe.value,
this._template.value,
this._maillist.value,
);
})
}
protected onDefineParameters(): void { // abstract
this._force = this.defineFlagParameter({
parameterLongName: '--force',
parameterShortName: '-f',
description: 'Send to all recipients, regardless if mail was already sent. Overwrites safe with new codes.'
});
this._dryrun = this.defineFlagParameter({
parameterLongName: '--dryrun',
parameterShortName: '-d',
description: 'Pretend to send mails. No outgoing SMTP connection. Safe will not be updated.'
});
this._pubkey = this.defineStringParameter({
parameterLongName: '--pubkey',
parameterShortName: '-p',
description: 'Specify the public key to use',
required: true,
argumentName: "PUBLICKEY"
})
this._config = this.defineStringParameter({
parameterLongName: '--config',
parameterShortName: '-c',
description: 'Specify the config file to use',
required: true,
argumentName: "CONFIGFILE"
})
this._maillist = this.defineStringParameter({
parameterLongName: '--mails',
parameterShortName: '-m',
description: 'Specify the maillist to use',
required: true,
argumentName: "MAILLIST"
})
this._safe = this.defineStringParameter({
parameterLongName: '--safe',
parameterShortName: '-s',
description: 'Specify the safe file to use',
required: true,
argumentName: "SAFEFILE"
})
this._template = this.defineStringParameter({
parameterLongName: '--template',
parameterShortName: '-t',
description: 'Specify the template file to use',
required: true,
argumentName: "HTMLFILE"
})
}
}

109
src/cli/VaultAction.ts Normal file
View File

@@ -0,0 +1,109 @@
/**
* Dennis Gunia (c) 2020
*
* CLI Vault-Action CommandLineAction Implementation.
*
* @summary CLI Vault-Action CommandLineAction Implementation.
* @author Dennis Gunia <info@dennisgunia.de>
* @license Licensed under the Apache License, Version 2.0 (the "License").
*
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
import { CommandLineAction, CommandLineFlagParameter, CommandLineChoiceParameter, CommandLineStringParameter } from "@rushstack/ts-command-line";
import { MLLogic_Vault } from "../logic/VaultLogic";
export class VaultAction extends CommandLineAction {
private _filter!: CommandLineChoiceParameter;
private _pubkey!: CommandLineStringParameter;
private _privkey!: CommandLineStringParameter;
private _safe!: CommandLineStringParameter;
private _getCodes!: CommandLineFlagParameter;
private _format!: CommandLineChoiceParameter;
private _revoke!: CommandLineStringParameter;
public constructor() {
super({
actionName: 'vault',
summary: 'Manages Securevault file',
documentation: 'Show user - token relations, filter and revoke token'
});
}
protected onExecute(): Promise<void> { // abstract
return new Promise<void>((resolve,reject) => {
MLLogic_Vault.open(
this._filter.value,
this._pubkey.value,
this._privkey.value,
this._safe.value,
this._getCodes.value,
this._format.value,
this._revoke.value
)
})
}
protected onDefineParameters(): void { // abstract
this._filter = this.defineChoiceParameter({
parameterLongName: '--filter',
description: 'Specify the data to show',
alternatives: ['encrypted', 'unencrypted', 'all'],
environmentVariable: 'DATATYPE',
defaultValue: 'all'
});
this._pubkey = this.defineStringParameter({
parameterLongName: '--pubkey',
parameterShortName: '-p',
description: 'Specify the public key to use',
required: true,
argumentName: "PUBLICKEY"
})
this._privkey = this.defineStringParameter({
parameterLongName: '--privkey',
parameterShortName: '-r',
description: 'Specify the private key to use',
required: true,
argumentName: "PRIVATEKEY"
})
this._safe = this.defineStringParameter({
parameterLongName: '--safe',
parameterShortName: '-s',
description: 'Specify the safe file to use',
required: true,
argumentName: "SAFEFILE"
})
this._getCodes = this.defineFlagParameter({
parameterLongName: '--get-codes',
parameterShortName: '-g',
description: 'Get a list of all non revoked codes'
});
this._format = this.defineChoiceParameter({
parameterLongName: '--format',
description: 'Specify the output format of --get-codes',
alternatives: ['json', 'regex'],
environmentVariable: 'FORMAT',
defaultValue: 'json'
});
this._revoke = this.defineStringParameter({
parameterLongName: '--revoke',
description: 'Revokes a token',
required: false,
argumentName: "TOKEN"
})
}
}

46
src/config.type.ts Normal file
View File

@@ -0,0 +1,46 @@
/**
* Dennis Gunia (c) 2020
*
* Interface for global config object
*
* @summary Open-Token entry point
* @author Dennis Gunia <info@dennisgunia.de>
* @license Licensed under the Apache License, Version 2.0 (the "License").
*
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
import SMTPTransport from 'nodemailer/lib/smtp-transport';
import { MLParser } from './mailParser';
/** Interface containing all config properties for opentoken */
export interface OTGlobalConfig {
/** nodemailer SMTP configuration */
mail: SMTPTransport,
/** sender alias */
mailFrom: string,
/** path to file containing matches */
outFileMatch: string
/** path to file containing mails */
inFileMail?: string
/** path to file containing mail template */
htmlPath?: string
/** List of used tokens */
usedTokens? : string[]
/** List of used mail adresses */
usedMails? : MLParser.MLItem[]
/** switch for dryrun */
dryrun: boolean
/** switch for force */
force: boolean
}

View File

@@ -1,151 +1,233 @@
/**
* Dennis Gunia (c) 2020
*
* Generator Implementation.
* This File provides the implementation of the code generator and mail sending functionality.
*
*
* @summary Generator Implementation.
* @author Dennis Gunia <info@dennisgunia.de>
* @license Licensed under the Apache License, Version 2.0 (the "License").
*
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
import * as fs from 'fs'
import * as path from 'path'
import * as nodemailer from 'nodemailer';
import * as cliProgress from 'cli-progress'
import { shuffleArray } from './util/shuffle';
import { mkstring } from './util/token';
import * as Handlebars from "handlebars";
import Mail from 'nodemailer/lib/mailer';
import { SecureVault } from './vault';
import { parseMails } from './mailParser';
import { SVault } from './vault';
import { MLParser } from './mailParser';
import { shuffleArray } from './util/shuffle';
import { delay, mkstringCN } from './util/misc';
interface mail{
mail: string;
name: string;
}
export interface genReturn{
codes: string[];
mails: mail[];
}
export function generateToken(config: any,dataSafe: SecureVault): Promise<genReturn>{
return new Promise<genReturn>((resolve,error) => {
parseMails(config).then(res => {
generateCodes(resolve,error,res,config,dataSafe);
})
});
}
// generate codes
async function generateCodes(resolve: (value?: genReturn) => void,error: (reason?: any) => void,mailArray: mail[],config: any,dataSafe: SecureVault){
console.log("\nGenerating codes")
const pbar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);
pbar.start(mailArray.length, 0,{
speed: "N/A"
});
let position = 0;
let codeArray: string[] = [];
let checkString: string = '';
let listString: string = '';
for(let i = 0; i < mailArray.length; i++){ // as many codes as adresses
// check that codes are unique
let code = '';
do{
code = mkstring(4);
}while ( (config.force ? codeArray : [...codeArray, ...config.usedTokens]).includes(code))
codeArray.push(code);
checkString = `${checkString}|${code}`
listString = `${listString}\n${code}`
position ++;
pbar.update(position);
/**
* Namespace containing the code for Generating the Code and delivering the mails
*/
export namespace MLGenerator {
/**
* Interface used to Return codes and mails form the main Function {@link generateToken}
*/
export interface MLGenReturn{
/** List of generated codes */
codes: string[];
/** List of processed mails */
mails: MLParser.MLItem[];
}
checkString = checkString.substr(1);
listString = listString.substr(1);
pbar.stop();
//write code lists
try {
if (!fs.existsSync(path.dirname(config.outFileMatch))){
fs.mkdirSync(path.dirname(config.outFileMatch));
}
fs.writeFileSync(config.outFileMatch, checkString);
} catch (err) {
error(err);
}
sendMails(resolve,error,mailArray,codeArray,config,dataSafe);
}
// randomize mails and tokens
async function sendMails(resolve: (value?: genReturn) => void,error: (reason?: any) => void,mailArray: mail[],codeArray: string[],config: any,dataSafe: SecureVault){
let mailserver = nodemailer.createTransport(config.mail);
// read mail template
let template!: HandlebarsTemplateDelegate<any>;
try {
const htmlSrc=fs.readFileSync(config.htmlPath, "utf8")
template = Handlebars.compile(htmlSrc)
} catch (error) {
console.error("Cannote read template file!")
error(error);
}
console.log("\nSending mails")
const pbar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);
pbar.start(mailArray.length, 0,{
speed: "N/A"
});
let position = 0;
shuffleArray(mailArray);
shuffleArray(codeArray);
if (config.force){dataSafe.clearVault();}
for(let i = 0; i < mailArray.length; i++){
// send mail
if (!config.dryrun){
dataSafe.pushData({
name: mailArray[i].name,
mail: mailArray[i].mail,
code: codeArray[i]
/**
* Main function used to generate and deliver codes
* @param config Main configuration object
* @param dataSafe Main safe used for logging and storing data
* @returns used codes and processed mails
*/
export function generateToken(config: any,dataSafe: SVault.SecureVault): Promise<MLGenReturn>{
return new Promise<MLGenReturn>((resolve,error) => {
MLParser.parseMails(config, dataSafe).then(res => {
// next step
generateCodes(resolve,error,res,config,dataSafe);
})
}
await send(mailArray[i].name, mailArray[i].mail, codeArray[i],template,mailserver,config);
position ++;
pbar.update(position);
});
}
pbar.stop();
shuffleArray(mailArray);
shuffleArray(codeArray);
shuffleArray(mailArray);
shuffleArray(codeArray);
resolve({
codes: config.force ? codeArray : (config.dryrun ? config.usedTokens : [...codeArray, ...config.usedTokens]),
mails: config.force ? mailArray : (config.dryrun ? config.usedMails : [...mailArray, ...config.usedMails])
});
}
async function send(name: string, mail: string, code: string,template: HandlebarsTemplateDelegate<any>,mailserver: Mail,config: any){
if (config.dryrun){
await delay(100);
console.log(`\n\x1b[36m -> dryrun: would send to ${mail}\x1b[0m`);
}else{
// fill template
let html = template({
"name": name,
"mail": mail,
"code": code
})
let mailOptions = {
from: `${config.mailFrom} <${config.mail.auth.user}>`, // sender address
to: mail, // list of receivers
subject: `Dein Zugangscode zur BJR Wahl`, // Subject line
html: html
};
/**
* Generate the same amout of codes as distinct mail adresses and stores them to the list file
* This function also includes previously used tokens to prevent duplicate tokens.
* Rejects if matchfile cannot be saved.
* @internal
* @param resolve Callback to resolve promise
* @param error Callback to reject promise
* @param mailArray list of mail adresses
* @param config Main configuration object
* This Function uses the following variables:
* usedTokens -> List of previosly used tokens
* outFileMatch -> Path to match file
* @param dataSafe Main safe used for logging and storing data
*/
async function generateCodes(resolve: (value?: MLGenReturn) => void,error: (reason?: any) => void,mailArray: MLParser.MLItem[],config: any,dataSafe: SVault.SecureVault){
console.log("\nGenerating codes")
const pbar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);
pbar.start(mailArray.length, 0,{
speed: "N/A"
});
let position = 0;
let codeArray: string[] = [];
let checkString: string = '';
for(let i = 0; i < mailArray.length; i++){ // as many codes as adresses
// check that codes are unique
let code = '';
do{
code = mkstringCN(4);
}while ( (config.force ? codeArray : [...codeArray, ...config.usedTokens]).includes(code))
codeArray.push(code);
checkString = `${checkString}|${code}`
position ++;
pbar.update(position);
}
checkString = checkString.substr(1);
pbar.stop();
//write code lists
try {
await mailserver.sendMail(mailOptions);
if (!fs.existsSync(path.dirname(config.outFileMatch))){
fs.mkdirSync(path.dirname(config.outFileMatch));
}
fs.writeFileSync(config.outFileMatch, checkString);
} catch (err) {
error(err);
}
// next
sendMails(resolve,error,mailArray,codeArray,config,dataSafe);
}
/**
* Reads template file and compiles template.
* Iterate through mails and codes, randomly assign code to mail and send mail to recipient.
* If dryrun is enabled, mails will not be sent and new mails won't be included in return.
* Rejects if template cannot be read.
* @internal
* @param resolve Callback to resolve promise
* @param error Callback to reject promise
* @param mailArray list of mail adresses
* @param codeArray list of generated codes
* @param config Main configuration object
* This Function uses the following variables:
* htmlPath -> Path to html template
* dryrun -> Boolean value. If true no mails will be sent and list won't be updated.
* force -> Boolean value. If true all mails are resent.
* usedTokens -> Array of Strings. Specifies already used tokens adresses.
* usedMails -> Array of Strings. Specifies already served mail adresses.
* mail -> mailserver settings
* @param dataSafe Main safe used for logging and storing data
*/
async function sendMails(resolve: (value?: MLGenReturn) => void,error: (reason?: any) => void,mailArray: MLParser.MLItem[],codeArray: string[],config: any,dataSafe: SVault.SecureVault){
let mailserver = nodemailer.createTransport(config.mail);
// read mail template and compile
let template!: HandlebarsTemplateDelegate<any>;
try {
const htmlSrc=fs.readFileSync(config.htmlPath, "utf8")
template = Handlebars.compile(htmlSrc)
} catch (error) {
console.log(`Error sendign mail to ${mail} : ${error}`)
console.error("Cannote read template file!")
error(error);
}
// send mails
console.log("\nSending mails")
const pbar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);
pbar.start(mailArray.length, 0,{
speed: "N/A"
});
let position = 0;
// randomize arrays
shuffleArray(mailArray);
shuffleArray(codeArray);
if (config.force){dataSafe.clearVault();}
for(let i = 0; i < mailArray.length; i++){
// send mail
dataSafe.writeTransaction(`process: ${mailArray[i].mail}`);
if (!config.dryrun){
dataSafe.pushData({
name: mailArray[i].name,
mail: mailArray[i].mail,
code: codeArray[i]
})
}
await send(mailArray[i].name, mailArray[i].mail, codeArray[i],template,mailserver,config,dataSafe);
position ++;
pbar.update(position);
}
pbar.stop();
shuffleArray(mailArray);
shuffleArray(codeArray);
shuffleArray(mailArray);
shuffleArray(codeArray);
resolve({
codes: config.force ? codeArray : (config.dryrun ? config.usedTokens : [...codeArray, ...config.usedTokens]),
mails: config.force ? mailArray : (config.dryrun ? config.usedMails : [...mailArray, ...config.usedMails])
});
}
/**
* Reads template file and compiles template.
* Iterate through mails and codes, randomly assign code to mail and send mail to recipient.
* If dryrun is enabled, mails will not be sent and new mails won't be included in return.
* Rejects if template cannot be read.
* @internal
* @param name Name of recpipient
* @param mail Mail of recpipient
* @param code Code of recpipient
* @param template compiled mail template
* @param mailserver Mailserver settings
* @param config Main configuration object
* This Function uses the following variables:
* mail.auth.user -> sender mail adress
* mailFrom -> sender mail ailas
* dryrun -> Boolean value. If true no mails will be sent.
* @param dataSafe Main safe used for logging and storing data
*/
async function send(name: string, mail: string, code: string,template: HandlebarsTemplateDelegate<any>,mailserver: Mail,config: any,dataSafe: SVault.SecureVault){
if (config.dryrun){
await delay(100);
console.log(`\n\x1b[36m -> dryrun: would send to ${mail}\x1b[0m`);
}else{
// fill template
let html = template({
"name": name,
"mail": mail,
"code": code
})
let mailOptions = {
from: `${config.mailFrom} <${config.mail.auth.user}>`, // sender address
to: mail, // list of receivers
subject: `Dein Zugangscode zur BJR Wahl`, // Subject line
html: html
};
try {
await mailserver.sendMail(mailOptions);
dataSafe.writeTransaction(` -> mail sent`);
} catch (error) {
console.log(`Error sendign mail to ${mail} : ${error}`)
dataSafe.writeTransaction(` -> mail failed : ${error}`);
}
}
}
}
function delay(t: number, val?: number) {
return new Promise(function(resolve) {
setTimeout(function() {
resolve(val);
}, t);
});
}

33
src/logic/KeyLogic.ts Normal file
View File

@@ -0,0 +1,33 @@
/**
* Dennis Gunia (c) 2020
*
* CLI Key-Action Implementation.
*
* @summary CLI Key-Action Implementation.
* @author Dennis Gunia <info@dennisgunia.de>
* @license Licensed under the Apache License, Version 2.0 (the "License").
*
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
import { SVault } from "../vault";
/**
* Namespace containing the code for the Key CLI Command.
*/
export namespace MLLogic_Key {
export function generate(privkey: string | undefined, pubkey: string | undefined){
if (!pubkey || !privkey){
throw new Error("Private or Public key path not specified")
}
SVault.SecureVault.genKey(pubkey,privkey);
}
}

82
src/logic/SendLogic.ts Normal file
View File

@@ -0,0 +1,82 @@
/**
* Dennis Gunia (c) 2020
*
* CLI Send-Action Implementation.
*
* @summary CLI Send-Action Implementation.
* @author Dennis Gunia <info@dennisgunia.de>
* @license Licensed under the Apache License, Version 2.0 (the "License").
*
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
import { OTGlobalConfig } from "../config.type";
import { MLGenerator } from "../generate";
import { SVault } from "../vault";
import * as fs from 'fs'
/**
* Namespace containing the code for the Send CLI Command.
*/
export namespace MLLogic_Send {
export function send(
_force: boolean,
_dryrun: boolean,
_pubkey: string = '',
_config: string = '',
_safe: string = '',
_template: string = '',
_maillist: string = ''
){
let dataSafe: SVault.SecureVault = new SVault.SecureVault(_pubkey);
dataSafe.writeTransaction(`Started ...`);
// load config
const confRaw = fs.readFileSync(_config, 'utf8')
let config: OTGlobalConfig = JSON.parse(confRaw)
let addition: boolean = false; // wenn nur weitere hinzugefügt werden
// load safe if present
if (fs.existsSync(_safe)){
dataSafe.loadData(_safe);
config.usedTokens = dataSafe.getStorage(dataSafe.findStorage("usedTokens")[0].u);
config.usedMails = dataSafe.getStorage(dataSafe.findStorage("usedMails")[0].u);
addition = true;
}else{
config.usedTokens = [];
config.usedMails = [];
}
try {
config.inFileMail = _maillist;
config.htmlPath = _template;
config.dryrun = _dryrun;
config.force = _force;
} catch (error) {
console.error("Cannote read config file!")
process.exit(100);
}
MLGenerator.generateToken(config,dataSafe).then(el => {
if (addition){
dataSafe.setStorage(dataSafe.findStorage("usedTokens")[0].u,el.codes)
dataSafe.setStorage(dataSafe.findStorage("usedMails")[0].u,el.mails)
dataSafe.saveData(_safe);
}else{
dataSafe.pushStorage('usedTokens',el.codes)
dataSafe.pushStorage('usedMails',el.mails)
dataSafe.saveData(_safe);
}
dataSafe.writeTransaction(`Process exited successfully`);
}).catch(err => {
dataSafe.writeTransaction(`Process exited with error ${err}`);
console.error("error", err)
})
}
}

117
src/logic/VaultLogic.ts Normal file
View File

@@ -0,0 +1,117 @@
/**
* Dennis Gunia (c) 2020
*
* CLI Vault-Action Implementation.
*
* @summary CLI Vault-Action Implementation.
* @author Dennis Gunia <info@dennisgunia.de>
* @license Licensed under the Apache License, Version 2.0 (the "License").
*
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
import { SVault } from "../vault";
import * as util from 'util'
import { exit } from "process";
/**
* Namespace containing the code for the Vault CLI Command.
*/
export namespace MLLogic_Vault {
export async function open(
_filter: string = '',
_pubkey: string = '',
_privkey: string = '',
_safe: string = '',
_getCodes: boolean,
_format: string = '',
_revoke: string | undefined,
){
let dataSafe: SVault.SecureVault = new SVault.SecureVault(_pubkey,_privkey);
dataSafe.loadData(_safe);
const vault: SVault.SecureVaultItem[] = await dataSafe.decryptData();
if (_revoke){
revokeToken(dataSafe,_revoke,_safe)
}else if(_getCodes){
getCodes(dataSafe,_format);
}else{
printAsJSON(_filter,dataSafe,vault);
}
}
function printAsJSON(_filter: string, dataSafe:SVault.SecureVault, vault: SVault.SecureVaultItem[]){
switch(_filter){
case 'all':
console.log(util.inspect({
encrypted: vault,
unencrypted: dataSafe.getAllStorage()
}, {showHidden: false, depth: null,colors: true}))
break;
case 'encrypted':
console.log(vault);
break;
case 'unencrypted':
console.log(dataSafe.getAllStorage());
break;
}
}
function revokeToken(dataSafe:SVault.SecureVault, _revoke: string,_safe: string){
const revListUUID:SVault.StorageItem[] = dataSafe.findStorage("revokeList");
// if list exists, test if token already revoked
let rev = [];
if (revListUUID.length > 0){
rev = dataSafe.getStorage(revListUUID[0].u)
if(rev.includes(_revoke)){
console.error("Token already revoked");
exit(1)
}
}
// test if token exists
const used = dataSafe.getStorage(dataSafe.findStorage("usedTokens")[0].u)
if(!used.includes(_revoke)){
console.error("Token does not exist");
exit(1)
}
// append to or create list
if (revListUUID.length == 0){
dataSafe.pushStorage("revokeList",[_revoke])
}else{
dataSafe.setStorage(revListUUID[0].u,[...rev,_revoke])
}
dataSafe.saveData(_safe)
}
function getCodes(dataSafe:SVault.SecureVault,_format: string){
const used: string[] = dataSafe.getStorage(dataSafe.findStorage("usedTokens")[0].u)
const revListUUID:SVault.StorageItem[] = dataSafe.findStorage("revokeList");
// get revoke list if exists
let rev: string[] = [];
if (revListUUID.length > 0){
rev = dataSafe.getStorage(revListUUID[0].u)
}
const vaildCodes = used.filter(el => !rev.includes(el));
switch(_format){
case 'json':
console.log(vaildCodes)
break;
case 'regex':
let checkString: string = '';
vaildCodes.forEach(el => checkString = `${checkString}|${el}`)
console.log(checkString.substr(1))
break;
}
}
}

View File

@@ -1,63 +1,118 @@
import { rejects } from "assert";
/**
* Dennis Gunia (c) 2020
*
* MailParser Implementation.
* This File provides a vault for storing encrypted and unencrypted data. Each encrypted element will be encrypted before storing it in an array.
* Each element (encrypted or unencrypted) ist stored in an array with an unique identifier.
* Safes can be stored and loaded. Unencrypted data can be stored, retrieved and modified. Encrypted data can be stored and retrieved.
* This class also implements an transaction function.
*
* @summary SecureVault Class Implementation
* @author Dennis Gunia <info@dennisgunia.de>
* @license Licensed under the Apache License, Version 2.0 (the "License").
*
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
import * as fs from 'fs'
import { Console } from "console";
import { SVault } from "./vault";
export interface MLItem{
mail: string;
name: string;
}
export function parseMails(config: any) {
return new Promise<MLItem[]>((resolve,reject) => {
let mailArray: MLItem[] = [];
let currSection: string = "global";
let lineCounter: number = 0;
let curCounter: number = 0;
console.log(`Reading mails for section ${currSection}`)
// read and process mail list
let readline = require('readline'),
instream = fs.createReadStream(config.inFileMail),
outstream = new (require('stream'))(),
rl = readline.createInterface(instream, outstream);
rl.on('line', function (line:string) {
lineCounter ++;
if(line.startsWith('[')){
if(line.endsWith(']')){
console.log(`Read ${curCounter} adresses for section ${currSection}`)
curCounter = 0;
currSection=line.substring(1,line.length -1);
console.log(`Reading mails for section ${currSection}`)
}else{
console.error(`Error parsing section on line ${lineCounter}: Syntax Error. Missing closing bracket ]`)
}
}else if (!line.startsWith('#')){
const ix = line.indexOf(";")
if (ix !== -1){
// check if already exist
if (config.force || config.usedMails.filter((el: MLItem) => el.mail == line.substr(0,ix)).length == 0){
mailArray.push({
mail: line.substr(0,ix),
name: line.substr(ix + 1)
})
curCounter ++;
/**
* Namespace containing the code for Parsing the mail list.
*/
export namespace MLParser{
/**
* Interface containing properties of a single mail line
*/
export interface MLItem{
/** mail adress parsed form file */
mail: string;
/** name parsed form file */
name: string;
}
/**
* Encrypts and appends data to SecureVault.
* Also writes data to transaction log using @function writeTransaction
* @param config - Reference to config object.
* This Function uses the following variables:
* inFileMail -> String reference to mail list
* force -> Boolean value. If true all mails are resent.
* usedMails -> Array of Strings. Specifies already served mail adresses.
*
* @param dataSafe - Reference to safe object. This is needed for writing to the vault.log file
* @return Returns an array of all parsed mail adresses as promise
*/
export function parseMails(config: any, dataSafe: SVault.SecureVault) {
return new Promise<MLItem[]>((resolve,reject) => {
let mailArray: MLItem[] = [];
let currSection: string = "global";
let lineCounter: number = 0;
let curCounter: number = 0;
console.log(`Reading mails for section ${currSection}`)
// read and process mail list
let readline = require('readline'),
instream = fs.createReadStream(config.inFileMail),
outstream = new (require('stream'))(),
rl = readline.createInterface(instream, outstream);
rl.on('line', function (line:string) {
lineCounter ++;
if(line.startsWith('[')){
if(line.endsWith(']')){
console.log(`Read ${curCounter} adresses for section ${currSection}`)
curCounter = 0;
currSection=line.substring(1,line.length -1);
console.log(`Reading mails for section ${currSection}`)
}else{
console.error(`Skipping ${line.substr(0,ix)}: Already sent`)
console.error(`Error parsing section on line ${lineCounter}: Syntax Error. Missing closing bracket ]`)
}
}else{
console.error(`Error parsing mail on line ${lineCounter}: Syntax Error. Missing ;`)
}
}
});
rl.on('close', function (line:string) {
// next step
console.log(`Read ${curCounter} adresses for section ${currSection}\n${mailArray.length} mails read!`)
resolve(mailArray);
});
})
}else if (!line.startsWith('#')){
const ix = line.indexOf(";")
if (ix !== -1){
// check if already exist
dataSafe.writeTransaction(`reading mail ${line.substr(0,ix)} from category ${currSection}`);
if (config.force || config.usedMails.filter((el: MLItem) => el.mail == line.substr(0,ix)).length == 0){
// check for duplicate
if ( mailArray.filter((el: MLItem) => el.mail == line.substr(0,ix)).length == 0){
mailArray.push({
mail: line.substr(0,ix),
name: line.substr(ix + 1)
})
curCounter ++;
}else{
dataSafe.writeTransaction(` -> duplicate mail. Skipping`);
console.error(`Skipping ${line.substr(0,ix)}: Duplicate`)
}
}else{
dataSafe.writeTransaction(` -> already exists. Skipping`);
console.error(`Skipping ${line.substr(0,ix)}: Already sent`)
}
}else{
console.error(`Error parsing mail on line ${lineCounter}: Syntax Error. Missing ;`)
}
}
});
rl.on('close', function (line:string) {
// next step
console.log(`Read ${curCounter} adresses for section ${currSection}\n${mailArray.length} mails read!`)
resolve(mailArray);
});
})
}
}

50
src/util/misc.ts Normal file
View File

@@ -0,0 +1,50 @@
/**
* Dennis Gunia (c) 2020
*
* Reusable functions for different projects.
*
* @summary Open-Token entry point
* @author Dennis Gunia <info@dennisgunia.de>
* @license Licensed under the Apache License, Version 2.0 (the "License").
*
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/**
* Generate random string with specified length.
* Generates only numbers and capital letters.
* @param length length of String
* @return generated string
*/
export function mkstringCN (length:number ) {
var result = '';
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
var charactersLength = characters.length;
for ( var i = 0; i < length; i++ ) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
}
/**
* Wraps setTimeout into Promise
* @param t Millisceonds
*/
export function delay(t: number) {
return new Promise(function(resolve) {
setTimeout(function() {
resolve();
}, t);
});
}

View File

@@ -1,3 +1,7 @@
/**
* Randomize items in an array
* @param array Array to be shuffeled
*/
export function shuffleArray(array: any[]) {
for (var i = array.length - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
@@ -5,4 +9,4 @@ export function shuffleArray(array: any[]) {
array[i] = array[j];
array[j] = temp;
}
}
}

View File

@@ -1,9 +0,0 @@
export function mkstring (length:number ) {
var result = '';
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
var charactersLength = characters.length;
for ( var i = 0; i < length; i++ ) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
}

View File

@@ -1,177 +1,307 @@
/**
* Dennis Gunia (c) 2020
*
* SecureVault Class Implementation.
* This Class provides a vault for storing encrypted and unencrypted data. Each encrypted element will be encrypted before storing it in an array.
* Each element (encrypted or unencrypted) ist stored in an array with an unique identifier.
* Safes can be stored and loaded. Unencrypted data can be stored, retrieved and modified. Encrypted data can be stored and retrieved.
* This class also implements an transaction function.
*
* @summary SecureVault Class Implementation
* @author Dennis Gunia <info@dennisgunia.de>
* @license Licensed under the Apache License, Version 2.0 (the "License").
*
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
import * as crypto from 'crypto'
import * as uuid from 'uuid'
import path from 'path';
import path, { resolve } from 'path';
import * as fs from 'fs'
import { generateKeyPair } from 'crypto';
import { Console } from 'console';
const vaultVersion = 'v1.2'
/**
* Namespace containing the code for the SecureVault.
*/
export namespace SVault {
/** vault version number. This variable will be added to the safe file and is used to chack compatibility. */
const vaultVersion = 'v1.2'
export interface SecureVaultItem {
u: string; // uuid
d: string; // data
k: string; // key
iv: string; // init vector
}
export interface StorageItem {
u: string; // uuid
d: string; // data
t: string; // tag
}
export interface secureVaultList {
items: SecureVaultItem[];
publicKey?: Buffer;
privateKey?: Buffer;
}
export class SecureVault {
safe: secureVaultList;
privPath?: string;
pubPath?: string;
storage: StorageItem[];
constructor (publicKey: string, privateKey?: string) {
this.storage = [];
this.safe = {
items: [],
publicKey: publicKey ?fs.readFileSync(path.resolve(publicKey)): undefined,
privateKey: privateKey ? fs.readFileSync(path.resolve(privateKey)): undefined
};
this.privPath = publicKey ? path.resolve(publicKey): undefined,
this.pubPath = privateKey ? path.resolve(privateKey): undefined
/** Interface for an vault item containing encrypted data */
export interface SecureVaultItem {
/** uuid */
u: string;
/** data */
d: string;
/** key */
k: string;
/** init vector */
iv: string;
}
async pushData(data: any): Promise<string>{
// encrypt payload
const txtData = JSON.stringify(data);
const key = crypto.randomBytes(32);
const iv = crypto.randomBytes(16);
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(key), iv);
let encrypted = cipher.update(txtData);
encrypted = Buffer.concat([encrypted, cipher.final()]);
// encrypt key
var buffer = new Buffer(key);
if (!this.safe.publicKey){
throw new Error("Public Key not found");
/** Interface for an vault item containing unencrypted data */
export interface StorageItem {
/** uuid */
u: string;
/** data */
d: string;
/** tag (can be used to find specific items) */
t: string;
}
/** Interface for secureVault Array */
export interface secureVaultList {
items: SecureVaultItem[]; /** Array of encrypted items */
publicKey?: Buffer; /** Binary of public key */
privateKey?: Buffer; /** Binary of private key */
}
/** Class representing a SecureVault. */
export class SecureVault {
/** Safe object */
safe: secureVaultList;
/** Path to private key */
privPath?: string;
/** Path to public key */
pubPath?: string;
/** Array of unencrypted items */
storage: StorageItem[];
/**
* Create a SecureVault.
* @param publicKey - Path to public key.
* @param privateKey - Path to private key.
*/
constructor (publicKey?: string, privateKey?: string) {
this.storage = [];
this.safe = {
items: [],
publicKey: publicKey ?fs.readFileSync(path.resolve(publicKey)): undefined,
privateKey: privateKey ? fs.readFileSync(path.resolve(privateKey)): undefined
};
this.privPath = publicKey ? path.resolve(publicKey): undefined,
this.pubPath = privateKey ? path.resolve(privateKey): undefined
}
var asym_encrypted = crypto.publicEncrypt(this.safe.publicKey, buffer);
const u = uuid.v4()
this.safe.items.push({
u,
d: encrypted.toString('hex'),
k: asym_encrypted.toString("base64"),
iv: iv.toString('hex')
})
return u;
}
async saveData(path: string): Promise<void>{
fs.writeFileSync(path, JSON.stringify({
version: vaultVersion,
vault: this.safe.items,
storage: this.storage
}));
}
/**
* Encrypts and appends data to SecureVault.
* Also writes data to transaction log using @function writeTransaction
* @param data - Path to public key.
* @return Returns the uuid of the added object as promise
*/
async pushData(data: any): Promise<string>{
// encrypt payload
const txtData = JSON.stringify(data);
const key = crypto.randomBytes(32);
const iv = crypto.randomBytes(16);
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(key), iv);
let encrypted = cipher.update(txtData);
encrypted = Buffer.concat([encrypted, cipher.final()]);
// encrypt key
var buffer = new Buffer(key);
if (!this.safe.publicKey){
throw new Error("Public Key not found");
}
var asym_encrypted = crypto.publicEncrypt(this.safe.publicKey, buffer);
const u = uuid.v4()
async loadData(path: string): Promise<void>{
const loaded = JSON.parse(fs.readFileSync(path, 'utf8'));
switch (loaded.version){
case 'v1.1':
this.safe.items = loaded.vault;
break;
case 'v1.2':
this.safe.items = loaded.vault;
this.storage = loaded.storage;
break;
default:
console.error(`Unknown or unsupported vault file version: ${loaded.version}`)
const item = {
u,
d: encrypted.toString('hex'),
k: asym_encrypted.toString("base64"),
iv: iv.toString('hex')
}
this.writeTransaction("push: " + JSON.stringify(item))
this.safe.items.push(item)
return u;
}
}
async decryptData(): Promise<void>{
this.safe.items.forEach(el => {
// decrpyt key
let buffer = new Buffer(el.k, "base64");
if (!this.safe.privateKey){
throw new Error("Private Key not found");
/**
* Writes data to the vault log file located at ./vault.log
* @param payload - Text to append
*/
writeTransaction(payload: string){
fs.appendFileSync('vault.log', `${payload}\n`);
}
/**
* Saves safe to file
* @param path - Path to safefile.
* @return Resolves promise after loaded
*/
async saveData(path: string): Promise<void>{
fs.writeFileSync(path, JSON.stringify({
version: vaultVersion,
vault: this.safe.items,
storage: this.storage
}));
}
/**
* Loads safe from file and check compatibility
* @param path - Path to safefile.
* @return Resolves promise after loaded
*/
async loadData(path: string): Promise<void>{
const loaded = JSON.parse(fs.readFileSync(path, 'utf8'));
switch (loaded.version){
case 'v1.1':
this.safe.items = loaded.vault;
break;
case 'v1.2':
this.safe.items = loaded.vault;
this.storage = loaded.storage;
break;
default:
console.error(`Unknown or unsupported vault file version: ${loaded.version}`)
}
var key = crypto.privateDecrypt(this.safe.privateKey, buffer);
// decrpyt payload
let iv = Buffer.from(el.iv, 'hex');
let encryptedText = Buffer.from(el.d, 'hex');
let decipher = crypto.createDecipheriv('aes-256-cbc', key, iv);
let decrypted = decipher.update(encryptedText);
decrypted = Buffer.concat([decrypted, decipher.final()]);
const obj = JSON.parse(decrypted.toString());
console.log(obj);
})
}
}
static genKey(publicKeyDir: string, privateKeyDir: string){
generateKeyPair('rsa', {
modulusLength: 4096,
publicKeyEncoding: {
type: 'pkcs1',
format: 'pem'
},
privateKeyEncoding: {
type: 'pkcs1',
format: 'pem',
}
}, (err, publicKey, privateKey) => {
fs.writeFileSync(privateKeyDir, privateKey);
fs.writeFileSync(publicKeyDir, publicKey);
});
}
/**
* Decrypts safe data.
* Requires specified and loaded private key.
* Prints data to console.
* @return Resolves promise after decrypted
*/
async decryptData(): Promise<SecureVaultItem[]>{
let decrypted_list: SecureVaultItem[] = [];
this.safe.items.forEach(el => {
// decrpyt key
let buffer = new Buffer(el.k, "base64");
if (!this.safe.privateKey){
throw new Error("Private Key not found");
}
var key = crypto.privateDecrypt(this.safe.privateKey, buffer);
// decrpyt payload
let iv = Buffer.from(el.iv, 'hex');
let encryptedText = Buffer.from(el.d, 'hex');
let decipher = crypto.createDecipheriv('aes-256-cbc', key, iv);
let decrypted = decipher.update(encryptedText);
decrypted = Buffer.concat([decrypted, decipher.final()]);
decrypted_list.push(JSON.parse(decrypted.toString()));
pushStorage(tag:string, data: any){
if (vaultVersion !== 'v1.2'){
throw new Error(`Storage not supported in ${vaultVersion}`);
}else{
let objJsonStr = JSON.stringify(data);
let objJsonB64 = Buffer.from(objJsonStr).toString("base64");
this.storage.push({
u: uuid.v4(),
d: objJsonB64,
t: tag
})
return decrypted_list
}
/**
* Generates RSA keypair.
* @param publicKey - Path to public key.
* @param privateKey - Path to private key.
*/
static genKey(publicKeyDir: string, privateKeyDir: string){
generateKeyPair('rsa', {
modulusLength: 4096,
publicKeyEncoding: {
type: 'pkcs1',
format: 'pem'
},
privateKeyEncoding: {
type: 'pkcs1',
format: 'pem',
}
}, (err, publicKey, privateKey) => {
fs.writeFileSync(privateKeyDir, privateKey);
fs.writeFileSync(publicKeyDir, publicKey);
});
}
}
setStorage(suuid:string, data: any){
if (vaultVersion !== 'v1.2'){
throw new Error(`Storage not supported in ${vaultVersion}`);
}else{
let objJsonStr = JSON.stringify(data);
let objJsonB64 = Buffer.from(objJsonStr,"utf8").toString("base64");
this.storage.filter(el => el.u == suuid)[0].d = objJsonB64;
/**
* Appends unencrypted data to safe.
* @param tag - Tag for item
* @param data - Data to store.
*/
pushStorage(tag:string, data: any){
if (vaultVersion !== 'v1.2'){
throw new Error(`Storage not supported in ${vaultVersion}`);
}else{
let objJsonStr = JSON.stringify(data);
let objJsonB64 = Buffer.from(objJsonStr).toString("base64");
this.storage.push({
u: uuid.v4(),
d: objJsonB64,
t: tag
});
}
}
/**
* Sets unencrypted data for item specified by suuid.
* @param suuid - UUID for item
* @param data - Data to store.
*/
setStorage(suuid:string, data: any){
if (vaultVersion !== 'v1.2'){
throw new Error(`Storage not supported in ${vaultVersion}`);
}else{
let objJsonStr = JSON.stringify(data);
let objJsonB64 = Buffer.from(objJsonStr,"utf8").toString("base64");
this.storage.filter(el => el.u == suuid)[0].d = objJsonB64;
}
}
/**
* Gets unencrypted data of item specified by suuid.
* @param suuid - UUID for item
* @return Data from item.
*/
getStorage(suuid:string){
if (vaultVersion !== 'v1.2'){
throw new Error(`Storage not supported in ${vaultVersion}`);
}else{
const data = this.storage.filter(el => el.u == suuid)[0];
let objJsonB64 = new Buffer(data.d, 'base64');
return JSON.parse(objJsonB64.toString('utf8'));
}
}
/**
* Gets all unencrypted data as array.
* @return Data from item.
*/
getAllStorage(){
if (vaultVersion !== 'v1.2'){
throw new Error(`Storage not supported in ${vaultVersion}`);
}else{
let data_arr: StorageItem[] = [];
this.storage.forEach(el => {
let objJsonB64 = new Buffer(el.d, 'base64');
data_arr.push({
u: el.u,
t: el.t,
d: JSON.parse(objJsonB64.toString('utf8'))
});
})
return data_arr;
}
}
/**
* Gets list of UUIDs matching the tag.
* @param tag - tag to search for
* @return UUID from item.
*/
findStorage(tag:string){
if (vaultVersion !== 'v1.2'){
throw new Error(`Storage not supported in ${vaultVersion}`);
}else{
return this.storage.filter(el => el.t == tag);
}
}
/**
* Clears all encrypted items from safe.
*/
clearVault(){
this.safe.items = [];
}
}
getStorage(suuid:string){
if (vaultVersion !== 'v1.2'){
throw new Error(`Storage not supported in ${vaultVersion}`);
}else{
const data = this.storage.filter(el => el.u == suuid)[0];
let objJsonB64 = new Buffer(data.d, 'base64');
return JSON.parse(objJsonB64.toString('utf8'));
}
}
findStorage(tag:string){
if (vaultVersion !== 'v1.2'){
throw new Error(`Storage not supported in ${vaultVersion}`);
}else{
return this.storage.filter(el => el.t == tag);
}
}
clearVault(){
this.safe.items = [];
}
}
}

View File

@@ -1,23 +0,0 @@
Hallo {{name}},<br/><br/>
du wurdest ausgewählt Einfluss auf die Wahl des Bezirks-Jugend-Rats 2020 zu nehmen!<br/>
Du hast das Privileg am Jugendtag unter folgender URL abzustimmen:<br/>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSdHNZSoYTHnS_Tg-BODcwdkXFDaaP1niuj8a_PlADiilMVEIw/viewform?usp=pp_url&entry.220991222={{code}}">https://docs.google.com/forms/d/e/1FAIpQLSdHNZSoYTHnS_Tg-BODcwdkXFDaaP1niuj8a_PlADiilMVEIw/viewform?usp=pp_url&entry.220991222={{code}}</a><br/>
<br/>
Sollte dieser Link nicht funktionieren, verwende bitte den Code <b>{{code}}</b> auf der Seite <a href="https://forms.gle/6WHfptZ7QcbqxBE38">https://forms.gle/6WHfptZ7QcbqxBE38</a>.<br /><br />
Die Wahlen werden im Rahmen des Jugendtags-Sitzung durchgeführt. Der Link wird erst zu diesem Zeitpunk gültig.<br/>
Die Sitzung wird am 10. Oktober 2020 Online über Zoom stattfinden. Link und Uhrzeit hierzu folgen in einer seperaten Mail.<br/><br/>
<font color=#f00><b>WICHTIG: Bitte stimme erst ab, wenn die Anmeldung offiziell eröffnet ist. Alle vorherigen Einsendungen werden nicht berücksichtigt.</b></font><br/>
<font color=#f00><b>WICHTIG: Dies ist deine persönlichen Zugangsdaten. Bitte gib diese nicht weiter.</b></font><br/><br/>
Bei weiteren Fragen zu den Wahlen wende dich bitte an: nyi@nazarener.de
<br/><br/>
Viel Spaß!<br/>
Dein BJR<br/>
<br/>
<img src="https://cdn.dennisgunia.de/nyi_small_dark.png" width="50px"><br><hr><br>
<font color=darkgray>
Wenn Sie nicht der richtige Adressat sind, oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte den Absender und löschen Sie diese Mail.<br>
Dies ist eine automatisch generierte Mail bitte antworten sie nicht auf diese e-mail sondern wenden sie sich bei Rückfragen direkt an nyi@nazarener.de
</font>

View File

@@ -4,7 +4,7 @@
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */

4
typedoc.json Normal file
View File

@@ -0,0 +1,4 @@
{
"mode": "file",
"out": "docs"
}