node-behind-api-client 2.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitlab-ci.yml +20 -0
- package/README.md +65 -0
- package/docs/behind-api-client/easyjob/JobDescriptions/README.md +654 -0
- package/docs/behind-api-client/easyjob/README.md +647 -0
- package/docs/behind-api-client/easyjob/applicants/README.md +494 -0
- package/docs/behind-api-client/easyjob/applications/README.md +754 -0
- package/docs/behind-api-client/easyjob/candidateProfiles/README.md +940 -0
- package/docs/behind-api-client/easyjob/jd-candidate-questions/README.md +372 -0
- package/docs/behind-api-client/payments/payture/README.21.md +901 -0
- package/docs/behind-api-client/payments/payture/README.cards.md +1497 -0
- package/docs/behind-api-client/payments/payture/README.md +1497 -0
- package/docs/behind-api-client/payments/payture/README.rukitchen.md +396 -0
- package/docs/behind-api-client/payments/payture/README.subscriptions.md +1266 -0
- package/docs/behind-api-client/payments/stripe/README.flow.md +254 -0
- package/docs/behind-api-client/rag/storage/README.md +519 -0
- package/example.js +35 -0
- package/index.cjs +14 -0
- package/index.js +15 -0
- package/lib/behind-api-auth-client/BehindApiAuthClient.js +91 -0
- package/lib/behind-api-auth-client/authorisation/AuthorisationApp.js +9 -0
- package/lib/behind-api-auth-client/authorisation/AuthorisationV10.js +9 -0
- package/lib/behind-api-auth-client/authorisation/AuthorisationV10Code.js +30 -0
- package/lib/behind-api-auth-client/example.js +47 -0
- package/lib/behind-api-auth-client/package.json +9 -0
- package/lib/behind-api-client/BehindApiClient.js +137 -0
- package/lib/behind-api-client/chat/ChatApp.js +11 -0
- package/lib/behind-api-client/chat/ChatV10.js +13 -0
- package/lib/behind-api-client/chat/ChatV10Chat.js +87 -0
- package/lib/behind-api-client/chat/ChatV10Chats.js +14 -0
- package/lib/behind-api-client/chat/ChatV10Message.js +57 -0
- package/lib/behind-api-client/chat/ChatV20.js +11 -0
- package/lib/behind-api-client/chat/ChatV20Chat.js +14 -0
- package/lib/behind-api-client/chat/ChatV20Message.js +27 -0
- package/lib/behind-api-client/easyjob/EasyjobApp.js +9 -0
- package/lib/behind-api-client/easyjob/EasyjobV10.js +31 -0
- package/lib/behind-api-client/easyjob/EasyjobV10Answers.js +16 -0
- package/lib/behind-api-client/easyjob/EasyjobV10Applicants.js +29 -0
- package/lib/behind-api-client/easyjob/EasyjobV10Applications.js +39 -0
- package/lib/behind-api-client/easyjob/EasyjobV10CandidateProfileArtifacts.js +31 -0
- package/lib/behind-api-client/easyjob/EasyjobV10CandidateProfiles.js +99 -0
- package/lib/behind-api-client/easyjob/EasyjobV10Companies.js +36 -0
- package/lib/behind-api-client/easyjob/EasyjobV10Cv.js +15 -0
- package/lib/behind-api-client/easyjob/EasyjobV10Departments.js +37 -0
- package/lib/behind-api-client/easyjob/EasyjobV10JobDescriptionArtifacts.js +29 -0
- package/lib/behind-api-client/easyjob/EasyjobV10JobDescriptionCandidateQuestions.js +63 -0
- package/lib/behind-api-client/easyjob/EasyjobV10JobDescriptions.js +93 -0
- package/lib/behind-api-client/easyjob/EasyjobV10Reports.js +35 -0
- package/lib/behind-api-client/example.js +47 -0
- package/lib/behind-api-client/global/GlobalApp.js +9 -0
- package/lib/behind-api-client/global/GlobalV10.js +11 -0
- package/lib/behind-api-client/global/GlobalV10Sockets.js +16 -0
- package/lib/behind-api-client/global/GlobalV10Storage.js +29 -0
- package/lib/behind-api-client/gpt/GptApp.js +15 -0
- package/lib/behind-api-client/gpt/GptV10.js +15 -0
- package/lib/behind-api-client/gpt/GptV10Prompt.js +17 -0
- package/lib/behind-api-client/gpt/GptV10Request.js +16 -0
- package/lib/behind-api-client/gpt/GptV10Storedprompts.js +14 -0
- package/lib/behind-api-client/gpt/GptV10Whisper.js +23 -0
- package/lib/behind-api-client/gpt/GptV20.js +9 -0
- package/lib/behind-api-client/gpt/GptV20Prompt.js +15 -0
- package/lib/behind-api-client/gpt/GptV30.js +13 -0
- package/lib/behind-api-client/gpt/GptV30Chat.js +19 -0
- package/lib/behind-api-client/gpt/GptV30Prompt.js +41 -0
- package/lib/behind-api-client/gpt/GptV30Prompts.js +32 -0
- package/lib/behind-api-client/gpt/GptV40.js +11 -0
- package/lib/behind-api-client/gpt/GptV40Prompt.js +24 -0
- package/lib/behind-api-client/gpt/GptV40Prompts.js +30 -0
- package/lib/behind-api-client/mailer/MailerApp.js +11 -0
- package/lib/behind-api-client/mailer/MailerV10.js +15 -0
- package/lib/behind-api-client/mailer/MailerV10Bulk.js +21 -0
- package/lib/behind-api-client/mailer/MailerV10Message.js +83 -0
- package/lib/behind-api-client/mailer/MailerV10Settings.js +44 -0
- package/lib/behind-api-client/mailer/MailerV10Template.js +23 -0
- package/lib/behind-api-client/mailer/MailerV20.js +9 -0
- package/lib/behind-api-client/mailer/MailerV20Message.js +21 -0
- package/lib/behind-api-client/mastogram/MastogramApp.js +9 -0
- package/lib/behind-api-client/mastogram/MastogramV10.js +13 -0
- package/lib/behind-api-client/mastogram/MastogramV10Bluesky.js +42 -0
- package/lib/behind-api-client/mastogram/MastogramV10Mastodon.js +45 -0
- package/lib/behind-api-client/mastogram/MastogramV10Telegram.js +39 -0
- package/lib/behind-api-client/monitor/MonitorApp.js +9 -0
- package/lib/behind-api-client/monitor/MonitorV10.js +13 -0
- package/lib/behind-api-client/monitor/MonitorV10Finances.js +39 -0
- package/lib/behind-api-client/monitor/MonitorV10Record.js +15 -0
- package/lib/behind-api-client/monitor/MonitorV10Records.js +22 -0
- package/lib/behind-api-client/oauth/OauthApp.js +9 -0
- package/lib/behind-api-client/oauth/OauthV10.js +9 -0
- package/lib/behind-api-client/oauth/OauthV10Authorisation.js +15 -0
- package/lib/behind-api-client/package.json +9 -0
- package/lib/behind-api-client/payments/PaymentsApp.js +13 -0
- package/lib/behind-api-client/payments/PaymentsV10.js +15 -0
- package/lib/behind-api-client/payments/PaymentsV10Gift.js +32 -0
- package/lib/behind-api-client/payments/PaymentsV10Payture.js +30 -0
- package/lib/behind-api-client/payments/PaymentsV10Product.js +15 -0
- package/lib/behind-api-client/payments/PaymentsV10Telegram.js +44 -0
- package/lib/behind-api-client/payments/PaymentsV20.js +9 -0
- package/lib/behind-api-client/payments/PaymentsV20Payture.js +32 -0
- package/lib/behind-api-client/payments/PaymentsV21.js +15 -0
- package/lib/behind-api-client/payments/PaymentsV21Cards.js +14 -0
- package/lib/behind-api-client/payments/PaymentsV21Payture.js +29 -0
- package/lib/behind-api-client/payments/PaymentsV21Stripe.js +28 -0
- package/lib/behind-api-client/payments/PaymentsV21Subscriptions.js +21 -0
- package/lib/behind-api-client/questionnaire/QuestionnaireApp.js +9 -0
- package/lib/behind-api-client/questionnaire/QuestionnaireV10.js +9 -0
- package/lib/behind-api-client/questionnaire/QuestionnaireV10Form.js +22 -0
- package/lib/behind-api-client/raet/RaetApp.js +11 -0
- package/lib/behind-api-client/raet/RaetV10.js +21 -0
- package/lib/behind-api-client/raet/RaetV10Cv.js +87 -0
- package/lib/behind-api-client/raet/RaetV10Individual.js +43 -0
- package/lib/behind-api-client/raet/RaetV10Individuals.js +38 -0
- package/lib/behind-api-client/raet/RaetV10Jd.js +47 -0
- package/lib/behind-api-client/raet/RaetV10Project.js +61 -0
- package/lib/behind-api-client/raet/RaetV10Projects.js +14 -0
- package/lib/behind-api-client/raet/RaetV10Report.js +39 -0
- package/lib/behind-api-client/raet/RaetV20.js +11 -0
- package/lib/behind-api-client/raet/RaetV20Cv.js +31 -0
- package/lib/behind-api-client/raet/RaetV20Individuals.js +25 -0
- package/lib/behind-api-client/rag/RagApp.js +9 -0
- package/lib/behind-api-client/rag/RagV10.js +9 -0
- package/lib/behind-api-client/rag/RagV10Storage.js +27 -0
- package/lib/behind-api-client/ruKitchen/RuKitchenApp.js +9 -0
- package/lib/behind-api-client/ruKitchen/RuKitchenV10.js +11 -0
- package/lib/behind-api-client/ruKitchen/RuKitchenV10Importer.js +29 -0
- package/lib/behind-api-client/ruKitchen/RuKitchenV10SeoArticle.js +14 -0
- package/lib/behind-api-client/sales/SalesApp.js +11 -0
- package/lib/behind-api-client/sales/SalesV10.js +23 -0
- package/lib/behind-api-client/sales/SalesV10Catalogue.js +58 -0
- package/lib/behind-api-client/sales/SalesV10Categories.js +15 -0
- package/lib/behind-api-client/sales/SalesV10Companies.js +55 -0
- package/lib/behind-api-client/sales/SalesV10Company.js +120 -0
- package/lib/behind-api-client/sales/SalesV10Group.js +70 -0
- package/lib/behind-api-client/sales/SalesV10Groups.js +21 -0
- package/lib/behind-api-client/sales/SalesV10Logs.js +14 -0
- package/lib/behind-api-client/sales/SalesV10Notes.js +38 -0
- package/lib/behind-api-client/sales/SalesV20.js +11 -0
- package/lib/behind-api-client/sales/SalesV20Companies.js +26 -0
- package/lib/behind-api-client/sales/SalesV20Notes.js +17 -0
- package/lib/behind-api-client/sip/SipApp.js +9 -0
- package/lib/behind-api-client/sip/SipV10.js +15 -0
- package/lib/behind-api-client/sip/SipV10Call.js +83 -0
- package/lib/behind-api-client/sip/SipV10Phone.js +44 -0
- package/lib/behind-api-client/sip/SipV10Transcript.js +21 -0
- package/lib/behind-api-client/sip/SipV10Transcripts.js +21 -0
- package/lib/behind-api-client/storage/StorageApp.js +9 -0
- package/lib/behind-api-client/storage/StorageV10.js +11 -0
- package/lib/behind-api-client/storage/StorageV10File.js +35 -0
- package/lib/behind-api-client/storage/StorageV10Upload.js +21 -0
- package/lib/behind-api-client/tests/TestsApp.js +9 -0
- package/lib/behind-api-client/tests/TestsV10.js +15 -0
- package/lib/behind-api-client/tests/TestsV10Cases.js +29 -0
- package/lib/behind-api-client/tests/TestsV10CasesExtended.js +14 -0
- package/lib/behind-api-client/tests/TestsV10Core.js +14 -0
- package/lib/behind-api-client/tests/TestsV10Mail.js +14 -0
- package/lib/behind-api-client/tools/ToolsApp.js +9 -0
- package/lib/behind-api-client/tools/ToolsV10.js +9 -0
- package/lib/behind-api-client/tools/ToolsV10Pdf.js +30 -0
- package/package.json +25 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const GptV30Prompt = require('./GptV30Prompt');
|
|
2
|
+
const GptV30Prompts = require('./GptV30Prompts');
|
|
3
|
+
const GptV30Chat = require('./GptV30Chat');
|
|
4
|
+
|
|
5
|
+
class GptV30 {
|
|
6
|
+
constructor(apiClient) {
|
|
7
|
+
this.prompt = new GptV30Prompt(apiClient);
|
|
8
|
+
this.prompts = new GptV30Prompts(apiClient);
|
|
9
|
+
this.chat = new GptV30Chat(apiClient);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
module.exports = GptV30;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
class GptV30Chat {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async execute(i_messages, i_options, i_context, i_prompt, i_reverseSystem, i_jsonSchema) {
|
|
7
|
+
// Calls the gpt/V30/chat endpoint
|
|
8
|
+
return this.apiClient.apiRequest('gpt', '30', 'chat', 'execute', {
|
|
9
|
+
"messages": i_messages,
|
|
10
|
+
"options": i_options,
|
|
11
|
+
"context": i_context,
|
|
12
|
+
"prompt": i_prompt,
|
|
13
|
+
"reverseSystem": i_reverseSystem,
|
|
14
|
+
"jsonSchema": i_jsonSchema
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = GptV30Chat;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
class GptV30Prompt {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async get(i_prompt_id) {
|
|
7
|
+
// Calls the gpt/V30/prompt endpoint
|
|
8
|
+
return this.apiClient.apiRequest('gpt', '30', 'prompt', 'get', {
|
|
9
|
+
"prompt_id": i_prompt_id
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async execute(i_prompt_id, i_params) {
|
|
14
|
+
// Calls the gpt/V30/prompt endpoint
|
|
15
|
+
return this.apiClient.apiRequest('gpt', '30', 'prompt', 'execute', {
|
|
16
|
+
"prompt_id": i_prompt_id,
|
|
17
|
+
"params": i_params
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async edit(i_prompt_id, i_title, i_temperature, i_max_tokens, i_model, i_body) {
|
|
22
|
+
// Calls the gpt/V30/prompt endpoint
|
|
23
|
+
return this.apiClient.apiRequest('gpt', '30', 'prompt', 'edit', {
|
|
24
|
+
"prompt_id": i_prompt_id,
|
|
25
|
+
"title": i_title,
|
|
26
|
+
"temperature": i_temperature,
|
|
27
|
+
"max_tokens": i_max_tokens,
|
|
28
|
+
"model": i_model,
|
|
29
|
+
"body": i_body
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async delete(i_prompt_id) {
|
|
34
|
+
// Calls the gpt/V30/prompt endpoint
|
|
35
|
+
return this.apiClient.apiRequest('gpt', '30', 'prompt', 'delete', {
|
|
36
|
+
"prompt_id": i_prompt_id
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
module.exports = GptV30Prompt;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
class GptV30Prompts {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async get() {
|
|
7
|
+
// Calls the gpt/V30/prompts endpoint
|
|
8
|
+
return this.apiClient.apiRequest('gpt', '30', 'prompts', 'get', {
|
|
9
|
+
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async create(i_title, i_temperature, i_max_tokens, i_model, i_body) {
|
|
14
|
+
// Calls the gpt/V30/prompts endpoint
|
|
15
|
+
return this.apiClient.apiRequest('gpt', '30', 'prompts', 'create', {
|
|
16
|
+
"title": i_title,
|
|
17
|
+
"temperature": i_temperature,
|
|
18
|
+
"max_tokens": i_max_tokens,
|
|
19
|
+
"model": i_model,
|
|
20
|
+
"body": i_body
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async init() {
|
|
25
|
+
// Calls the gpt/V30/prompts endpoint
|
|
26
|
+
return this.apiClient.apiRequest('gpt', '30', 'prompts', 'init', {
|
|
27
|
+
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
module.exports = GptV30Prompts;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const GptV40Prompts = require('./GptV40Prompts');
|
|
2
|
+
const GptV40Prompt = require('./GptV40Prompt');
|
|
3
|
+
|
|
4
|
+
class GptV40 {
|
|
5
|
+
constructor(apiClient) {
|
|
6
|
+
this.prompts = new GptV40Prompts(apiClient);
|
|
7
|
+
this.prompt = new GptV40Prompt(apiClient);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = GptV40;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
class GptV40Prompt {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async get(i_prompt_id) {
|
|
7
|
+
// Calls the gpt/V40/prompt endpoint
|
|
8
|
+
return this.apiClient.apiRequest('gpt', '40', 'prompt', 'get', {
|
|
9
|
+
"prompt_id": i_prompt_id
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async edit(i_prompt_id, i_title, i_extended, i_body) {
|
|
14
|
+
// Calls the gpt/V40/prompt endpoint
|
|
15
|
+
return this.apiClient.apiRequest('gpt', '40', 'prompt', 'edit', {
|
|
16
|
+
"prompt_id": i_prompt_id,
|
|
17
|
+
"title": i_title,
|
|
18
|
+
"extended": i_extended,
|
|
19
|
+
"body": i_body
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
module.exports = GptV40Prompt;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
class GptV40Prompts {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async get() {
|
|
7
|
+
// Calls the gpt/V40/prompts endpoint
|
|
8
|
+
return this.apiClient.apiRequest('gpt', '40', 'prompts', 'get', {
|
|
9
|
+
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async create(i_title, i_body, i_extended) {
|
|
14
|
+
// Calls the gpt/V40/prompts endpoint
|
|
15
|
+
return this.apiClient.apiRequest('gpt', '40', 'prompts', 'create', {
|
|
16
|
+
"title": i_title,
|
|
17
|
+
"body": i_body,
|
|
18
|
+
"extended": i_extended
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async init() {
|
|
23
|
+
// Calls the gpt/V40/prompts endpoint
|
|
24
|
+
return this.apiClient.apiRequest('gpt', '40', 'prompts', 'init', {
|
|
25
|
+
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
module.exports = GptV40Prompts;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const MailerV10Message = require('./MailerV10Message');
|
|
2
|
+
const MailerV10Settings = require('./MailerV10Settings');
|
|
3
|
+
const MailerV10Template = require('./MailerV10Template');
|
|
4
|
+
const MailerV10Bulk = require('./MailerV10Bulk');
|
|
5
|
+
|
|
6
|
+
class MailerV10 {
|
|
7
|
+
constructor(apiClient) {
|
|
8
|
+
this.message = new MailerV10Message(apiClient);
|
|
9
|
+
this.settings = new MailerV10Settings(apiClient);
|
|
10
|
+
this.template = new MailerV10Template(apiClient);
|
|
11
|
+
this.bulk = new MailerV10Bulk(apiClient);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
module.exports = MailerV10;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
class MailerV10Bulk {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async create(i_node_name, i_template_name, i_account_name, i_body, i_headline, i_data, i_time, i_filters) {
|
|
7
|
+
// Calls the mailer/V10/bulk endpoint
|
|
8
|
+
return this.apiClient.apiRequest('mailer', '10', 'bulk', 'create', {
|
|
9
|
+
"node_name": i_node_name,
|
|
10
|
+
"template_name": i_template_name,
|
|
11
|
+
"account_name": i_account_name,
|
|
12
|
+
"body": i_body,
|
|
13
|
+
"headline": i_headline,
|
|
14
|
+
"data": i_data,
|
|
15
|
+
"time": i_time,
|
|
16
|
+
"filters": i_filters
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
module.exports = MailerV10Bulk;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
class MailerV10Message {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async send(i_email, i_recipient_name, i_account_name, i_template_name, i_data, i_time) {
|
|
7
|
+
// Calls the mailer/V10/message endpoint
|
|
8
|
+
return this.apiClient.apiRequest('mailer', '10', 'message', 'send', {
|
|
9
|
+
"email": i_email,
|
|
10
|
+
"recipient_name": i_recipient_name,
|
|
11
|
+
"account_name": i_account_name,
|
|
12
|
+
"template_name": i_template_name,
|
|
13
|
+
"data": i_data,
|
|
14
|
+
"time": i_time
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async sendTo(i_user_key, i_account_name, i_template_name, i_data, i_time) {
|
|
19
|
+
// Calls the mailer/V10/message endpoint
|
|
20
|
+
return this.apiClient.apiRequest('mailer', '10', 'message', 'sendTo', {
|
|
21
|
+
"user_key": i_user_key,
|
|
22
|
+
"account_name": i_account_name,
|
|
23
|
+
"template_name": i_template_name,
|
|
24
|
+
"data": i_data,
|
|
25
|
+
"time": i_time
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async sendMsg(i_email, i_recipient_name, i_account_name, i_template_name, i_msg_name, i_data, i_time) {
|
|
30
|
+
// Calls the mailer/V10/message endpoint
|
|
31
|
+
return this.apiClient.apiRequest('mailer', '10', 'message', 'sendMsg', {
|
|
32
|
+
"email": i_email,
|
|
33
|
+
"recipient_name": i_recipient_name,
|
|
34
|
+
"account_name": i_account_name,
|
|
35
|
+
"template_name": i_template_name,
|
|
36
|
+
"msg_name": i_msg_name,
|
|
37
|
+
"data": i_data,
|
|
38
|
+
"time": i_time
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async sendMsgTo(i_user_key, i_account_name, i_template_name, i_msg_name, i_data, i_time) {
|
|
43
|
+
// Calls the mailer/V10/message endpoint
|
|
44
|
+
return this.apiClient.apiRequest('mailer', '10', 'message', 'sendMsgTo', {
|
|
45
|
+
"user_key": i_user_key,
|
|
46
|
+
"account_name": i_account_name,
|
|
47
|
+
"template_name": i_template_name,
|
|
48
|
+
"msg_name": i_msg_name,
|
|
49
|
+
"data": i_data,
|
|
50
|
+
"time": i_time
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async get(i_message_id) {
|
|
55
|
+
// Calls the mailer/V10/message endpoint
|
|
56
|
+
return this.apiClient.apiRequest('mailer', '10', 'message', 'get', {
|
|
57
|
+
"message_id": i_message_id
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async track(i_message_id) {
|
|
62
|
+
// Calls the mailer/V10/message endpoint
|
|
63
|
+
return this.apiClient.apiRequest('mailer', '10', 'message', 'track', {
|
|
64
|
+
"message_id": i_message_id
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async getStatus(i_message_id) {
|
|
69
|
+
// Calls the mailer/V10/message endpoint
|
|
70
|
+
return this.apiClient.apiRequest('mailer', '10', 'message', 'getStatus', {
|
|
71
|
+
"message_id": i_message_id
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async listGet() {
|
|
76
|
+
// Calls the mailer/V10/message endpoint
|
|
77
|
+
return this.apiClient.apiRequest('mailer', '10', 'message', 'listGet', {
|
|
78
|
+
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
module.exports = MailerV10Message;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
class MailerV10Settings {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async update(i_name, i_smtp_from_name, i_smtp_user, i_smtp_server, i_smtp_port, i_smtp_password) {
|
|
7
|
+
// Calls the mailer/V10/settings endpoint
|
|
8
|
+
return this.apiClient.apiRequest('mailer', '10', 'settings', 'update', {
|
|
9
|
+
"name": i_name,
|
|
10
|
+
"smtp_from_name": i_smtp_from_name,
|
|
11
|
+
"smtp_user": i_smtp_user,
|
|
12
|
+
"smtp_server": i_smtp_server,
|
|
13
|
+
"smtp_port": i_smtp_port,
|
|
14
|
+
"smtp_password": i_smtp_password
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async updateImap(i_name, i_imap_user, i_imap_server, i_imap_port, i_imap_password) {
|
|
19
|
+
// Calls the mailer/V10/settings endpoint
|
|
20
|
+
return this.apiClient.apiRequest('mailer', '10', 'settings', 'updateImap', {
|
|
21
|
+
"name": i_name,
|
|
22
|
+
"imap_user": i_imap_user,
|
|
23
|
+
"imap_server": i_imap_server,
|
|
24
|
+
"imap_port": i_imap_port,
|
|
25
|
+
"imap_password": i_imap_password
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async get(i_name) {
|
|
30
|
+
// Calls the mailer/V10/settings endpoint
|
|
31
|
+
return this.apiClient.apiRequest('mailer', '10', 'settings', 'get', {
|
|
32
|
+
"name": i_name
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async getImap(i_name) {
|
|
37
|
+
// Calls the mailer/V10/settings endpoint
|
|
38
|
+
return this.apiClient.apiRequest('mailer', '10', 'settings', 'getImap', {
|
|
39
|
+
"name": i_name
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
module.exports = MailerV10Settings;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
class MailerV10Template {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async create(i_name, i_body) {
|
|
7
|
+
// Calls the mailer/V10/template endpoint
|
|
8
|
+
return this.apiClient.apiRequest('mailer', '10', 'template', 'create', {
|
|
9
|
+
"name": i_name,
|
|
10
|
+
"body": i_body
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async edit(i_name, i_body) {
|
|
15
|
+
// Calls the mailer/V10/template endpoint
|
|
16
|
+
return this.apiClient.apiRequest('mailer', '10', 'template', 'edit', {
|
|
17
|
+
"name": i_name,
|
|
18
|
+
"body": i_body
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
module.exports = MailerV10Template;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
class MailerV20Message {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async send(i_email, i_recipient_name, i_reply_to, i_attachments, i_account_name, i_template_name, i_data, i_time) {
|
|
7
|
+
// Calls the mailer/V20/message endpoint
|
|
8
|
+
return this.apiClient.apiRequest('mailer', '20', 'message', 'send', {
|
|
9
|
+
"email": i_email,
|
|
10
|
+
"recipient_name": i_recipient_name,
|
|
11
|
+
"reply_to": i_reply_to,
|
|
12
|
+
"attachments": i_attachments,
|
|
13
|
+
"account_name": i_account_name,
|
|
14
|
+
"template_name": i_template_name,
|
|
15
|
+
"data": i_data,
|
|
16
|
+
"time": i_time
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
module.exports = MailerV20Message;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const MastogramV10Mastodon = require('./MastogramV10Mastodon');
|
|
2
|
+
const MastogramV10Telegram = require('./MastogramV10Telegram');
|
|
3
|
+
const MastogramV10Bluesky = require('./MastogramV10Bluesky');
|
|
4
|
+
|
|
5
|
+
class MastogramV10 {
|
|
6
|
+
constructor(apiClient) {
|
|
7
|
+
this.mastodon = new MastogramV10Mastodon(apiClient);
|
|
8
|
+
this.telegram = new MastogramV10Telegram(apiClient);
|
|
9
|
+
this.bluesky = new MastogramV10Bluesky(apiClient);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
module.exports = MastogramV10;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
class MastogramV10Bluesky {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async get() {
|
|
7
|
+
// Calls the mastogram/V10/bluesky endpoint
|
|
8
|
+
return this.apiClient.apiRequest('mastogram', '10', 'bluesky', 'get', {
|
|
9
|
+
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async create(i_handle) {
|
|
14
|
+
// Calls the mastogram/V10/bluesky endpoint
|
|
15
|
+
return this.apiClient.apiRequest('mastogram', '10', 'bluesky', 'create', {
|
|
16
|
+
"handle": i_handle
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async update(i_channel_uuid, i_enabled, i_post, i_forward, i_forward_reblogs, i_forward_bookmarks, i_privacy, i_prompt) {
|
|
21
|
+
// Calls the mastogram/V10/bluesky endpoint
|
|
22
|
+
return this.apiClient.apiRequest('mastogram', '10', 'bluesky', 'update', {
|
|
23
|
+
"channel_uuid": i_channel_uuid,
|
|
24
|
+
"enabled": i_enabled,
|
|
25
|
+
"post": i_post,
|
|
26
|
+
"forward": i_forward,
|
|
27
|
+
"forward_reblogs": i_forward_reblogs,
|
|
28
|
+
"forward_bookmarks": i_forward_bookmarks,
|
|
29
|
+
"privacy": i_privacy,
|
|
30
|
+
"prompt": i_prompt
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async delete(i_channel_uuid) {
|
|
35
|
+
// Calls the mastogram/V10/bluesky endpoint
|
|
36
|
+
return this.apiClient.apiRequest('mastogram', '10', 'bluesky', 'delete', {
|
|
37
|
+
"channel_uuid": i_channel_uuid
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
module.exports = MastogramV10Bluesky;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
class MastogramV10Mastodon {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async get() {
|
|
7
|
+
// Calls the mastogram/V10/mastodon endpoint
|
|
8
|
+
return this.apiClient.apiRequest('mastogram', '10', 'mastodon', 'get', {
|
|
9
|
+
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async create(i_domain, i_token) {
|
|
14
|
+
// Calls the mastogram/V10/mastodon endpoint
|
|
15
|
+
return this.apiClient.apiRequest('mastogram', '10', 'mastodon', 'create', {
|
|
16
|
+
"domain": i_domain,
|
|
17
|
+
"token": i_token
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async update(i_channel_uuid, i_domain, i_token, i_enabled, i_post, i_forward, i_forward_reblogs, i_forward_bookmarks, i_privacy, i_prompt) {
|
|
22
|
+
// Calls the mastogram/V10/mastodon endpoint
|
|
23
|
+
return this.apiClient.apiRequest('mastogram', '10', 'mastodon', 'update', {
|
|
24
|
+
"channel_uuid": i_channel_uuid,
|
|
25
|
+
"domain": i_domain,
|
|
26
|
+
"token": i_token,
|
|
27
|
+
"enabled": i_enabled,
|
|
28
|
+
"post": i_post,
|
|
29
|
+
"forward": i_forward,
|
|
30
|
+
"forward_reblogs": i_forward_reblogs,
|
|
31
|
+
"forward_bookmarks": i_forward_bookmarks,
|
|
32
|
+
"privacy": i_privacy,
|
|
33
|
+
"prompt": i_prompt
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async delete(i_channel_uuid) {
|
|
38
|
+
// Calls the mastogram/V10/mastodon endpoint
|
|
39
|
+
return this.apiClient.apiRequest('mastogram', '10', 'mastodon', 'delete', {
|
|
40
|
+
"channel_uuid": i_channel_uuid
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
module.exports = MastogramV10Mastodon;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
class MastogramV10Telegram {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async get() {
|
|
7
|
+
// Calls the mastogram/V10/telegram endpoint
|
|
8
|
+
return this.apiClient.apiRequest('mastogram', '10', 'telegram', 'get', {
|
|
9
|
+
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async create() {
|
|
14
|
+
// Calls the mastogram/V10/telegram endpoint
|
|
15
|
+
return this.apiClient.apiRequest('mastogram', '10', 'telegram', 'create', {
|
|
16
|
+
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async update(i_channel_uuid, i_enabled, i_post, i_forward, i_prompt) {
|
|
21
|
+
// Calls the mastogram/V10/telegram endpoint
|
|
22
|
+
return this.apiClient.apiRequest('mastogram', '10', 'telegram', 'update', {
|
|
23
|
+
"channel_uuid": i_channel_uuid,
|
|
24
|
+
"enabled": i_enabled,
|
|
25
|
+
"post": i_post,
|
|
26
|
+
"forward": i_forward,
|
|
27
|
+
"prompt": i_prompt
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async delete(i_channel_uuid) {
|
|
32
|
+
// Calls the mastogram/V10/telegram endpoint
|
|
33
|
+
return this.apiClient.apiRequest('mastogram', '10', 'telegram', 'delete', {
|
|
34
|
+
"channel_uuid": i_channel_uuid
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
module.exports = MastogramV10Telegram;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const MonitorV10Records = require('./MonitorV10Records');
|
|
2
|
+
const MonitorV10Record = require('./MonitorV10Record');
|
|
3
|
+
const MonitorV10Finances = require('./MonitorV10Finances');
|
|
4
|
+
|
|
5
|
+
class MonitorV10 {
|
|
6
|
+
constructor(apiClient) {
|
|
7
|
+
this.records = new MonitorV10Records(apiClient);
|
|
8
|
+
this.record = new MonitorV10Record(apiClient);
|
|
9
|
+
this.finances = new MonitorV10Finances(apiClient);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
module.exports = MonitorV10;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
class MonitorV10Finances {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async get(i_month) {
|
|
7
|
+
// Calls the monitor/V10/finances endpoint
|
|
8
|
+
return this.apiClient.apiRequest('monitor', '10', 'finances', 'get', {
|
|
9
|
+
"month": i_month
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async set(i_alias, i_month, i_value) {
|
|
14
|
+
// Calls the monitor/V10/finances endpoint
|
|
15
|
+
return this.apiClient.apiRequest('monitor', '10', 'finances', 'set', {
|
|
16
|
+
"alias": i_alias,
|
|
17
|
+
"month": i_month,
|
|
18
|
+
"value": i_value
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async accountGet(i_month) {
|
|
23
|
+
// Calls the monitor/V10/finances endpoint
|
|
24
|
+
return this.apiClient.apiRequest('monitor', '10', 'finances', 'accountGet', {
|
|
25
|
+
"month": i_month
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async accountSet(i_alias, i_month, i_value) {
|
|
30
|
+
// Calls the monitor/V10/finances endpoint
|
|
31
|
+
return this.apiClient.apiRequest('monitor', '10', 'finances', 'accountSet', {
|
|
32
|
+
"alias": i_alias,
|
|
33
|
+
"month": i_month,
|
|
34
|
+
"value": i_value
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
module.exports = MonitorV10Finances;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
class MonitorV10Record {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async add(i_alias, i_value) {
|
|
7
|
+
// Calls the monitor/V10/record endpoint
|
|
8
|
+
return this.apiClient.apiRequest('monitor', '10', 'record', 'add', {
|
|
9
|
+
"alias": i_alias,
|
|
10
|
+
"value": i_value
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
module.exports = MonitorV10Record;
|