sdx-mailer-sdk 1.0.1 → 1.0.2
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/package.json
CHANGED
package/src/CourierMail.ts
CHANGED
|
@@ -21,9 +21,7 @@ export default class CourierMail {
|
|
|
21
21
|
request.receiver = receiver
|
|
22
22
|
request.reply_mail = reply_mail
|
|
23
23
|
if(btn_label != null || btn_link != null){
|
|
24
|
-
request.link = new CourierLink();
|
|
25
|
-
request.link.btn_label = btn_label
|
|
26
|
-
request.link.btn_link = btn_link
|
|
24
|
+
request.link = new CourierLink(btn_label,btn_link);
|
|
27
25
|
}
|
|
28
26
|
return request;
|
|
29
27
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import CourierLink from "./CourierLink";
|
|
2
2
|
|
|
3
3
|
export default class CourierRequest {
|
|
4
|
-
public subject
|
|
5
|
-
public title
|
|
6
|
-
public message
|
|
7
|
-
public receiver
|
|
8
|
-
public reply_mail
|
|
9
|
-
public link
|
|
4
|
+
public subject!: string;
|
|
5
|
+
public title!: string;
|
|
6
|
+
public message!:string;
|
|
7
|
+
public receiver!:string;
|
|
8
|
+
public reply_mail!:string;
|
|
9
|
+
public link!:CourierLink|null;
|
|
10
10
|
}
|
|
@@ -3,7 +3,7 @@ import Commons from '../utils/Commons';
|
|
|
3
3
|
|
|
4
4
|
export default class CourierService {
|
|
5
5
|
public async postMail(basicAuth: string | null, body: any, url: string, methodName: string, productId: number) {
|
|
6
|
-
const res = await axios.post(url, body, this.buildOptions(basicAuth, true,productId)).catch(function (err) {
|
|
6
|
+
const res = await axios.post(url, body, this.buildOptions(basicAuth, true,productId)).catch(function (err:any) {
|
|
7
7
|
throw Commons.buildWebServiceException(err, 'POST', methodName);
|
|
8
8
|
});
|
|
9
9
|
return res.data;
|