@cleardu/types 1.0.153 → 1.0.155

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.
@@ -320,5 +320,29 @@ export declare const BrokerMessages: {
320
320
  CLIENT_TARGET_REPORT: string;
321
321
  CREATE_CLIENT_STATE_CITY_PRODUCT_TYPE: string;
322
322
  };
323
+ MESSAGES: {
324
+ TEMPLATES: {
325
+ FIND_ALL: string;
326
+ FIND: string;
327
+ };
328
+ SMS: {
329
+ SEND: string;
330
+ SEND_TEST: string;
331
+ GET_STATUS: string;
332
+ FIND_ALL: string;
333
+ };
334
+ WHATSAPP: {
335
+ TEST_CREATE: string;
336
+ CREATE: string;
337
+ FIND_ALL: string;
338
+ FIND: string;
339
+ };
340
+ IVR: {
341
+ TEST_CREATE: string;
342
+ CREATE: string;
343
+ FIND_ALL: string;
344
+ FIND: string;
345
+ };
346
+ };
323
347
  };
324
348
  };
@@ -323,5 +323,29 @@ exports.BrokerMessages = {
323
323
  CLIENT_TARGET_REPORT: 'GET-CLIENT-TARGET-REPORT',
324
324
  CREATE_CLIENT_STATE_CITY_PRODUCT_TYPE: 'CREATE-CLIENT-STATE-CITY-PRODUCT-TYPE',
325
325
  },
326
+ MESSAGES: {
327
+ TEMPLATES: {
328
+ FIND_ALL: 'TEMPLATES_FIND_ALL',
329
+ FIND: 'TEMPLATES_FIND_ONE'
330
+ },
331
+ SMS: {
332
+ SEND: 'SEND_SMS',
333
+ SEND_TEST: 'SEND_TEST_SMS',
334
+ GET_STATUS: 'GET_SMS_STATUS',
335
+ FIND_ALL: 'SMS_FIND_ALL'
336
+ },
337
+ WHATSAPP: {
338
+ TEST_CREATE: 'TEST_WHATSAPP',
339
+ CREATE: 'CREATE_WHATSAPP',
340
+ FIND_ALL: 'FIND_ALL_WHATSAPP',
341
+ FIND: 'FIND_WHATSAPP'
342
+ },
343
+ IVR: {
344
+ TEST_CREATE: 'TEST_IVR',
345
+ CREATE: 'CREATE_IVR',
346
+ FIND_ALL: 'FIND_ALL_IVR',
347
+ FIND: 'FIND_IVR'
348
+ }
349
+ }
326
350
  },
327
351
  };
@@ -322,5 +322,29 @@ export const BrokerMessages = {
322
322
  CREATE_CLIENT_STATE_CITY_PRODUCT_TYPE:
323
323
  'CREATE-CLIENT-STATE-CITY-PRODUCT-TYPE',
324
324
  },
325
+ MESSAGES: {
326
+ TEMPLATES: {
327
+ FIND_ALL: 'TEMPLATES_FIND_ALL',
328
+ FIND: 'TEMPLATES_FIND_ONE'
329
+ },
330
+ SMS: {
331
+ SEND: 'SEND_SMS',
332
+ SEND_TEST: 'SEND_TEST_SMS',
333
+ GET_STATUS: 'GET_SMS_STATUS',
334
+ FIND_ALL: 'SMS_FIND_ALL'
335
+ },
336
+ WHATSAPP: {
337
+ TEST_CREATE: 'TEST_WHATSAPP',
338
+ CREATE: 'CREATE_WHATSAPP',
339
+ FIND_ALL: 'FIND_ALL_WHATSAPP',
340
+ FIND: 'FIND_WHATSAPP'
341
+ },
342
+ IVR: {
343
+ TEST_CREATE: 'TEST_IVR',
344
+ CREATE: 'CREATE_IVR',
345
+ FIND_ALL: 'FIND_ALL_IVR',
346
+ FIND: 'FIND_IVR'
347
+ }
348
+ }
325
349
  },
326
350
  };
@@ -194,7 +194,8 @@ export declare enum JobTypeEnum {
194
194
  CUSTOMER_FILE = "customer-file-parser",
195
195
  PAYMENT_FILE = "payment-file-parser",
196
196
  REASSIGNMENT_FILE = "reassign-file-parser",
197
- EXPORT_FILE = "export-file"
197
+ EXPORT_FILE = "export-file",
198
+ IMPORT_MESSAGE_FILE = "message-file-parser"
198
199
  }
