fix(core): update

This commit is contained in:
Philipp Kunz 2019-11-21 14:01:41 +00:00
parent c40d745f98
commit d50cb5449a
4 changed files with 63 additions and 49 deletions

66
package-lock.json generated
View File

@ -99,7 +99,6 @@
"version": "3.0.11", "version": "3.0.11",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-3.0.11.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-3.0.11.tgz",
"integrity": "sha512-SDKRPj9+xBTqozlDPcA7O6BcccM1Tw/sXPVP+OnhNxCubDZ/L2kGNpPpqm43NJUoNxSSo5wdBw4N7MAFYCGdVg==", "integrity": "sha512-SDKRPj9+xBTqozlDPcA7O6BcccM1Tw/sXPVP+OnhNxCubDZ/L2kGNpPpqm43NJUoNxSSo5wdBw4N7MAFYCGdVg==",
"dev": true,
"requires": { "requires": {
"@pushrocks/smartdelay": "^2.0.3", "@pushrocks/smartdelay": "^2.0.3",
"@pushrocks/smartpromise": "^3.0.2", "@pushrocks/smartpromise": "^3.0.2",
@ -160,20 +159,12 @@
"@pushrocks/smartpromise": "^3.0.6", "@pushrocks/smartpromise": "^3.0.6",
"@types/node": "^12.12.7", "@types/node": "^12.12.7",
"is-wsl": "^2.1.1" "is-wsl": "^2.1.1"
},
"dependencies": {
"@types/node": {
"version": "12.12.8",
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.12.8.tgz",
"integrity": "sha512-XLla8N+iyfjvsa0KKV+BP/iGSoTmwxsu5Ci5sM33z9TjohF72DEz95iNvD6pPmemvbQgxAv/909G73gUn8QR7w=="
}
} }
}, },
"@pushrocks/smartevent": { "@pushrocks/smartevent": {
"version": "2.0.3", "version": "2.0.3",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartevent/-/smartevent-2.0.3.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartevent/-/smartevent-2.0.3.tgz",
"integrity": "sha512-x4B1mzzE6LrMATXsRLNuZpMTlB2JodL44MA4bF4FucU3SBBiWhFv3CFJRlO9B23SKZ1fwdJQrk2lT7YTUHXXJQ==", "integrity": "sha512-x4B1mzzE6LrMATXsRLNuZpMTlB2JodL44MA4bF4FucU3SBBiWhFv3CFJRlO9B23SKZ1fwdJQrk2lT7YTUHXXJQ==",
"dev": true,
"requires": { "requires": {
"@pushrocks/smartpromise": "^2.0.5" "@pushrocks/smartpromise": "^2.0.5"
}, },
@ -181,8 +172,7 @@
"@pushrocks/smartpromise": { "@pushrocks/smartpromise": {
"version": "2.0.5", "version": "2.0.5",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-2.0.5.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-2.0.5.tgz",
"integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g==", "integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g=="
"dev": true
} }
} }
}, },
@ -234,13 +224,13 @@
} }
}, },
"@pushrocks/smartletter": { "@pushrocks/smartletter": {
"version": "1.0.10", "version": "1.0.15",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartletter/-/smartletter-1.0.10.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartletter/-/smartletter-1.0.15.tgz",
"integrity": "sha512-ya2IBEAmH1YfZ+DYsrGBksFShUJkyjpJDgd+pB3uA87tUCkvVDoskAFYFthnMk/RWm7IG1Tml0v1Vj/9QSiz3Q==", "integrity": "sha512-ErW0VoRqJtFKIaIG+VlPfmfBtdTmd3dTnlW6SF2zxRaZf0cIq43P2h+wdKYpJO8lKESl3kidItVSXZ7WB9pLpg==",
"requires": { "requires": {
"@pushrocks/smartdelay": "^2.0.6", "@pushrocks/smartdelay": "^2.0.6",
"@pushrocks/smartmarkdown": "^2.0.2", "@pushrocks/smartmarkdown": "^2.0.2",
"@pushrocks/smartpdf": "^1.0.29", "@pushrocks/smartpdf": "^2.0.2",
"@tsclass/tsclass": "^2.0.13", "@tsclass/tsclass": "^2.0.13",
"lit-ntml": "^2.10.0" "lit-ntml": "^2.10.0"
} }
@ -323,9 +313,9 @@
"integrity": "sha512-MaI0+uLQPCr2V3WGnbdgb0pWa9xkWyrP4qYcbsHIjeismGLbn9s3jmP/HIXU8LkgzRgaVb+BJxmZJHOwl32DyA==" "integrity": "sha512-MaI0+uLQPCr2V3WGnbdgb0pWa9xkWyrP4qYcbsHIjeismGLbn9s3jmP/HIXU8LkgzRgaVb+BJxmZJHOwl32DyA=="
}, },
"@pushrocks/smartpdf": { "@pushrocks/smartpdf": {
"version": "1.0.29", "version": "2.0.2",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpdf/-/smartpdf-1.0.29.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpdf/-/smartpdf-2.0.2.tgz",
"integrity": "sha512-McJ9EVEzPs9F6nNT+6okJMwLlJ8kerzevyVjgQPCgjnxk3atdcbc91ojoBerQp3Cjf3c0Dh3xeC4CFDqx2ACKQ==", "integrity": "sha512-fzKFWCBbmx76h/rStJckx3dGHOgWRuMalBBCLKLtY+KZk4/fT/kL88Bax4dZ3cCGKDaBfSiJNL9CJX7gsHl70w==",
"requires": { "requires": {
"@pushrocks/smartfile": "^7.0.6", "@pushrocks/smartfile": "^7.0.6",
"@pushrocks/smartnetwork": "^1.1.14", "@pushrocks/smartnetwork": "^1.1.14",
@ -367,7 +357,6 @@
"version": "2.0.5", "version": "2.0.5",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.5.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.5.tgz",
"integrity": "sha512-BOlIJmnCO8pxqu9f18D9UV5rIsyrmKeK/mWNMiAe/NH2OTeRPNLpgmhZBkXSKNVD8tSsD8aazs4BcACgYOg1FQ==", "integrity": "sha512-BOlIJmnCO8pxqu9f18D9UV5rIsyrmKeK/mWNMiAe/NH2OTeRPNLpgmhZBkXSKNVD8tSsD8aazs4BcACgYOg1FQ==",
"dev": true,
"requires": { "requires": {
"@pushrocks/lik": "^3.0.11", "@pushrocks/lik": "^3.0.11",
"@pushrocks/smartevent": "^2.0.3", "@pushrocks/smartevent": "^2.0.3",
@ -404,7 +393,6 @@
"version": "3.0.12", "version": "3.0.12",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmarttime/-/smarttime-3.0.12.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmarttime/-/smarttime-3.0.12.tgz",
"integrity": "sha512-NoMt1NUhNqcF5y7fCTHoC3d/+MobzgNUg6yHbSGxFRaentQzCrMPNahQIVLbrAStf03LUUBePUjSRdPYucP1gw==", "integrity": "sha512-NoMt1NUhNqcF5y7fCTHoC3d/+MobzgNUg6yHbSGxFRaentQzCrMPNahQIVLbrAStf03LUUBePUjSRdPYucP1gw==",
"dev": true,
"requires": { "requires": {
"@pushrocks/smartpromise": "^3.0.2", "@pushrocks/smartpromise": "^3.0.2",
"@types/cron": "^1.7.1", "@types/cron": "^1.7.1",
@ -425,12 +413,13 @@
} }
}, },
"@pushrocks/tapbundle": { "@pushrocks/tapbundle": {
"version": "3.0.13", "version": "3.2.0",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.0.13.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.2.0.tgz",
"integrity": "sha512-23O4UMBafCuD+RnUlXNvtT9DGbL1HMD+xZE1Zcr7Ll7WvgxUgRQQfk9kq6qbLLbjaRe1J2Ijsgh1HuZbBaucLQ==", "integrity": "sha512-xnKIGe7NJqxWBaFeKIEXShDjV2wap1XJqmlp3m1MKqmIF62vRpZnkzpyE1ZAoNwiYQmIsXIpvP/PDv+iPevPfw==",
"requires": { "requires": {
"@pushrocks/early": "^3.0.3", "@pushrocks/early": "^3.0.3",
"@pushrocks/smartdelay": "^2.0.3", "@pushrocks/smartdelay": "^2.0.3",
"@pushrocks/smartfile": "^7.0.6",
"@pushrocks/smartpromise": "^3.0.2", "@pushrocks/smartpromise": "^3.0.2",
"smartchai": "^2.0.1" "smartchai": "^2.0.1"
} }
@ -485,7 +474,6 @@
"version": "1.7.1", "version": "1.7.1",
"resolved": "https://verdaccio.lossless.one/@types%2fcron/-/cron-1.7.1.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fcron/-/cron-1.7.1.tgz",
"integrity": "sha512-48brwgU18DqA0mQX1As5OcJEo1yNjaXMM6Mk4r8K1dOzLJRQ37FE/kCivKx7ClKEHfhX2FdcxKzJ1B744a+V3A==", "integrity": "sha512-48brwgU18DqA0mQX1As5OcJEo1yNjaXMM6Mk4r8K1dOzLJRQ37FE/kCivKx7ClKEHfhX2FdcxKzJ1B744a+V3A==",
"dev": true,
"requires": { "requires": {
"@types/node": "*", "@types/node": "*",
"moment": ">=2.14.0" "moment": ">=2.14.0"
@ -548,8 +536,7 @@
"@types/luxon": { "@types/luxon": {
"version": "1.15.2", "version": "1.15.2",
"resolved": "https://verdaccio.lossless.one/@types%2fluxon/-/luxon-1.15.2.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fluxon/-/luxon-1.15.2.tgz",
"integrity": "sha512-zHPoyVrLvNaiMRYdhmh88Rn489ZgAgbc6iLxR5Yi0VCNfeNYHcszbhJV2vDHLNrVGy35BPtWBRn4OP2F9BBvFw==", "integrity": "sha512-zHPoyVrLvNaiMRYdhmh88Rn489ZgAgbc6iLxR5Yi0VCNfeNYHcszbhJV2vDHLNrVGy35BPtWBRn4OP2F9BBvFw=="
"dev": true
}, },
"@types/marked": { "@types/marked": {
"version": "0.6.5", "version": "0.6.5",
@ -564,13 +551,12 @@
"@types/minimatch": { "@types/minimatch": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "https://verdaccio.lossless.one/@types%2fminimatch/-/minimatch-3.0.3.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fminimatch/-/minimatch-3.0.3.tgz",
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
"dev": true
}, },
"@types/node": { "@types/node": {
"version": "10.17.5", "version": "12.12.11",
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-10.17.5.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.12.11.tgz",
"integrity": "sha512-RElZIr/7JreF1eY6oD5RF3kpmdcreuQPjg5ri4oQ5g9sq7YWU8HkfB3eH8GwAwxf5OaCh0VPi7r4N/yoTGelrA==" "integrity": "sha512-O+x6uIpa6oMNTkPuHDa9MhMMehlxLAd5QcOvKRjAFsBVpeFWTOPnXbDvILvFgFFZfQ1xh1EZi1FbXxUix+zpsQ=="
}, },
"@types/portscanner": { "@types/portscanner": {
"version": "2.1.0", "version": "2.1.0",
@ -1076,7 +1062,6 @@
"version": "1.7.2", "version": "1.7.2",
"resolved": "https://verdaccio.lossless.one/cron/-/cron-1.7.2.tgz", "resolved": "https://verdaccio.lossless.one/cron/-/cron-1.7.2.tgz",
"integrity": "sha512-+SaJ2OfeRvfQqwXQ2kgr0Y5pzBR/lijf5OpnnaruwWnmI799JfWr2jN2ItOV9s3A/+TFOt6mxvKzQq5F0Jp6VQ==", "integrity": "sha512-+SaJ2OfeRvfQqwXQ2kgr0Y5pzBR/lijf5OpnnaruwWnmI799JfWr2jN2ItOV9s3A/+TFOt6mxvKzQq5F0Jp6VQ==",
"dev": true,
"requires": { "requires": {
"moment-timezone": "^0.5.x" "moment-timezone": "^0.5.x"
} }
@ -1260,9 +1245,9 @@
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="
}, },
"which": { "which": {
"version": "2.0.1", "version": "2.0.2",
"resolved": "https://verdaccio.lossless.one/which/-/which-2.0.1.tgz", "resolved": "https://verdaccio.lossless.one/which/-/which-2.0.2.tgz",
"integrity": "sha512-N7GBZOTswtB9lkQBZA4+zAXrjEIWAUOB93AvzUiudRzRxhUdLURQ7D/gAIMY1gatT/LTbmbcv8SiYazy3eYB7w==", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"requires": { "requires": {
"isexe": "^2.0.0" "isexe": "^2.0.0"
} }
@ -2126,8 +2111,7 @@
"luxon": { "luxon": {
"version": "1.21.1", "version": "1.21.1",
"resolved": "https://verdaccio.lossless.one/luxon/-/luxon-1.21.1.tgz", "resolved": "https://verdaccio.lossless.one/luxon/-/luxon-1.21.1.tgz",
"integrity": "sha512-3zxaKX7mj7eA80TU0sm4CfNEtiUZ2QXGjMc80rfG4d1dOnnOOWz63U9j4nYR7+1w716DYtWfdOeVhDXYlH+D4w==", "integrity": "sha512-3zxaKX7mj7eA80TU0sm4CfNEtiUZ2QXGjMc80rfG4d1dOnnOOWz63U9j4nYR7+1w716DYtWfdOeVhDXYlH+D4w=="
"dev": true
}, },
"make-error": { "make-error": {
"version": "1.3.5", "version": "1.3.5",
@ -2237,14 +2221,12 @@
"moment": { "moment": {
"version": "2.24.0", "version": "2.24.0",
"resolved": "https://verdaccio.lossless.one/moment/-/moment-2.24.0.tgz", "resolved": "https://verdaccio.lossless.one/moment/-/moment-2.24.0.tgz",
"integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==", "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg=="
"dev": true
}, },
"moment-timezone": { "moment-timezone": {
"version": "0.5.27", "version": "0.5.27",
"resolved": "https://verdaccio.lossless.one/moment-timezone/-/moment-timezone-0.5.27.tgz", "resolved": "https://verdaccio.lossless.one/moment-timezone/-/moment-timezone-0.5.27.tgz",
"integrity": "sha512-EIKQs7h5sAsjhPCqN6ggx6cEbs94GK050254TIJySD1bzoM5JTYDwAU1IoVOeTOL6Gm27kYJ51/uuvq1kIlrbw==", "integrity": "sha512-EIKQs7h5sAsjhPCqN6ggx6cEbs94GK050254TIJySD1bzoM5JTYDwAU1IoVOeTOL6Gm27kYJ51/uuvq1kIlrbw==",
"dev": true,
"requires": { "requires": {
"moment": ">= 2.9.0" "moment": ">= 2.9.0"
} }
@ -2744,7 +2726,6 @@
"version": "6.5.3", "version": "6.5.3",
"resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.5.3.tgz", "resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.5.3.tgz",
"integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==",
"dev": true,
"requires": { "requires": {
"tslib": "^1.9.0" "tslib": "^1.9.0"
} }
@ -3066,8 +3047,7 @@
"tslib": { "tslib": {
"version": "1.10.0", "version": "1.10.0",
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-1.10.0.tgz", "resolved": "https://verdaccio.lossless.one/tslib/-/tslib-1.10.0.tgz",
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ=="
"dev": true
}, },
"tslint": { "tslint": {
"version": "5.20.1", "version": "5.20.1",

View File

@ -16,14 +16,15 @@
"@gitzone/tsbuild": "^2.0.22", "@gitzone/tsbuild": "^2.0.22",
"@gitzone/tstest": "^1.0.15", "@gitzone/tstest": "^1.0.15",
"@pushrocks/qenv": "^4.0.6", "@pushrocks/qenv": "^4.0.6",
"@pushrocks/tapbundle": "^3.0.7", "@pushrocks/tapbundle": "^3.2.0",
"@types/node": "^10.11.7", "@types/node": "^12.12.11",
"tslint": "^5.11.0", "tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0" "tslint-config-prettier": "^1.15.0"
}, },
"dependencies": { "dependencies": {
"@pushrocks/smartletter": "^1.0.10", "@pushrocks/smartletter": "^1.0.15",
"@pushrocks/smartrequest": "^1.1.42" "@pushrocks/smartrequest": "^1.1.42",
"@pushrocks/smartrx": "^2.0.5"
}, },
"files": [ "files": [
"ts/**/*", "ts/**/*",

View File

@ -6,11 +6,42 @@ export interface ILetterXpressConstructorOptions {
} }
export class LetterXpressAccount { export class LetterXpressAccount {
public baseApiUrl = 'https://api.letterxpress.de/v1/';
public options: ILetterXpressConstructorOptions; public options: ILetterXpressConstructorOptions;
public letterSentObservable = new plugins.smartrx.rxjs.Subject<plugins.smartletter.Letter>();
constructor(optionsArg: ILetterXpressConstructorOptions) { constructor(optionsArg: ILetterXpressConstructorOptions) {
this.options = optionsArg; this.options = optionsArg;
} }
public request() {} /**
* sends a letter
* @param letterArg
*/
public async sendLetter(letterArg: plugins.smartletter.Letter) {
const letterPdfResult = await letterArg.getPdfResult();
const response = await this.request('/setJob', 'POST', {});
}
/**
* fires the request
*/
private async request(routeArg: string, methodArg: 'GET' | 'POST', payload?: any) {
const requestUrl = `${this.baseApiUrl}`;
const requestData = {
auth: {
username: this.options.email,
apikey: this.options.apiKey
},
...payload
};
const response = await plugins.smartrequest.request(routeArg, {
method: methodArg,
headers: {
'Content-Type': 'application/json'
},
requestBody: JSON.stringify(requestData)
});
}
} }

View File

@ -1,3 +1,5 @@
import * as smartletter from '@pushrocks/smartletter';
import * as smartrequest from '@pushrocks/smartrequest'; import * as smartrequest from '@pushrocks/smartrequest';
import * as smartrx from '@pushrocks/smartrx';
export { smartrequest }; export { smartletter, smartrequest, smartrx };