aeremmiddleware 1.0.4 → 1.0.6

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.
Files changed (65) hide show
  1. package/dist/Finance/Ingenico.types.d.ts +21 -0
  2. package/dist/Finance/Ingenico.types.js +3 -0
  3. package/dist/Finance/Ingenico.types.js.map +1 -0
  4. package/dist/Finance/crimeCheck.d.ts +16 -0
  5. package/dist/Finance/crimeCheck.js +137 -0
  6. package/dist/Finance/crimeCheck.js.map +1 -0
  7. package/dist/Finance/crimecheck.types.d.ts +30 -0
  8. package/dist/Finance/crimecheck.types.js +3 -0
  9. package/dist/Finance/crimecheck.types.js.map +1 -0
  10. package/dist/Finance/encrypt.d.ts +1 -0
  11. package/dist/Finance/encrypt.js +20 -0
  12. package/dist/Finance/encrypt.js.map +1 -0
  13. package/dist/Finance/idfy.d.ts +63 -35
  14. package/dist/Finance/idfy.js +419 -201
  15. package/dist/Finance/idfy.js.map +1 -1
  16. package/dist/Finance/index.d.ts +12 -4
  17. package/dist/Finance/index.js +18 -10
  18. package/dist/Finance/index.js.map +1 -1
  19. package/dist/Finance/ingenico.d.ts +13 -0
  20. package/dist/Finance/ingenico.js +122 -0
  21. package/dist/Finance/ingenico.js.map +1 -0
  22. package/dist/Finance/ingenicoHtml.d.ts +2 -0
  23. package/dist/Finance/ingenicoHtml.js +122 -0
  24. package/dist/Finance/ingenicoHtml.js.map +1 -0
  25. package/dist/Finance/novel.d.ts +35 -0
  26. package/dist/Finance/novel.js +222 -0
  27. package/dist/Finance/novel.js.map +1 -0
  28. package/dist/Finance/novel.types.d.ts +23 -0
  29. package/dist/Finance/novel.types.js +10 -0
  30. package/dist/Finance/novel.types.js.map +1 -0
  31. package/dist/Finance/qbrik.d.ts +89 -0
  32. package/dist/Finance/qbrik.js +463 -0
  33. package/dist/Finance/qbrik.js.map +1 -0
  34. package/dist/Finance/qbrik.types.d.ts +76 -0
  35. package/dist/Finance/qbrik.types.js +3 -0
  36. package/dist/Finance/qbrik.types.js.map +1 -0
  37. package/dist/Maps/index.js +1 -1
  38. package/dist/Socials/Sms.types.d.ts +8 -0
  39. package/dist/Socials/Sms.types.js +9 -0
  40. package/dist/Socials/Sms.types.js.map +1 -0
  41. package/dist/Socials/SmsSender.d.ts +17 -0
  42. package/dist/Socials/SmsSender.js +74 -0
  43. package/dist/Socials/SmsSender.js.map +1 -0
  44. package/dist/Socials/Whatsapp.types.d.ts +93 -97
  45. package/dist/Socials/Whatsapp.types.js +8 -8
  46. package/dist/Socials/Whatsapp.types.js.map +1 -1
  47. package/dist/Socials/index.d.ts +6 -4
  48. package/dist/Socials/index.js +12 -10
  49. package/dist/Socials/index.js.map +1 -1
  50. package/dist/Socials/{message.d.ts → whatsApp.d.ts} +23 -26
  51. package/dist/Socials/{message.js → whatsApp.js} +169 -212
  52. package/dist/Socials/{message.js.map → whatsApp.js.map} +1 -1
  53. package/dist/index.d.ts +13 -8
  54. package/dist/index.js +8 -8
  55. package/package.json +1 -1
  56. package/src/Finance/Ingenico.types.ts +3 -0
  57. package/src/Finance/crimeCheck.ts +135 -0
  58. package/src/Finance/crimecheck.types.ts +31 -0
  59. package/src/Finance/idfy.ts +34 -20
  60. package/src/Finance/index.ts +6 -0
  61. package/src/Finance/ingenico.ts +36 -136
  62. package/src/Finance/ingenicoHtml.ts +119 -0
  63. package/src/Finance/qbrik.ts +760 -0
  64. package/src/Finance/qbrik.types.ts +81 -0
  65. package/src/Socials/SmsSender.ts +20 -21
