@manyos/smileconnect-api 1.61.0 → 1.62.0

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/docs/adapter.md CHANGED
@@ -40,7 +40,13 @@ const adapterParams = {
40
40
  secret: env.SC_SECRET,
41
41
  ssoUrl: env.SC_SSO_URL,
42
42
  smileConnectUrl: env.SC_SMILECONNECT_URL
43
+ },
44
+ deepl: {
45
+ type: "Deepl",
46
+ authKey: env.DEEPL_KEY,
47
+ url: "https://api-free.deepl.com/v2/translate"
43
48
  }
49
+
44
50
  };
45
51
 
46
52
  // noinspection JSAnnotator
@@ -566,3 +572,104 @@ The SMILEconnect Adapter can be used to do calls against SMILEconnect. It will a
566
572
  The SMILEconnect adapter is an open source project.
567
573
 
568
574
  [Visit the project homepage for details](https://github.com/manyosit/smileconnect-client)
575
+
576
+ # Mail
577
+
578
+ ## Configuration values
579
+
580
+ **host**: The SMTP Host
581
+
582
+ **port**: The SMTP Port
583
+
584
+ **secure**: Is secure communication use? True/False
585
+
586
+ **auth.user**: User for SMTP Authentication
587
+ **auth.pass**: Pass for SMTP Authentication
588
+
589
+ ## Functions
590
+
591
+ ### sendMail
592
+
593
+ ```javascript
594
+ async sendMail(mailData)
595
+ ```
596
+
597
+ Parameter (mailData):
598
+
599
+ * from
600
+
601
+ The address of the sender.
602
+
603
+ * to
604
+
605
+ The addresses of the receivers.
606
+
607
+ * subject
608
+
609
+ The subject of the mail.
610
+
611
+ * text
612
+
613
+ The plain text body.
614
+
615
+ * html
616
+
617
+ The html body.
618
+
619
+ Full example:
620
+
621
+ ```javascript
622
+ const mailData = {
623
+ from: '"Fred Foo 👻" <foo@example.com>', // sender address
624
+ to: "bar@example.com", // list of receivers
625
+ subject: "Hello ✔", // Subject line
626
+ text: "Hello world?", // plain text body
627
+ html: "<b>Hello world?</b>", // html body
628
+ }
629
+ ```
630
+
631
+ # DeepL
632
+
633
+ Provides access to the Deepl translation API.
634
+
635
+ ## Configuration values
636
+
637
+ **authKey**: Your Deepl API Key. e.g. d82js82jd-8a14-119d-f8e9-dk2:fx
638
+
639
+ **url**: The url of the deepl endpoint. e.g. https://api-free.deepl.com/v2/translate
640
+
641
+ ## Functions
642
+
643
+ ### Translate
644
+
645
+ ```javascript
646
+ async translate(targetLanguage, text)
647
+ ```
648
+ Runs a query against the ldap Server.
649
+
650
+ Parameter:
651
+
652
+ * targetLanguage
653
+
654
+ Defines the target language that will be used for translation. e.g. DE
655
+
656
+ * text
657
+
658
+ The text that should be translated. Either string or array of string.
659
+
660
+ Full example:
661
+
662
+ ```javascript
663
+ const text = 'Guten Morgen. Hoffe wir sehen uns bald wieder! Viele Grüße';
664
+ const result = await adapter.deepl.translate('EN', text);
665
+ ```
666
+
667
+ Returns an object with an array translated sentences. e.g.
668
+
669
+ ```javascript
670
+ {
671
+ "translations": [
672
+ {"detected_source_language":"DE","text":"Good morning. Hope to see you soon! Many greetings, Robert"}
673
+ ]
674
+ }
675
+ ```
package/docs/releases.md CHANGED
@@ -1,7 +1,10 @@
1
1
  # Release Notes
2
2
 
3
3
  ## API
4
- ### 1.61.0 - 17.11.22
4
+ ### 1.62.0 - 18.11.22
5
+ Add Deepl Translation Adapter
6
+
7
+ ### 1.61.1 - 17.11.22
5
8
  Add HttpsProxyAgent to Scripts
6
9
 
7
10
  ### 1.60.0 - 27.09.22
@@ -179,7 +182,10 @@ e.g.
179
182
  */v1/incidents?impersonateUser=abc123
180
183
 
181
184
  ## Event Manager
182
- ### 1.26.0 - 17.11.22
185
+ ### 1.29.0 - 18.11.22
186
+ Add Deepl Translation Adapter
187
+
188
+ ### 1.28.1 - 17.11.22
183
189
  Add HttpsProxyAgent to Scripts
184
190
 
185
191
  ### 1.25.0 - 13.09.22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manyos/smileconnect-api",
3
- "version": "1.61.0",
3
+ "version": "1.62.0",
4
4
  "description": "A proxy and abstraction layer for BMCs IT Service Management Suite",
5
5
  "main": "app.js",
6
6
  "scripts": {
@@ -24,6 +24,7 @@
24
24
  "express-request-id": "^1.4.1",
25
25
  "express-validator": "^6.10.1",
26
26
  "fast-xml-parser": "^3.20.3",
27
+ "https-proxy-agent": "^5.0.1",
27
28
  "moment": "^2.29.1",
28
29
  "mongoose": "^5.12.5",
29
30
  "node-cache": "^4.2.1",