199
200
  export declare enum PorvidersType {
200
201
  ENKASH = "enkash"
@@ -1168,3 +1169,22 @@ export declare enum CallStatus {
1168
1169
  PROGRESS_TIMEOUT = "PROGRESS_TIMEOUT",
1169
1170
  GATEWAY_DOWN = "GATEWAY_DOWN"
1170
1171
  }
1172
+ export declare enum templateTypes {
1173
+ SMS = "SMS",
1174
+ WHATSAPP = "WHATSAPP"
1175
+ }
1176
+ export declare enum languageCodes {
1177
+ EN = "en",
1178
+ GU = "gu",
1179
+ HI = "hi"
1180
+ }
1181
+ export declare enum messageDirection {
1182
+ IN = "in",
1183
+ OUT = "out"
1184
+ }
1185
+ export declare enum smsStatus {
1186
+ SEND = "SEND",
1187
+ DELIVRD = "DELIVRD",
1188
+ REJECTD = "REJECTD",
1189
+ UNDELIV = "UNDELIV"
1190
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CallStatus = exports.RecordType = exports.FileUploadConfig = exports.validateTableCols = exports.Constants = exports.PorvidersType = exports.JobTypeEnum = exports.ParticipantTypeEnum = exports.dispoSubDispo = exports.userModules = exports.SettlementStatus = exports.Disp_CategoryTypeEnum = exports.JobStatusEnum = exports.CallDirectionEnum = exports.DispositionTypeEnum = exports.GenderTypeEnum = exports.CampaignTypeEnum = exports.RoleTypeEnum = exports.UserTypeEnum = exports.ActInactiveEnumType = exports.Services = void 0;
3
+ exports.smsStatus = exports.messageDirection = exports.languageCodes = exports.templateTypes = exports.CallStatus = exports.RecordType = exports.FileUploadConfig = exports.validateTableCols = exports.Constants = exports.PorvidersType = exports.JobTypeEnum = exports.ParticipantTypeEnum = exports.dispoSubDispo = exports.userModules = exports.SettlementStatus = exports.Disp_CategoryTypeEnum = exports.JobStatusEnum = exports.CallDirectionEnum = exports.DispositionTypeEnum = exports.GenderTypeEnum = exports.CampaignTypeEnum = exports.RoleTypeEnum = exports.UserTypeEnum = exports.ActInactiveEnumType = exports.Services = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  tslib_1.__exportStar(require("./brokerMessages"), exports);
6
6
  exports.Services = {
@@ -212,6 +212,7 @@ var JobTypeEnum;
212
212
  JobTypeEnum["PAYMENT_FILE"] = "payment-file-parser";
213
213
  JobTypeEnum["REASSIGNMENT_FILE"] = "reassign-file-parser";
214
214
  JobTypeEnum["EXPORT_FILE"] = "export-file";
215
+ JobTypeEnum["IMPORT_MESSAGE_FILE"] = "message-file-parser";
215
216
  })(JobTypeEnum || (exports.JobTypeEnum = JobTypeEnum = {}));
216
217
  var PorvidersType;
217
218
  (function (PorvidersType) {
@@ -1199,3 +1200,26 @@ var CallStatus;
1199
1200
  CallStatus["PROGRESS_TIMEOUT"] = "PROGRESS_TIMEOUT";
1200
1201
  CallStatus["GATEWAY_DOWN"] = "GATEWAY_DOWN";
1201
1202
  })(CallStatus || (exports.CallStatus = CallStatus = {}));
1203
+ var templateTypes;
1204
+ (function (templateTypes) {
1205
+ templateTypes["SMS"] = "SMS";
1206
+ templateTypes["WHATSAPP"] = "WHATSAPP";
1207
+ })(templateTypes || (exports.templateTypes = templateTypes = {}));
1208
+ var languageCodes;
1209
+ (function (languageCodes) {
1210
+ languageCodes["EN"] = "en";
1211
+ languageCodes["GU"] = "gu";
1212
+ languageCodes["HI"] = "hi";
1213
+ })(languageCodes || (exports.languageCodes = languageCodes = {}));
1214
+ var messageDirection;
1215
+ (function (messageDirection) {
1216
+ messageDirection["IN"] = "in";
1217
+ messageDirection["OUT"] = "out";
1218
+ })(messageDirection || (exports.messageDirection = messageDirection = {}));
1219
+ var smsStatus;
1220
+ (function (smsStatus) {
1221
+ smsStatus["SEND"] = "SEND";
1222
+ smsStatus["DELIVRD"] = "DELIVRD";
1223
+ smsStatus["REJECTD"] = "REJECTD";
1224
+ smsStatus["UNDELIV"] = "UNDELIV";
1225
+ })(smsStatus || (exports.smsStatus = smsStatus = {}));
@@ -212,6 +212,7 @@ export enum JobTypeEnum {
212
212
  PAYMENT_FILE = 'payment-file-parser',
213
213
  REASSIGNMENT_FILE = 'reassign-file-parser',
214
214
  EXPORT_FILE = 'export-file',
215
+ IMPORT_MESSAGE_FILE = 'message-file-parser',
215
216
  }
216
217
 
217
218
  export enum PorvidersType {
@@ -1216,3 +1217,25 @@ export enum CallStatus {
1216
1217
  PROGRESS_TIMEOUT = 'PROGRESS_TIMEOUT',
1217
1218
  GATEWAY_DOWN = 'GATEWAY_DOWN',
1218
1219
  }
1220
+
1221
+ export enum templateTypes {
1222
+ SMS = 'SMS',
1223
+ WHATSAPP = 'WHATSAPP',
1224
+ }
1225
+ export enum languageCodes {
1226
+ EN = 'en',
1227
+ GU = 'gu',
1228
+ HI = 'hi'
1229
+ }
1230
+
1231
+ export enum messageDirection {
1232
+ IN = 'in',
1233
+ OUT = 'out'
1234
+ }
1235
+
1236
+ export enum smsStatus {
1237
+ SEND = 'SEND',
1238
+ DELIVRD = 'DELIVRD',
1239
+ REJECTD = 'REJECTD',
1240
+ UNDELIV = 'UNDELIV',
1241
+ }
@@ -55,6 +55,7 @@ export * from './common';
55
55
  export * from './webhook';
56
56
  export * from './userStatus';
57
57
  export * from './agentPayments';
58
+ export * from './templates';
58
59
  import { ConnectionOptions, Dialect, ReplicationOptions } from 'sequelize/types';
59
60
  export interface DBConnection extends ConnectionOptions {
60
61
  host: string;
@@ -58,3 +58,4 @@ tslib_1.__exportStar(require("./common"), exports);
58
58
  tslib_1.__exportStar(require("./webhook"), exports);
59
59
  tslib_1.__exportStar(require("./userStatus"), exports);
60
60
  tslib_1.__exportStar(require("./agentPayments"), exports);
61
+ tslib_1.__exportStar(require("./templates"), exports);
@@ -55,6 +55,7 @@ export * from './common';
55
55
  export * from './webhook';
56
56
  export * from './userStatus';
57
57
  export * from './agentPayments';
58
+ export * from './templates';
58
59
  import {
59
60
  ConnectionOptions,
60
61
  Dialect,
@@ -0,0 +1,14 @@
1
+ import { DatabaseObject } from '../baseObject';
2
+ export interface IIVR extends DatabaseObject {
3
+ loanId: number;
4
+ mobile: number;
5
+ status: string;
6
+ duration?: string;
7
+ startTime?: Date;
8
+ endTime?: Date;
9
+ campaignId?: string;
10
+ jobId: number;
11
+ scheduleDate?: Date;
12
+ ivrId?: string;
13
+ templateId: number;
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import { DatabaseObject } from '../baseObject';
2
+
3
+ export interface IIVR extends DatabaseObject {
4
+ loanId: number;
5
+ mobile: number;
6
+ status: string;
7
+ duration?: string;
8
+ startTime?: Date;
9
+ endTime?: Date;
10
+ campaignId?: string;
11
+ jobId: number;
12
+ scheduleDate?: Date;
13
+ ivrId?: string;
14
+ templateId: number;
15
+ }
@@ -1,3 +1,4 @@
1
+ import { IUser } from "../users";
1
2
  export interface IListPayload {
2
3
  q?: string;
3
4
  page?: number;
@@ -5,6 +6,7 @@ export interface IListPayload {
5
6
  export?: boolean;
6
7
  startDate?: Date;
7
8
  endDate?: Date;
9
+ loggedInUser?: IUser;
8
10
  }
9
11
  export interface IMigration {
10
12
  firstId: number;
@@ -1,3 +1,5 @@
1
+ import { IUser } from "../users";
2
+
1
3
  export interface IListPayload {
2
4
  q?: string;
3
5
  page?: number;
@@ -5,6 +7,7 @@ export interface IListPayload {
5
7
  export?: boolean;
6
8
  startDate?: Date;
7
9
  endDate?: Date;
10
+ loggedInUser?: IUser
8
11
  }
9
12
 
10
13
  export interface IMigration {
@@ -0,0 +1,41 @@
1
+ import { messageDirection, smsStatus } from '../../constants';
2
+ import { DatabaseObject } from '../baseObject';
3
+ import { IJob } from '../jobs';
4
+ import { IListPayload } from '../payload';
5
+ export interface ISMS extends DatabaseObject {
6
+ loanId: number;
7
+ messageId: string;
8
+ mobile: string;
9
+ message: string;
10
+ status: string;
11
+ scheduleDate?: Date;
12
+ jobId: number;
13
+ deliveredAt?: Date;
14
+ direction: messageDirection;
15
+ templateId: number;
16
+ }
17
+ export interface IMessageFilesCorrectCSV {
18
+ loanNumber: string;
19
+ }
20
+ export interface IIncorrectMessageFilesCorrectCSV extends IMessageFilesCorrectCSV {
21
+ errors: string;
22
+ }
23
+ export interface IMessageFileRecordsParams {
24
+ jobUId: string;
25
+ jobId: number;
26
+ correctData: IMessageFilesCorrectCSV[];
27
+ totalRecords: number;
28
+ currentJob: IJob;
29
+ clientId?: number;
30
+ createdBy: number;
31
+ portfolioId?: number;
32
+ incorrectRecordCount?: number;
33
+ templateId: number;
34
+ ivrSend: boolean;
35
+ smsSend: boolean;
36
+ whatsAppSend: boolean;
37
+ }
38
+ export interface ISMSFilterParams extends IListPayload {
39
+ clientIds?: string;
40
+ status?: smsStatus;
41
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,47 @@
1
+ import { messageDirection, smsStatus } from '../../constants';
2
+ import { DatabaseObject } from '../baseObject';
3
+ import { IJob } from '../jobs';
4
+ import { IListPayload } from '../payload';
5
+
6
+ export interface ISMS extends DatabaseObject {
7
+ loanId: number;
8
+ messageId: string;
9
+ mobile: string;
10
+ message: string;
11
+ status: string;
12
+ scheduleDate?: Date;
13
+ jobId: number;
14
+ deliveredAt?: Date;
15
+ direction: messageDirection;
16
+ templateId: number;
17
+ }
18
+
19
+ export interface IMessageFilesCorrectCSV {
20
+ loanNumber: string;
21
+ }
22
+
23
+ export interface IIncorrectMessageFilesCorrectCSV
24
+ extends IMessageFilesCorrectCSV {
25
+ errors: string;
26
+ }
27
+
28
+ export interface IMessageFileRecordsParams {
29
+ jobUId: string;
30
+ jobId: number;
31
+ correctData: IMessageFilesCorrectCSV[];
32
+ totalRecords: number;
33
+ currentJob: IJob;
34
+ clientId?: number;
35
+ createdBy: number;
36
+ portfolioId?: number;
37
+ incorrectRecordCount?: number;
38
+ templateId: number;
39
+ ivrSend: boolean;
40
+ smsSend: boolean;
41
+ whatsAppSend: boolean;
42
+ }
43
+
44
+ export interface ISMSFilterParams extends IListPayload {
45
+ clientIds?: string;
46
+ status?: smsStatus;
47
+ }
@@ -0,0 +1,9 @@
1
+ import { languageCodes, templateTypes } from '../../constants';
2
+ import { DatabaseObject } from '../baseObject';
3
+ export interface ITemplate extends DatabaseObject {
4
+ type: templateTypes;
5
+ name: string;
6
+ message: string;
7
+ languageCode: languageCodes;
8
+ isActive: boolean;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { languageCodes, templateTypes } from '../../constants';
2
+ import { DatabaseObject } from '../baseObject';
3
+
4
+ export interface ITemplate extends DatabaseObject {
5
+ type: templateTypes;
6
+ name: string;
7
+ message: string;
8
+ languageCode: languageCodes;
9
+ isActive: boolean;
10
+ }
@@ -0,0 +1,13 @@
1
+ import { DatabaseObject } from '../baseObject';
2
+ export interface IWhatsAppMessages extends DatabaseObject {
3
+ loanId: number;
4
+ mobile: number;
5
+ message: string;
6
+ status: string;
7
+ scheduleDate?: string;
8
+ jobId: number;
9
+ deliveredAt?: Date;
10
+ readAt?: Date;
11
+ clickToAction?: JSON;
12
+ templateId: number;
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import { DatabaseObject } from '../baseObject';
2
+ import { IJob } from '../jobs';
3
+
4
+ export interface IWhatsAppMessages extends DatabaseObject {
5
+ loanId: number;
6
+ mobile: number;
7
+ message: string;
8
+ status: string;
9
+ scheduleDate?: string;
10
+ jobId: number;
11
+ deliveredAt?: Date;
12
+ readAt?: Date;
13
+ clickToAction?: JSON;
14
+ templateId: number;
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleardu/types",
3
- "version": "1.0.153",
3
+ "version": "1.0.155",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@aws)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",