@@ -0,0 +1,76 @@
1
+ export interface LoginDetails {
2
+ username: string;
3
+ password: string;
4
+ version?: string;
5
+ }
6
+ export interface CustomerDetails {
7
+ enrollment_date: string;
8
+ legal_name: string;
9
+ date_of_incorporation: string;
10
+ branch_code: string;
11
+ branch_name: string;
12
+ client_type: string;
13
+ institutional_type: string;
14
+ identity_proof_type: string;
15
+ identity_proof_number: string;
16
+ identity_proof_is_primary: string;
17
+ identity_proof_is_address_proof: string;
18
+ identity_proof_is_id_proof: string;
19
+ identity_proof_is_address_proof_primary: string;
20
+ identity_proof_is_id_proof_primary: string;
21
+ }
22
+ export interface MasterListInput {
23
+ name_0: string;
24
+ name_1?: string;
25
+ name_2?: string;
26
+ }
27
+ export interface EntityPayload {
28
+ entity_no: string;
29
+ identity_proof_type: string;
30
+ identity_proof_number: string;
31
+ identity_proof_is_id_proof: string;
32
+ identity_proof_is_id_proof_primary: string;
33
+ identity_proof_is_address_proof: string;
34
+ transaction_id: string;
35
+ identity_proof_is_address_proof_primary: string;
36
+ }
37
+ export interface ApproveData {
38
+ account_no: string;
39
+ approved_loan_amount: string;
40
+ }
41
+ export interface AssociateDetails {
42
+ account_no: string;
43
+ associate_type: string;
44
+ associate_entity_no?: string;
45
+ associate_relation?: string;
46
+ associate_legal_name?: string;
47
+ associate_alias?: string;
48
+ associate_date_of_birth?: string;
49
+ associate_gender?: string;
50
+ associate_occupation?: string;
51
+ associate_father_name?: string;
52
+ associate_telephone?: string;
53
+ associate_education_level?: string;
54
+ associate_marital_status?: string;
55
+ auto_create_area?: string;
56
+ associate_address_residence_state_name?: string;
57
+ associate_address_residence_district_name?: string;
58
+ associate_address_residence_block_name?: string;
59
+ associate_address_residence_area_name?: string;
60
+ associate_address_residence_pincode?: string;
61
+ associate_address_residence_address?: string;
62
+ associate_address_office_address?: string;
63
+ associate_address_office_state_name?: string;
64
+ associate_address_office_district_name?: string;
65
+ associate_address_office_block_name?: string;
66
+ associate_address_office_area_name?: string;
67
+ associate_address_office_pincode?: string;
68
+ associate_bank_details_bank_name?: string;
69
+ associate_bank_details_branch_name?: string;
70
+ associate_bank_details_IFSCCode?: string;
71
+ associate_bank_details_account_no?: string;
72
+ associate_bank_details_account_type?: string;
73
+ associate_bank_details_beneficiary_name?: string;
74
+ associate_bank_details_is_primary?: string;
75
+ associate_comment?: string;
76
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=qbrik.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qbrik.types.js","sourceRoot":"","sources":["../../src/Finance/qbrik.types.ts"],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- "use strict";
1
+ "use strict";
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,8 @@
1
+ export declare enum Provider {
2
+ EXOTEL = "EXOTEL",
3
+ GUPSHUP = "GUPSHUP"
4
+ }
5
+ export interface DemoBody {
6
+ To: string;
7
+ Body: string;
8
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Provider = void 0;
4
+ var Provider;
5
+ (function (Provider) {
6
+ Provider["EXOTEL"] = "EXOTEL";
7
+ Provider["GUPSHUP"] = "GUPSHUP";
8
+ })(Provider || (exports.Provider = Provider = {}));
9
+ //# sourceMappingURL=Sms.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sms.types.js","sourceRoot":"","sources":["../../src/Socials/Sms.types.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAGT;AAHH,WAAY,QAAQ;IAChB,6BAAiB,CAAA;IACjB,+BAAmB,CAAA;AACrB,CAAC,EAHS,QAAQ,wBAAR,QAAQ,QAGjB"}
@@ -0,0 +1,17 @@
1
+ import { DemoBody } from "./Sms.types";
2
+ declare class SmsSender {
3
+ private exotelSid;
4
+ private exotelToken;
5
+ private exotelApiKey;
6
+ private smsUrl;
7
+ private provider;
8
+ constructor(payload: {
9
+ exotelSid: string;
10
+ exotelToken: string;
11
+ exotelApiKey: string;
12
+ provider: string;
13
+ });
14
+ private sendOtpMessage;
15
+ sendOtpSms(obj: DemoBody): Promise<boolean>;
16
+ }
17
+ export default SmsSender;
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const axios_1 = __importDefault(require("axios"));
16
+ const Sms_types_1 = require("./Sms.types");
17
+ class SmsSender {
18
+ constructor(payload) {
19
+ const { exotelSid, exotelToken, exotelApiKey, provider } = payload;
20
+ this.exotelSid = exotelSid;
21
+ this.exotelToken = exotelToken;
22
+ this.exotelApiKey = exotelApiKey;
23
+ this.provider = provider;
24
+ if (this.provider === Sms_types_1.Provider.EXOTEL) {
25
+ this.smsUrl = `https://${this.exotelApiKey}:${this.exotelToken}@api.exotel.com/v1/Accounts/${this.exotelSid}/Sms/send`;
26
+ }
27
+ else if (this.provider === Sms_types_1.Provider.GUPSHUP) {
28
+ }
29
+ }
30
+ sendOtpMessage(messageData) {
31
+ return __awaiter(this, void 0, void 0, function* () {
32
+ if (messageData.To && messageData.Body) {
33
+ if (messageData.Body.length != 6) {
34
+ throw new Error("Please enter 6 digit number");
35
+ }
36
+ }
37
+ else
38
+ throw new Error("All input data not found");
39
+ const bodyFormData = new FormData();
40
+ const smsTemplateMsg = "Your OTP for AEREMS login is %d. This %d will expire in 10 minutes.";
41
+ bodyFormData.append("To", messageData.To);
42
+ bodyFormData.append("From", "AEREM");
43
+ bodyFormData.append("Body", smsTemplateMsg.replace(/%d/g, messageData.Body));
44
+ bodyFormData.append("EncodingType", "plain");
45
+ bodyFormData.append("DltEntityId", "1301164059765333889");
46
+ bodyFormData.append("DltTemplateId", "1307164663997173809");
47
+ bodyFormData.append("SmsType", "transactional");
48
+ try {
49
+ let config = {
50
+ method: "post",
51
+ maxBodyLength: Infinity,
52
+ url: this.smsUrl,
53
+ headers: {
54
+ "Content-Type": "multipart/form-data",
55
+ },
56
+ data: bodyFormData,
57
+ };
58
+ yield axios_1.default.request(config);
59
+ return true;
60
+ }
61
+ catch (error) {
62
+ console.error("Error sending sms:", error);
63
+ return false;
64
+ }
65
+ });
66
+ }
67
+ sendOtpSms(obj) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ return this.sendOtpMessage(obj);
70
+ });
71
+ }
72
+ }
73
+ exports.default = SmsSender;
74
+ //# sourceMappingURL=SmsSender.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SmsSender.js","sourceRoot":"","sources":["../../src/Socials/SmsSender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,2CAAiD;AAEjD,MAAM,SAAS;IAOb,YAAY,OAKX;QACC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;QACnE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,IAAI,IAAI,CAAC,QAAQ,KAAK,oBAAQ,CAAC,MAAM,EAAE;YACrC,IAAI,CAAC,MAAM,GAAG,WAAW,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,WAAW,+BAA+B,IAAI,CAAC,SAAS,WAAW,CAAC;SACxH;aAAM,IAAI,IAAI,CAAC,QAAQ,KAAK,oBAAQ,CAAC,OAAO,EAAE;SAG9C;IACH,CAAC;IAEa,cAAc,CAAC,WAAqB;;YAChD,IAAI,WAAW,CAAC,EAAE,IAAI,WAAW,CAAC,IAAI,EAAE;gBACtC,IAAI,WAAW,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE;oBAChC,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;iBAChD;aACF;;gBAAM,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;YAEnD,MAAM,YAAY,GAAG,IAAI,QAAQ,EAAE,CAAC;YAEpC,MAAM,cAAc,GAClB,qEAAqE,CAAC;YAExE,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,CAAC,CAAC;YAC1C,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YACrC,YAAY,CAAC,MAAM,CACjB,MAAM,EACN,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,CAChD,CAAC;YACF,YAAY,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;YAC7C,YAAY,CAAC,MAAM,CAAC,aAAa,EAAE,qBAAqB,CAAC,CAAC;YAC1D,YAAY,CAAC,MAAM,CAAC,eAAe,EAAE,qBAAqB,CAAC,CAAC;YAC5D,YAAY,CAAC,MAAM,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;YAEhD,IAAI;gBACF,IAAI,MAAM,GAAG;oBACX,MAAM,EAAE,MAAM;oBACd,aAAa,EAAE,QAAQ;oBACvB,GAAG,EAAE,IAAI,CAAC,MAAM;oBAChB,OAAO,EAAE;wBACP,cAAc,EAAE,qBAAqB;qBACtC;oBAED,IAAI,EAAE,YAAY;iBACnB,CAAC;gBAEF,MAAM,eAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBAC5B,OAAO,IAAI,CAAC;aACb;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;gBAC3C,OAAO,KAAK,CAAC;aACd;QACH,CAAC;KAAA;IAEK,UAAU,CAAC,GAAa;;YAC5B,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;QAClC,CAAC;KAAA;CACF;AACD,kBAAe,SAAS,CAAC"}
@@ -1,97 +1,93 @@
1
- interface WhatsAppMessageData {
2
- from: string;
3
- to: string;
4
- body?: string;
5
- content?: WhatsappContentType;
6
- }
7
- interface Templatetype {
8
- name: string;
9
- language: {
10
- policy: string;
11
- code: string;
12
- };
13
- components: Array<{
14
- type: string;
15
- parameters: Array<{
16
- type: string;
17
- text: string;
18
- }>;
19
- }>;
20
- }
21
- interface WhatsappContentType {
22
- type: string;
23
- text?: {
24
- preview_url: string;
25
- body: string;
26
- };
27
- document?: any;
28
- image?: any;
29
- video?: any;
30
- recipient_type: any;
31
- template?: Templatetype;
32
- }
33
- export interface DemoBody {
34
- whatsapp: {
35
- messages: Array<WhatsAppMessageData>;
36
- };
37
- }
38
- interface WhatsAppTemplateMessage {
39
- from: string;
40
- to: string;
41
- content: {
42
- type: string;
43
- template: {
44
- name: string;
45
- language: {
46
- policy?: string;
47
- code: string;
48
- };
49
- components: Array<{
50
- type: string;
51
- parameters: Array<{
52
- type: string;
53
- text: string;
54
- }>;
55
- }>;
56
- };
57
- };
58
- }
59
- export interface WhatsAppTemplateDemoBody {
60
- whatsapp: {
61
- messages: Array<WhatsAppTemplateMessage>;
62
- };
63
- }
64
- export interface EmiReminderAug2023 {
65
- code: number;
66
- error_data: null;
67
- status: string;
68
- data: {
69
- waba_id: string;
70
- name: string;
71
- components: Array<HeaderComponent | BodyComponent>;
72
- };
73
- }
74
- interface HeaderComponent {
75
- type: string;
76
- format: string;
77
- text: string;
78
- example: {
79
- header_text: Array<string>;
80
- };
81
- }
82
- interface BodyComponent {
83
- type: string;
84
- text: string;
85
- example: {
86
- body_text: Array<Array<string>>;
87
- };
88
- }
89
- export interface SmsDemoBody {
90
- To: string;
91
- Body: string;
92
- }
93
- export declare enum Provider {
94
- EXOTEL = "EXOTEL",
95
- GUPSHUP = "GUPSHUP"
96
- }
97
- export {};
1
+ interface WhatsAppMessageData {
2
+ from: string;
3
+ to: string;
4
+ body?: string;
5
+ content?: WhatsappContentType;
6
+ }
7
+ interface Templatetype {
8
+ name: string;
9
+ language: {
10
+ policy: string;
11
+ code: string;
12
+ };
13
+ components: Array<{
14
+ type: string;
15
+ parameters: Array<{
16
+ type: string;
17
+ text: string;
18
+ }>;
19
+ }>;
20
+ }
21
+ interface WhatsappContentType {
22
+ type: string;
23
+ text?: {
24
+ preview_url: string;
25
+ body: string;
26
+ };
27
+ document?: any;
28
+ image?: any;
29
+ video?: any;
30
+ recipient_type: any;
31
+ template?: Templatetype;
32
+ }
33
+ export interface DemoBody {
34
+ whatsapp: {
35
+ messages: Array<WhatsAppMessageData>;
36
+ };
37
+ }
38
+ interface WhatsAppTemplateMessage {
39
+ from: string;
40
+ to: string;
41
+ content: {
42
+ type: string;
43
+ template: {
44
+ name: string;
45
+ language: {
46
+ policy?: string;
47
+ code: string;
48
+ };
49
+ components: Array<{
50
+ type: string;
51
+ parameters: Array<{
52
+ type: string;
53
+ text: string;
54
+ }>;
55
+ }>;
56
+ };
57
+ };
58
+ }
59
+ export interface WhatsAppTemplateDemoBody {
60
+ whatsapp: {
61
+ messages: Array<WhatsAppTemplateMessage>;
62
+ };
63
+ }
64
+ export interface EmiReminderAug2023 {
65
+ code: number;
66
+ error_data: null;
67
+ status: string;
68
+ data: {
69
+ waba_id: string;
70
+ name: string;
71
+ components: Array<HeaderComponent | BodyComponent>;
72
+ };
73
+ }
74
+ interface HeaderComponent {
75
+ type: string;
76
+ format: string;
77
+ text: string;
78
+ example: {
79
+ header_text: Array<string>;
80
+ };
81
+ }
82
+ interface BodyComponent {
83
+ type: string;
84
+ text: string;
85
+ example: {
86
+ body_text: Array<Array<string>>;
87
+ };
88
+ }
89
+ export declare enum Provider {
90
+ EXOTEL = "EXOTEL",
91
+ GUPSHUP = "GUPSHUP"
92
+ }
93
+ export {};
@@ -1,9 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Provider = void 0;
4
- var Provider;
5
- (function (Provider) {
6
- Provider["EXOTEL"] = "EXOTEL";
7
- Provider["GUPSHUP"] = "GUPSHUP";
8
- })(Provider || (exports.Provider = Provider = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Provider = void 0;
4
+ var Provider;
5
+ (function (Provider) {
6
+ Provider["EXOTEL"] = "EXOTEL";
7
+ Provider["GUPSHUP"] = "GUPSHUP";
8
+ })(Provider || (exports.Provider = Provider = {}));
9
9
  //# sourceMappingURL=Whatsapp.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Whatsapp.types.js","sourceRoot":"","sources":["../../src/Socials/Whatsapp.types.ts"],"names":[],"mappings":";;;AA+FE,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,6BAAiB,CAAA;IACjB,+BAAmB,CAAA;AACrB,CAAC,EAHW,QAAQ,wBAAR,QAAQ,QAGnB"}
1
+ {"version":3,"file":"Whatsapp.types.js","sourceRoot":"","sources":["../../src/Socials/Whatsapp.types.ts"],"names":[],"mappings":";;;AA4FE,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,6BAAiB,CAAA;IACjB,+BAAmB,CAAA;AACrB,CAAC,EAHW,QAAQ,wBAAR,QAAQ,QAGnB"}
@@ -1,4 +1,6 @@
1
- import Socials from './message';
2
- export declare const socials: {
3
- message: typeof Socials;
4
- };
1
+ import Socials from './whatsApp';
2
+ import Sms from './SmsSender';
3
+ export declare const socials: {
4
+ whatsapp: typeof Socials;
5
+ text: typeof Sms;
6
+ };
@@ -1,11 +1,13 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.socials = void 0;
7
- const message_1 = __importDefault(require("./message"));
8
- exports.socials = {
9
- message: message_1.default,
10
- };
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.socials = void 0;
7
+ const whatsApp_1 = __importDefault(require("./whatsApp"));
8
+ const SmsSender_1 = __importDefault(require("./SmsSender"));
9
+ exports.socials = {
10
+ whatsapp: whatsApp_1.default,
11
+ text: SmsSender_1.default
12
+ };
11
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Socials/index.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA+B;AAElB,QAAA,OAAO,GAAG;IACvB,OAAO,EAAG,iBAAO;CAEhB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Socials/index.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAgC;AAChC,4DAA6B;AAEhB,QAAA,OAAO,GAAG;IACvB,QAAQ,EAAG,kBAAO;IAClB,IAAI,EAAC,mBAAG;CACP,CAAA"}
@@ -1,26 +1,23 @@
1
- import { DemoBody, EmiReminderAug2023, SmsDemoBody, WhatsAppTemplateDemoBody } from "./Whatsapp.types";
2
- declare class MessageSender {
3
- private exotelSid;
4
- private exotelToken;
5
- private exotelApiKey;
6
- private whatsappApiUrl;
7
- private smsUrl;
8
- private provider;
9
- constructor(payload: {
10
- exotelSid: string;
11
- exotelToken: string;
12
- exotelApiKey: string;
13
- provider: string;
14
- });
15
- getTemplates(): Promise<any>;
16
- getUniquePlaceholderCount(str: string): number;
17
- validateTemplatePayload(template: EmiReminderAug2023, payload: any): true | undefined;
18
- testType(obj: DemoBody): boolean;
19
- private sendMessage;
20
- private sendTemplateMessage;
21
- private sendOtpMessage;
22
- sendOtpSms(obj: SmsDemoBody): Promise<boolean>;
23
- sendWhatsAppMessage(obj: DemoBody): Promise<boolean>;
24
- sendWhatsappTemplateMessage(obj: WhatsAppTemplateDemoBody): Promise<boolean>;
25
- }
26
- export default MessageSender;
1
+ import { DemoBody, EmiReminderAug2023, WhatsAppTemplateDemoBody } from "./Whatsapp.types";
2
+ declare class WhatsappMessageSender {
3
+ private exotelSid;
4
+ private exotelToken;
5
+ private exotelApiKey;
6
+ private whatsappApiUrl;
7
+ private provider;
8
+ constructor(payload: {
9
+ exotelSid: string;
10
+ exotelToken: string;
11
+ exotelApiKey: string;
12
+ provider: string;
13
+ });
14
+ getTemplates(): Promise<any>;
15
+ getUniquePlaceholderCount(str: string): number;
16
+ validateTemplatePayload(template: EmiReminderAug2023, payload: any): true | undefined;
17
+ testType(obj: DemoBody): boolean;
18
+ private sendMessage;
19
+ private sendTemplateMessage;
20
+ sendWhatsAppMessage(obj: DemoBody): Promise<boolean>;
21
+ sendWhatsappTemplateMessage(obj: WhatsAppTemplateDemoBody): Promise<boolean>;
22
+ }
23
+ export default WhatsappMessageSender;