sdx-mailer-sdk 1.0.8 → 1.0.10

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/index.js CHANGED
@@ -1,12 +1,54 @@
1
1
  const CourierMail = require('./src/CourierMail');
2
2
 
3
+ /**
4
+ * Method for CourierRequest creation
5
+ * @param {*} title
6
+ * @param {*} subject
7
+ * @param {*} message
8
+ * @param {*} receiver
9
+ * @param {*} reply_mail
10
+ * @param {*} btn_label
11
+ * @param {*} btn_link
12
+ * @returns
13
+ */
3
14
  function createCourierRequest(title, subject, message, receiver, reply_mail, btn_label, btn_link) {
4
15
  return CourierMail.createCourierRequest(title, subject, message, receiver, reply_mail, btn_label, btn_link)
5
16
  }
6
17
 
18
+ /**
19
+ * Method for CourierExceptionRequest creation
20
+ * @param {*} error
21
+ * @param {*} detail
22
+ * @param {*} context
23
+ * @returns
24
+ */
25
+ function createCourierExceptionRequest(error,detail,context){
26
+ return CourierMail.createCourierExceptionRequest(error,detail,context)
27
+ }
28
+
29
+ /**
30
+ * Method for send CourierRequest
31
+ * @param {*} basicAuth
32
+ * @param {*} endpoint
33
+ * @param {*} tokenRQ
34
+ * @param {*} productId
35
+ * @param {*} isBasic
36
+ * @returns
37
+ */
38
+ async function sendCourierMail(basicAuth,endpoint,tokenRQ,productId,isBasic){
39
+ return CourierMail.sendCourierMail(basicAuth,endpoint,tokenRQ,productId,isBasic)
40
+ }
7
41
 
8
- function mockMail() {
9
- return "Hello Mock!"
42
+ /**
43
+ * Method for send CourierExceptionRequest
44
+ * @param {*} basicAuth
45
+ * @param {*} endpoint
46
+ * @param {*} tokenRQ
47
+ * @param {*} productId
48
+ * @returns
49
+ */
50
+ async function sendExceptionMail(basicAuth,endpoint,tokenRQ,productId){
51
+ return CourierMail.sendExceptionMail(basicAuth,endpoint,tokenRQ,productId)
10
52
  }
11
53
 
12
- module.exports = { createCourierRequest, mockMail };
54
+ module.exports = { sendCourierMail,createCourierRequest,createCourierExceptionRequest,sendExceptionMail};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdx-mailer-sdk",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "A api rest sdx-mailer-sender sdk",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -11,7 +11,6 @@
11
11
  "url": "git+https://github.com/softdirex/sdx-mailer-sdk.git"
12
12
  },
13
13
  "keywords": [
14
- "typescript",
15
14
  "npm",
16
15
  "package"
17
16
  ],
@@ -27,6 +27,15 @@ class CourierMail {
27
27
  return new CourierExceptionRequest(error, detail, context);
28
28
  }
29
29
 
30
+ /**
31
+ * Send Courier Mail
32
+ * @param {*} basicAuth
33
+ * @param {*} endpoint
34
+ * @param {*} tokenRQ
35
+ * @param {*} productId
36
+ * @param {*} isBasic
37
+ * @returns
38
+ */
30
39
  async sendCourierMail(basicAuth, endpoint, tokenRQ, productId, isBasic) {
31
40
  const url = endpoint + '/courier' + (isBasic ? '/basic' : '');
32
41
  if (!Commons.validField(tokenRQ.trx)) {