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,30 @@
|
|
|
1
|
+
class AuthorisationV10Code {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async createByPhone(i_phone_number, i_application_id, i_application_secret) {
|
|
7
|
+
return this.apiClient.apiRequest('authorisation', '10', 'code', 'createByPhone', {
|
|
8
|
+
"phone_number": i_phone_number,
|
|
9
|
+
"application_id": i_application_id,
|
|
10
|
+
"application_secret": i_application_secret
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async createByEmail(i_email, i_application_id, i_application_secret) {
|
|
15
|
+
return this.apiClient.apiRequest('authorisation', '10', 'code', 'createByEmail', {
|
|
16
|
+
"email": i_email,
|
|
17
|
+
"application_id": i_application_id,
|
|
18
|
+
"application_secret": i_application_secret
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async confirm(i_confirmation_token, i_code) {
|
|
23
|
+
return this.apiClient.apiRequest('authorisation', '10', 'code', 'confirm', {
|
|
24
|
+
"confirmation_token": i_confirmation_token,
|
|
25
|
+
"code": i_code
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
module.exports = AuthorisationV10Code;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const BehindApiAuthClient = require('./BehindApiAuthClient ');
|
|
2
|
+
|
|
3
|
+
// Initialize the API client
|
|
4
|
+
const apiClient = new BehindApiAuthClient ("https://api.auth.behind.ai", "your-access-token");
|
|
5
|
+
|
|
6
|
+
// Set up event handlers
|
|
7
|
+
apiClient.onExpired(() => {
|
|
8
|
+
console.log('Token expired');
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
apiClient.onReject((data) => {
|
|
12
|
+
console.log('Request rejected:', data);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
apiClient.onTooManyRequests((data) => {
|
|
16
|
+
console.log('Too many requests:', data);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// Example usage:
|
|
20
|
+
async function example() {
|
|
21
|
+
try {
|
|
22
|
+
// Example: Get individuals
|
|
23
|
+
// const result = await apiClient.raet.V10.individuals.get("search query", 1, 10);
|
|
24
|
+
|
|
25
|
+
// Example: Create CV
|
|
26
|
+
// const cvResult = await apiClient.raet.V10.cv.create("individual_id", "cv_data");
|
|
27
|
+
|
|
28
|
+
// Example: Send email
|
|
29
|
+
// const emailResult = await apiClient.mailer.V10.message.send(
|
|
30
|
+
// "email@example.com",
|
|
31
|
+
// "Recipient Name",
|
|
32
|
+
// "account_name",
|
|
33
|
+
// "template_name",
|
|
34
|
+
// "data"
|
|
35
|
+
// );
|
|
36
|
+
|
|
37
|
+
// Example with hyphenated app name (web-harvester becomes webHarvester)
|
|
38
|
+
// const crawlerResult = await apiClient.webHarvester.V10.crawler.addSite("https://example.com");
|
|
39
|
+
|
|
40
|
+
console.log('API client initialized successfully');
|
|
41
|
+
|
|
42
|
+
} catch (error) {
|
|
43
|
+
console.error('Error:', error);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
example();
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
const axios = require('axios');
|
|
2
|
+
const MailerApp = require('./mailer/MailerApp');
|
|
3
|
+
const SalesApp = require('./sales/SalesApp');
|
|
4
|
+
const GptApp = require('./gpt/GptApp');
|
|
5
|
+
const GlobalApp = require('./global/GlobalApp');
|
|
6
|
+
const MonitorApp = require('./monitor/MonitorApp');
|
|
7
|
+
const ChatApp = require('./chat/ChatApp');
|
|
8
|
+
const StorageApp = require('./storage/StorageApp');
|
|
9
|
+
const RaetApp = require('./raet/RaetApp');
|
|
10
|
+
const MastogramApp = require('./mastogram/MastogramApp');
|
|
11
|
+
const ToolsApp = require('./tools/ToolsApp');
|
|
12
|
+
const PaymentsApp = require('./payments/PaymentsApp');
|
|
13
|
+
const OauthApp = require('./oauth/OauthApp');
|
|
14
|
+
const TestsApp = require('./tests/TestsApp');
|
|
15
|
+
const RuKitchenApp = require('./ruKitchen/RuKitchenApp');
|
|
16
|
+
const SipApp = require('./sip/SipApp');
|
|
17
|
+
const QuestionnaireApp = require('./questionnaire/QuestionnaireApp');
|
|
18
|
+
const EasyjobApp = require('./easyjob/EasyjobApp');
|
|
19
|
+
const RagApp = require('./rag/RagApp');
|
|
20
|
+
|
|
21
|
+
class BehindApiClient {
|
|
22
|
+
constructor(endpoint, accessToken) {
|
|
23
|
+
this.endpoint = endpoint;
|
|
24
|
+
this.accessToken = accessToken;
|
|
25
|
+
this.selfsigned = false;
|
|
26
|
+
|
|
27
|
+
// Event handlers
|
|
28
|
+
this.onExpiredHandler = () => {};
|
|
29
|
+
this.onRejectHandler = () => {};
|
|
30
|
+
this.onTooManyRequestsHandler = () => {};
|
|
31
|
+
|
|
32
|
+
// Initialize app modules
|
|
33
|
+
this.mailer = new MailerApp(this);
|
|
34
|
+
this.sales = new SalesApp(this);
|
|
35
|
+
this.gpt = new GptApp(this);
|
|
36
|
+
this.global = new GlobalApp(this);
|
|
37
|
+
this.monitor = new MonitorApp(this);
|
|
38
|
+
this.chat = new ChatApp(this);
|
|
39
|
+
this.storage = new StorageApp(this);
|
|
40
|
+
this.raet = new RaetApp(this);
|
|
41
|
+
this.mastogram = new MastogramApp(this);
|
|
42
|
+
this.tools = new ToolsApp(this);
|
|
43
|
+
this.payments = new PaymentsApp(this);
|
|
44
|
+
this.oauth = new OauthApp(this);
|
|
45
|
+
this.tests = new TestsApp(this);
|
|
46
|
+
this.ruKitchen = new RuKitchenApp(this);
|
|
47
|
+
this.sip = new SipApp(this);
|
|
48
|
+
this.questionnaire = new QuestionnaireApp(this);
|
|
49
|
+
this.easyjob = new EasyjobApp(this);
|
|
50
|
+
this.rag = new RagApp(this);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
onExpired(callback) {
|
|
54
|
+
if (typeof callback === 'function') {
|
|
55
|
+
this.onExpiredHandler = callback;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
onReject(callback) {
|
|
60
|
+
if (typeof callback === 'function') {
|
|
61
|
+
this.onRejectHandler = callback;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
onTooManyRequests(callback) {
|
|
66
|
+
if (typeof callback === 'function') {
|
|
67
|
+
this.onTooManyRequestsHandler = callback;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async request(endpoint, data){
|
|
72
|
+
const parts = endpoint.replace(/^\/+|\/+$/g, '').split('/');
|
|
73
|
+
|
|
74
|
+
// Extract the variables according to the pattern
|
|
75
|
+
const app = parts[0] || null;
|
|
76
|
+
const version = parts[1] || null;
|
|
77
|
+
const module = parts[2] || null;
|
|
78
|
+
const method = parts[3] || null;
|
|
79
|
+
|
|
80
|
+
return this.apiRequest(app, version, module, method, data);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
async apiRequest(app, version, module, action, data) {
|
|
84
|
+
let postData = {};
|
|
85
|
+
postData = Object.assign(postData, data);
|
|
86
|
+
|
|
87
|
+
const headers = {
|
|
88
|
+
Accept: 'application/json',
|
|
89
|
+
'Content-Type': 'application/json',
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
if (this.accessToken) {
|
|
93
|
+
postData.access_token = this.accessToken;
|
|
94
|
+
headers.AccessToken = this.accessToken;
|
|
95
|
+
headers.Authorization = `Bearer ${this.accessToken}`;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
try {
|
|
99
|
+
let httpsAgent = null;
|
|
100
|
+
let options = { headers: headers };
|
|
101
|
+
|
|
102
|
+
if (httpsAgent != null) {
|
|
103
|
+
options.httpsAgent = httpsAgent;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const response = await axios.post(
|
|
107
|
+
`${this.endpoint}/api/${app}/${version}/${module}/${action}`,
|
|
108
|
+
postData,
|
|
109
|
+
options
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
if (response.status === 200) {
|
|
113
|
+
if (response.data.success) {
|
|
114
|
+
return response.data;
|
|
115
|
+
} else {
|
|
116
|
+
throw response.status;
|
|
117
|
+
}
|
|
118
|
+
} else {
|
|
119
|
+
try {
|
|
120
|
+
if (response.data.code === 1001 || response.data.code === 1009) {
|
|
121
|
+
this.onRejectHandler(response.data);
|
|
122
|
+
}
|
|
123
|
+
if (response.data.code === 1039) {
|
|
124
|
+
this.onTooManyRequestsHandler(response.data);
|
|
125
|
+
}
|
|
126
|
+
} catch (e) {
|
|
127
|
+
// Error handling callback failed
|
|
128
|
+
}
|
|
129
|
+
throw response.data.message;
|
|
130
|
+
}
|
|
131
|
+
} catch (e) {
|
|
132
|
+
throw e;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
module.exports = BehindApiClient;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const ChatV10Chat = require('./ChatV10Chat');
|
|
2
|
+
const ChatV10Chats = require('./ChatV10Chats');
|
|
3
|
+
const ChatV10Message = require('./ChatV10Message');
|
|
4
|
+
|
|
5
|
+
class ChatV10 {
|
|
6
|
+
constructor(apiClient) {
|
|
7
|
+
this.chat = new ChatV10Chat(apiClient);
|
|
8
|
+
this.chats = new ChatV10Chats(apiClient);
|
|
9
|
+
this.message = new ChatV10Message(apiClient);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
module.exports = ChatV10;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
class ChatV10Chat {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async get(i_chat_uuid) {
|
|
7
|
+
// Calls the chat/V10/chat endpoint
|
|
8
|
+
return this.apiClient.apiRequest('chat', '10', 'chat', 'get', {
|
|
9
|
+
"chat_uuid": i_chat_uuid
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async getIdByMember(i_member_id) {
|
|
14
|
+
// Calls the chat/V10/chat endpoint
|
|
15
|
+
return this.apiClient.apiRequest('chat', '10', 'chat', 'getIdByMember', {
|
|
16
|
+
"member_id": i_member_id
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async info(i_chat_uuid) {
|
|
21
|
+
// Calls the chat/V10/chat endpoint
|
|
22
|
+
return this.apiClient.apiRequest('chat', '10', 'chat', 'info', {
|
|
23
|
+
"chat_uuid": i_chat_uuid
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async pin(i_chat_uuid) {
|
|
28
|
+
// Calls the chat/V10/chat endpoint
|
|
29
|
+
return this.apiClient.apiRequest('chat', '10', 'chat', 'pin', {
|
|
30
|
+
"chat_uuid": i_chat_uuid
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async unPin(i_chat_uuid) {
|
|
35
|
+
// Calls the chat/V10/chat endpoint
|
|
36
|
+
return this.apiClient.apiRequest('chat', '10', 'chat', 'unPin', {
|
|
37
|
+
"chat_uuid": i_chat_uuid
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
async delete(i_chat_uuid) {
|
|
42
|
+
// Calls the chat/V10/chat endpoint
|
|
43
|
+
return this.apiClient.apiRequest('chat', '10', 'chat', 'delete', {
|
|
44
|
+
"chat_uuid": i_chat_uuid
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async rename(i_chat_uuid, i_title) {
|
|
49
|
+
// Calls the chat/V10/chat endpoint
|
|
50
|
+
return this.apiClient.apiRequest('chat', '10', 'chat', 'rename', {
|
|
51
|
+
"chat_uuid": i_chat_uuid,
|
|
52
|
+
"title": i_title
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async create(i_name, i_member_id, i_member_name, i_member_alias, i_company_id, i_individual_id) {
|
|
57
|
+
// Calls the chat/V10/chat endpoint
|
|
58
|
+
return this.apiClient.apiRequest('chat', '10', 'chat', 'create', {
|
|
59
|
+
"name": i_name,
|
|
60
|
+
"member_id": i_member_id,
|
|
61
|
+
"member_name": i_member_name,
|
|
62
|
+
"member_alias": i_member_alias,
|
|
63
|
+
"company_id": i_company_id,
|
|
64
|
+
"individual_id": i_individual_id
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async systemCreate(i_user_id, i_name, i_member_id, i_member_name, i_individual_id) {
|
|
69
|
+
// Calls the chat/V10/chat endpoint
|
|
70
|
+
return this.apiClient.apiRequest('chat', '10', 'chat', 'systemCreate', {
|
|
71
|
+
"user_id": i_user_id,
|
|
72
|
+
"name": i_name,
|
|
73
|
+
"member_id": i_member_id,
|
|
74
|
+
"member_name": i_member_name,
|
|
75
|
+
"individual_id": i_individual_id
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async systemGetIdByMember(i_member_id) {
|
|
80
|
+
// Calls the chat/V10/chat endpoint
|
|
81
|
+
return this.apiClient.apiRequest('chat', '10', 'chat', 'systemGetIdByMember', {
|
|
82
|
+
"member_id": i_member_id
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
module.exports = ChatV10Chat;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
class ChatV10Chats {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async get() {
|
|
7
|
+
// Calls the chat/V10/chats endpoint
|
|
8
|
+
return this.apiClient.apiRequest('chat', '10', 'chats', 'get', {
|
|
9
|
+
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
module.exports = ChatV10Chats;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
class ChatV10Message {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async create(i_chat_uuid, i_text, i_type) {
|
|
7
|
+
// Calls the chat/V10/message endpoint
|
|
8
|
+
return this.apiClient.apiRequest('chat', '10', 'message', 'create', {
|
|
9
|
+
"chat_uuid": i_chat_uuid,
|
|
10
|
+
"text": i_text,
|
|
11
|
+
"type": i_type
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async createFrom(i_chat_uuid, i_from, i_text) {
|
|
16
|
+
// Calls the chat/V10/message endpoint
|
|
17
|
+
return this.apiClient.apiRequest('chat', '10', 'message', 'createFrom', {
|
|
18
|
+
"chat_uuid": i_chat_uuid,
|
|
19
|
+
"from": i_from,
|
|
20
|
+
"text": i_text
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async setStatus(i_msg_uuid, i_status) {
|
|
25
|
+
// Calls the chat/V10/message endpoint
|
|
26
|
+
return this.apiClient.apiRequest('chat', '10', 'message', 'setStatus', {
|
|
27
|
+
"msg_uuid": i_msg_uuid,
|
|
28
|
+
"status": i_status
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async edit(i_msg_uuid, i_text) {
|
|
33
|
+
// Calls the chat/V10/message endpoint
|
|
34
|
+
return this.apiClient.apiRequest('chat', '10', 'message', 'edit', {
|
|
35
|
+
"msg_uuid": i_msg_uuid,
|
|
36
|
+
"text": i_text
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async delete(i_msg_uuid) {
|
|
41
|
+
// Calls the chat/V10/message endpoint
|
|
42
|
+
return this.apiClient.apiRequest('chat', '10', 'message', 'delete', {
|
|
43
|
+
"msg_uuid": i_msg_uuid
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async render(i_chat_uuid, i_prompt, i_extended) {
|
|
48
|
+
// Calls the chat/V10/message endpoint
|
|
49
|
+
return this.apiClient.apiRequest('chat', '10', 'message', 'render', {
|
|
50
|
+
"chat_uuid": i_chat_uuid,
|
|
51
|
+
"prompt": i_prompt,
|
|
52
|
+
"extended": i_extended
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
module.exports = ChatV10Message;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const ChatV20Chat = require('./ChatV20Chat');
|
|
2
|
+
const ChatV20Message = require('./ChatV20Message');
|
|
3
|
+
|
|
4
|
+
class ChatV20 {
|
|
5
|
+
constructor(apiClient) {
|
|
6
|
+
this.chat = new ChatV20Chat(apiClient);
|
|
7
|
+
this.message = new ChatV20Message(apiClient);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = ChatV20;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
class ChatV20Chat {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async getContext(i_chat_uuid) {
|
|
7
|
+
// Calls the chat/V20/chat endpoint
|
|
8
|
+
return this.apiClient.apiRequest('chat', '20', 'chat', 'getContext', {
|
|
9
|
+
"chat_uuid": i_chat_uuid
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
module.exports = ChatV20Chat;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
class ChatV20Message {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async create(i_chat_uuid, i_text, i_headline, i_type) {
|
|
7
|
+
// Calls the chat/V20/message endpoint
|
|
8
|
+
return this.apiClient.apiRequest('chat', '20', 'message', 'create', {
|
|
9
|
+
"chat_uuid": i_chat_uuid,
|
|
10
|
+
"text": i_text,
|
|
11
|
+
"headline": i_headline,
|
|
12
|
+
"type": i_type
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async render(i_chat_uuid, i_prompt, i_headlinePrompt, i_extended) {
|
|
17
|
+
// Calls the chat/V20/message endpoint
|
|
18
|
+
return this.apiClient.apiRequest('chat', '20', 'message', 'render', {
|
|
19
|
+
"chat_uuid": i_chat_uuid,
|
|
20
|
+
"prompt": i_prompt,
|
|
21
|
+
"headlinePrompt": i_headlinePrompt,
|
|
22
|
+
"extended": i_extended
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
module.exports = ChatV20Message;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const EasyjobV10Cv = require('./EasyjobV10Cv');
|
|
2
|
+
const EasyjobV10Companies = require('./EasyjobV10Companies');
|
|
3
|
+
const EasyjobV10Departments = require('./EasyjobV10Departments');
|
|
4
|
+
const EasyjobV10JobDescriptionArtifacts = require('./EasyjobV10JobDescriptionArtifacts');
|
|
5
|
+
const EasyjobV10JobDescriptionCandidateQuestions = require('./EasyjobV10JobDescriptionCandidateQuestions');
|
|
6
|
+
const EasyjobV10JobDescriptions = require('./EasyjobV10JobDescriptions');
|
|
7
|
+
const EasyjobV10CandidateProfiles = require('./EasyjobV10CandidateProfiles');
|
|
8
|
+
const EasyjobV10CandidateProfileArtifacts = require('./EasyjobV10CandidateProfileArtifacts');
|
|
9
|
+
const EasyjobV10Applicants = require('./EasyjobV10Applicants');
|
|
10
|
+
const EasyjobV10Applications = require('./EasyjobV10Applications');
|
|
11
|
+
const EasyjobV10Reports = require('./EasyjobV10Reports');
|
|
12
|
+
const EasyjobV10Answers = require('./EasyjobV10Answers');
|
|
13
|
+
|
|
14
|
+
class EasyjobV10 {
|
|
15
|
+
constructor(apiClient) {
|
|
16
|
+
this.cv = new EasyjobV10Cv(apiClient);
|
|
17
|
+
this.companies = new EasyjobV10Companies(apiClient);
|
|
18
|
+
this.departments = new EasyjobV10Departments(apiClient);
|
|
19
|
+
this.jobDescriptionArtifacts = new EasyjobV10JobDescriptionArtifacts(apiClient);
|
|
20
|
+
this.jobDescriptionCandidateQuestions = new EasyjobV10JobDescriptionCandidateQuestions(apiClient);
|
|
21
|
+
this.jobDescriptions = new EasyjobV10JobDescriptions(apiClient);
|
|
22
|
+
this.candidateProfiles = new EasyjobV10CandidateProfiles(apiClient);
|
|
23
|
+
this.candidateProfileArtifacts = new EasyjobV10CandidateProfileArtifacts(apiClient);
|
|
24
|
+
this.applicants = new EasyjobV10Applicants(apiClient);
|
|
25
|
+
this.applications = new EasyjobV10Applications(apiClient);
|
|
26
|
+
this.reports = new EasyjobV10Reports(apiClient);
|
|
27
|
+
this.answers = new EasyjobV10Answers(apiClient);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
module.exports = EasyjobV10;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
class EasyjobV10Answers {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async store(i_user_id, i_application_id, i_answers) {
|
|
7
|
+
// Calls the easyjob/V10/answers endpoint
|
|
8
|
+
return this.apiClient.apiRequest('easyjob', '10', 'answers', 'store', {
|
|
9
|
+
"user_id": i_user_id,
|
|
10
|
+
"application_id": i_application_id,
|
|
11
|
+
"answers": i_answers
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
module.exports = EasyjobV10Answers;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
class EasyjobV10Applicants {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async get(i_application_id) {
|
|
7
|
+
// Calls the easyjob/V10/applicants endpoint
|
|
8
|
+
return this.apiClient.apiRequest('easyjob', '10', 'applicants', 'get', {
|
|
9
|
+
"application_id": i_application_id
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async stageChange(i_application_id, i_new_stage) {
|
|
14
|
+
// Calls the easyjob/V10/applicants endpoint
|
|
15
|
+
return this.apiClient.apiRequest('easyjob', '10', 'applicants', 'stageChange', {
|
|
16
|
+
"application_id": i_application_id,
|
|
17
|
+
"new_stage": i_new_stage
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async getList(i_job_description_id) {
|
|
22
|
+
// Calls the easyjob/V10/applicants endpoint
|
|
23
|
+
return this.apiClient.apiRequest('easyjob', '10', 'applicants', 'getList', {
|
|
24
|
+
"job_description_id": i_job_description_id
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
module.exports = EasyjobV10Applicants;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
class EasyjobV10Applications {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async create(i_candidate_profile_id, i_job_description_id, i_message) {
|
|
7
|
+
// Calls the easyjob/V10/applications endpoint
|
|
8
|
+
return this.apiClient.apiRequest('easyjob', '10', 'applications', 'create', {
|
|
9
|
+
"candidate_profile_id": i_candidate_profile_id,
|
|
10
|
+
"job_description_id": i_job_description_id,
|
|
11
|
+
"message": i_message
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async get(i_job_description_id) {
|
|
16
|
+
// Calls the easyjob/V10/applications endpoint
|
|
17
|
+
return this.apiClient.apiRequest('easyjob', '10', 'applications', 'get', {
|
|
18
|
+
"job_description_id": i_job_description_id
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async getQuestions(i_job_description_id, i_category) {
|
|
23
|
+
// Calls the easyjob/V10/applications endpoint
|
|
24
|
+
return this.apiClient.apiRequest('easyjob', '10', 'applications', 'getQuestions', {
|
|
25
|
+
"job_description_id": i_job_description_id,
|
|
26
|
+
"category": i_category
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async getUnansweredQuestionsList(i_application_id, i_limit) {
|
|
31
|
+
// Calls the easyjob/V10/applications endpoint
|
|
32
|
+
return this.apiClient.apiRequest('easyjob', '10', 'applications', 'getUnansweredQuestionsList', {
|
|
33
|
+
"application_id": i_application_id,
|
|
34
|
+
"limit": i_limit
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
module.exports = EasyjobV10Applications;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
class EasyjobV10CandidateProfileArtifacts {
|
|
2
|
+
constructor(apiClient) {
|
|
3
|
+
this.apiClient = apiClient;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async create(i_candidate_profile_id, i_content, i_source, i_type) {
|
|
7
|
+
// Calls the easyjob/V10/candidateProfileArtifacts endpoint
|
|
8
|
+
return this.apiClient.apiRequest('easyjob', '10', 'candidateProfileArtifacts', 'create', {
|
|
9
|
+
"candidate_profile_id": i_candidate_profile_id,
|
|
10
|
+
"content": i_content,
|
|
11
|
+
"source": i_source,
|
|
12
|
+
"type": i_type
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async delete(i_artifact_id) {
|
|
17
|
+
// Calls the easyjob/V10/candidateProfileArtifacts endpoint
|
|
18
|
+
return this.apiClient.apiRequest('easyjob', '10', 'candidateProfileArtifacts', 'delete', {
|
|
19
|
+
"artifact_id": i_artifact_id
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async getList(i_candidate_profile_id) {
|
|
24
|
+
// Calls the easyjob/V10/candidateProfileArtifacts endpoint
|
|
25
|
+
return this.apiClient.apiRequest('easyjob', '10', 'candidateProfileArtifacts', 'getList', {
|
|
26
|
+
"candidate_profile_id": i_candidate_profile_id
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
module.exports = EasyjobV10CandidateProfileArtifacts;
|