Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
4d4d46ef7c | |||
696d56067c | |||
fa3f4b4ccf | |||
5b823b09ac |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@mojoio/letterxpress",
|
"name": "@mojoio/letterxpress",
|
||||||
"version": "1.0.16",
|
"version": "1.0.18",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@mojoio/letterxpress",
|
"name": "@mojoio/letterxpress",
|
||||||
"version": "1.0.16",
|
"version": "1.0.18",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@push.rocks/smartbuffer": "^1.0.3",
|
"@push.rocks/smartbuffer": "^1.0.3",
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@apiclient.xyz/letterxpress",
|
"name": "@apiclient.xyz/letterxpress",
|
||||||
"version": "1.0.16",
|
"version": "1.0.18",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "an unofficial API package for the letterxpress API",
|
"description": "an unofficial API package for the letterxpress API",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
@@ -9,7 +9,7 @@ let testAccount: letterxpress.LetterXpressAccount;
|
|||||||
let testLetter: tsclass.business.ILetter;
|
let testLetter: tsclass.business.ILetter;
|
||||||
|
|
||||||
tap.test('should create a valid account', async () => {
|
tap.test('should create a valid account', async () => {
|
||||||
testAccount = await letterxpress.LetterXpressAccount.createAndInit({
|
testAccount = await letterxpress.LetterXpressAccount.createAndStart({
|
||||||
apiKey: await testQenv.getEnvVarOnDemand('API_TOKEN'),
|
apiKey: await testQenv.getEnvVarOnDemand('API_TOKEN'),
|
||||||
username: await testQenv.getEnvVarOnDemand('API_USERNAME'),
|
username: await testQenv.getEnvVarOnDemand('API_USERNAME'),
|
||||||
});
|
});
|
||||||
@@ -104,7 +104,7 @@ tap.test('should send an actual letter', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should be able to delete the sending job', async (toolsArg) => {
|
tap.test('should be able to delete the sending job', async (toolsArg) => {
|
||||||
await toolsArg.delayFor(30000);
|
await toolsArg.delayFor(5000);
|
||||||
await testAccount.cancelLetter(testLetter);
|
await testAccount.cancelLetter(testLetter);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@apiclient.xyz/letterxpress',
|
name: '@apiclient.xyz/letterxpress',
|
||||||
version: '1.0.16',
|
version: '1.0.18',
|
||||||
description: 'an unofficial API package for the letterxpress API'
|
description: 'an unofficial API package for the letterxpress API'
|
||||||
}
|
}
|
||||||
|
@@ -7,9 +7,9 @@ export interface ILetterXpressConstructorOptions {
|
|||||||
|
|
||||||
export class LetterXpressAccount {
|
export class LetterXpressAccount {
|
||||||
// STATIC
|
// STATIC
|
||||||
public static async createAndInit(optionsArg: ConstructorParameters<typeof LetterXpressAccount>[0]) {
|
public static async createAndStart(optionsArg: ConstructorParameters<typeof LetterXpressAccount>[0]) {
|
||||||
const letterXpressInstance = new LetterXpressAccount(optionsArg);
|
const letterXpressInstance = new LetterXpressAccount(optionsArg);
|
||||||
await letterXpressInstance.init();
|
await letterXpressInstance.start();
|
||||||
return letterXpressInstance;
|
return letterXpressInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ export class LetterXpressAccount {
|
|||||||
this.options = optionsArg;
|
this.options = optionsArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async init() {
|
public async start() {
|
||||||
this.deesDocumentInstance = await plugins.deesDocument.PdfService.createAndStart({});
|
this.deesDocumentInstance = await plugins.deesDocument.PdfService.createAndStart({});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,6 +97,7 @@ export class LetterXpressAccount {
|
|||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
requestBody: JSON.stringify(requestData),
|
requestBody: JSON.stringify(requestData),
|
||||||
|
keepAlive: false,
|
||||||
});
|
});
|
||||||
console.log(response.body);
|
console.log(response.body);
|
||||||
return response;
|
return response;
|
||||||
|
Reference in New Issue
Block a user