@cleardu/types 1.0.43 → 1.0.45

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.
@@ -10,6 +10,8 @@ export declare const BrokerMessages: {
10
10
  REPORTING_USER_DROPDOWN: string;
11
11
  FIND_BY_ROLE_ID: string;
12
12
  MIGRATE_USER: string;
13
+ USER_CAMPAIGNS: string;
14
+ MAP_USER_CAMPAIGN: string;
13
15
  };
14
16
  ROLE: {
15
17
  CREATE: string;
@@ -48,7 +50,10 @@ export declare const BrokerMessages: {
48
50
  AVAILABILITY: string;
49
51
  DELETE: string;
50
52
  DROPDOWN: string;
51
- USER_CAMPAIGNS: string;
53
+ ASSIGNED_CAMPAIGNS: string;
54
+ CREATE_CAMPAIGN_USER: string;
55
+ DELETE_CAMPAIGN_USER: string;
56
+ FIND_ALL_CAMPAIGN_USER: string;
52
57
  };
53
58
  DIALER: {
54
59
  LOGIN: string;
@@ -116,6 +121,33 @@ export declare const BrokerMessages: {
116
121
  STATES: string;
117
122
  DISPOSITIONS: string;
118
123
  };
124
+ BORROWER_DISPOSITION: {
125
+ CREATE: string;
126
+ FINDALL: string;
127
+ FOLLOUPS: string;
128
+ LATEST_DISPOSITIONS: string;
129
+ UPDATE_INITIATED_CALL: string;
130
+ };
131
+ PAYMENT: {
132
+ ACCOUNT: {
133
+ CREATE: string;
134
+ UPDATE: string;
135
+ FIND_ONE: string;
136
+ FIND_ALL: string;
137
+ DELETE: string;
138
+ };
139
+ CODE: {
140
+ CREATE: string;
141
+ UPDATE: string;
142
+ FIND_ONE: string;
143
+ FIND_ALL: string;
144
+ DELETE: string;
145
+ };
146
+ CREATE: string;
147
+ UPDATE: string;
148
+ FIND_ONE: string;
149
+ FIND_ALL: string;
150
+ };
119
151
  };
120
152
  CDR: {
121
153
  PROCESSCDR: string;
@@ -160,5 +192,9 @@ export declare const BrokerMessages: {
160
192
  WHATSAPP_REPORT: string;
161
193
  TRIGGER_WHATSAPP_MESSAGE: string;
162
194
  };
195
+ ENKASH: {
196
+ GENERATE_PAYMENT_LINK: string;
197
+ INIT: string;
198
+ };
163
199
  };
164
200
  };
@@ -13,6 +13,8 @@ exports.BrokerMessages = {
13
13
  REPORTING_USER_DROPDOWN: 'REPORTING-USER-DROPDOWN',
14
14
  FIND_BY_ROLE_ID: 'FIND-USER-BY-ROLE-ID',
15
15
  MIGRATE_USER: 'MIGRATE-USER',
16
+ USER_CAMPAIGNS: 'LIST-USER-CAMPAIGNS',
17
+ MAP_USER_CAMPAIGN: 'ASSIGN-USER-CAMPAIGN',
16
18
  },
17
19
  ROLE: {
18
20
  CREATE: 'CREATE-ROLE',
@@ -51,7 +53,10 @@ exports.BrokerMessages = {
51
53
  AVAILABILITY: 'campaign-availabilty',
52
54
  DELETE: 'delete-campaign',
53
55
  DROPDOWN: 'campaign-dropdown',
54
- USER_CAMPAIGNS: 'users-campaignS',
56
+ ASSIGNED_CAMPAIGNS: 'LIST-ASSIGNED-CAMPAIGNS-BY-USERID',
57
+ CREATE_CAMPAIGN_USER: 'CREATE-CAMPAIGN-USER',
58
+ DELETE_CAMPAIGN_USER: 'DELETE-CAMPAIGN-USER',
59
+ FIND_ALL_CAMPAIGN_USER: 'FIND_ALL-CAMPAIGN-USER',
55
60
  },
56
61
  DIALER: {
57
62
  LOGIN: 'dialer-login',
@@ -119,6 +124,33 @@ exports.BrokerMessages = {
119
124
  STATES: 'OPTIONS-STATE',
120
125
  DISPOSITIONS: 'OPTIONS-DISPOSITIONS',
121
126
  },
127
+ BORROWER_DISPOSITION: {
128
+ CREATE: 'CREATE_DISPOSITION',
129
+ FINDALL: 'DISPOSITIONS-ALL',
130
+ FOLLOUPS: 'FOLLOUPS',
131
+ LATEST_DISPOSITIONS: 'LATEST_DISPOSITIONS',
132
+ UPDATE_INITIATED_CALL: 'UPDATE_INITIATED_CALL_DETAIL',
133
+ },
134
+ PAYMENT: {
135
+ ACCOUNT: {
136
+ CREATE: 'ACCOUNT-CREATE',
137
+ UPDATE: 'ACCOUNT-UPDATE',
138
+ FIND_ONE: 'ACCOUNT-FIND_ONE',
139
+ FIND_ALL: 'ACCOUNT-FIND_ALL',
140
+ DELETE: 'ACCOUNT-DELETE',
141
+ },
142
+ CODE: {
143
+ CREATE: 'CODE-CREATE',
144
+ UPDATE: 'CODE-UPDATE',
145
+ FIND_ONE: 'CODE-FIND_ONE',
146
+ FIND_ALL: 'CODE-FIND_ALL',
147
+ DELETE: 'CODE-DELETE',
148
+ },
149
+ CREATE: 'PAYMENT-CREATE',
150
+ UPDATE: 'PAYMENT-UPDATE',
151
+ FIND_ONE: 'PAYMENT-FIND_ONE',
152
+ FIND_ALL: 'PAYMENT-FIND_ALL',
153
+ },
122
154
  },
123
155
  CDR: {
124
156
  PROCESSCDR: 'PROCESS-CDR',
@@ -163,5 +195,9 @@ exports.BrokerMessages = {
163
195
  WHATSAPP_REPORT: 'ezsip-whatsapp-report',
164
196
  TRIGGER_WHATSAPP_MESSAGE: 'ezsip-trigger-whatsapp-message',
165
197
  },
198
+ ENKASH: {
199
+ GENERATE_PAYMENT_LINK: 'GENERATE-PAYMENT-LINK',
200
+ INIT: 'PAYMENT-INITIATE',
201
+ },
166
202
  },
167
203
  };
@@ -10,6 +10,8 @@ export const BrokerMessages = {
10
10
  REPORTING_USER_DROPDOWN: 'REPORTING-USER-DROPDOWN',
11
11
  FIND_BY_ROLE_ID: 'FIND-USER-BY-ROLE-ID',
12
12
  MIGRATE_USER: 'MIGRATE-USER',
13
+ USER_CAMPAIGNS: 'LIST-USER-CAMPAIGNS',
14
+ MAP_USER_CAMPAIGN: 'ASSIGN-USER-CAMPAIGN',
13
15
  },
14
16
  ROLE: {
15
17
  CREATE: 'CREATE-ROLE',
@@ -48,7 +50,10 @@ export const BrokerMessages = {
48
50
  AVAILABILITY: 'campaign-availabilty',
49
51
  DELETE: 'delete-campaign',
50
52
  DROPDOWN: 'campaign-dropdown',
51
- USER_CAMPAIGNS: 'users-campaignS',
53
+ ASSIGNED_CAMPAIGNS: 'LIST-ASSIGNED-CAMPAIGNS-BY-USERID',
54
+ CREATE_CAMPAIGN_USER: 'CREATE-CAMPAIGN-USER',
55
+ DELETE_CAMPAIGN_USER: 'DELETE-CAMPAIGN-USER',
56
+ FIND_ALL_CAMPAIGN_USER: 'FIND_ALL-CAMPAIGN-USER',
52
57
  },
53
58
  DIALER: {
54
59
  LOGIN: 'dialer-login',
@@ -116,6 +121,34 @@ export const BrokerMessages = {
116
121
  STATES: 'OPTIONS-STATE',
117
122
  DISPOSITIONS: 'OPTIONS-DISPOSITIONS',
118
123
  },
124
+ BORROWER_DISPOSITION: {
125
+ CREATE: 'CREATE_DISPOSITION',
126
+ FINDALL: 'DISPOSITIONS-ALL',
127
+ FOLLOUPS: 'FOLLOUPS',
128
+
129
+ LATEST_DISPOSITIONS: 'LATEST_DISPOSITIONS',
130
+ UPDATE_INITIATED_CALL: 'UPDATE_INITIATED_CALL_DETAIL',
131
+ },
132
+ PAYMENT: {
133
+ ACCOUNT: {
134
+ CREATE: 'ACCOUNT-CREATE',
135
+ UPDATE: 'ACCOUNT-UPDATE',
136
+ FIND_ONE: 'ACCOUNT-FIND_ONE',
137
+ FIND_ALL: 'ACCOUNT-FIND_ALL',
138
+ DELETE: 'ACCOUNT-DELETE',
139
+ },
140
+ CODE: {
141
+ CREATE: 'CODE-CREATE',
142
+ UPDATE: 'CODE-UPDATE',
143
+ FIND_ONE: 'CODE-FIND_ONE',
144
+ FIND_ALL: 'CODE-FIND_ALL',
145
+ DELETE: 'CODE-DELETE',
146
+ },
147
+ CREATE: 'PAYMENT-CREATE',
148
+ UPDATE: 'PAYMENT-UPDATE',
149
+ FIND_ONE: 'PAYMENT-FIND_ONE',
150
+ FIND_ALL: 'PAYMENT-FIND_ALL',
151
+ },
119
152
  },
120
153
  CDR: {
121
154
  PROCESSCDR: 'PROCESS-CDR',
@@ -161,5 +194,9 @@ export const BrokerMessages = {
161
194
  WHATSAPP_REPORT: 'ezsip-whatsapp-report',
162
195
  TRIGGER_WHATSAPP_MESSAGE: 'ezsip-trigger-whatsapp-message',
163
196
  },
197
+ ENKASH: {
198
+ GENERATE_PAYMENT_LINK: 'GENERATE-PAYMENT-LINK',
199
+ INIT: 'PAYMENT-INITIATE',
200
+ },
164
201
  },
165
202
  };
@@ -154,7 +154,7 @@ export declare enum JobTypeEnum {
154
154
  export declare enum PorvidersType {
155
155
  ENKASH = "enkash"
156
156
  }
157
- export type Status = 'completed' | 'failed' | 'inprogress' | 'paused';
157
+ export type Status = 'completed' | 'failed' | 'inprogress' | 'paused' | 'waiting' | 'pending';
158
158
  export type loanRecordType = 'newLoans' | 'missingLoans' | 'existLoans' | 'loansId' | 'duplicateLoans';
159
159
  export declare const Constants: {
160
160
  JOB_STATUS: {
@@ -163,9 +163,13 @@ export declare const Constants: {
163
163
  INPROGRESS: Status;
164
164
  PAUSED: Status;
165
165
  WAITING: Status;
166
+ PENDING: Status;
166
167
  };
167
168
  PROVIDERS: {
168
169
  ENKASH: string;
170
+ BY_PAYMENT_LINK: string;
171
+ UPLOADED_BY_FILE: string;
172
+ DIRECT_FROM_SITE: string;
169
173
  };
170
174
  RECORD_TYPE: {
171
175
  newLoans: loanRecordType;
@@ -178,9 +178,13 @@ exports.Constants = {
178
178
  INPROGRESS: 'inprogress',
179
179
  PAUSED: 'paused',
180
180
  WAITING: 'waiting',
181
+ PENDING: 'pending',
181
182
  },
182
183
  PROVIDERS: {
183
- ENKASH: 'enkash',
184
+ ENKASH: 'ENKASH',
185
+ BY_PAYMENT_LINK: 'BY_PAYMENT_LINK',
186
+ UPLOADED_BY_FILE: 'UPLOADED_BY_FILE',
187
+ DIRECT_FROM_SITE: 'DIRECT_FROM_SITE'
184
188
  },
185
189
  RECORD_TYPE: {
186
190
  newLoans: 'newLoans',
@@ -170,7 +170,13 @@ export enum PorvidersType {
170
170
  ENKASH = 'enkash',
171
171
  }
172
172
 
173
- export type Status = 'completed' | 'failed' | 'inprogress' | 'paused';
173
+ export type Status =
174
+ | 'completed'
175
+ | 'failed'
176
+ | 'inprogress'
177
+ | 'paused'
178
+ | 'waiting'
179
+ | 'pending';
174
180
 
175
181
  export type loanRecordType =
176
182
  | 'newLoans'
@@ -186,9 +192,13 @@ export const Constants = {
186
192
  INPROGRESS: 'inprogress' as Status,
187
193
  PAUSED: 'paused' as Status,
188
194
  WAITING: 'waiting' as Status,
195
+ PENDING: 'pending' as Status,
189
196
  },
190
197
  PROVIDERS: {
191
- ENKASH: 'enkash',
198
+ ENKASH: 'ENKASH',
199
+ BY_PAYMENT_LINK: 'BY_PAYMENT_LINK',
200
+ UPLOADED_BY_FILE: 'UPLOADED_BY_FILE',
201
+ DIRECT_FROM_SITE: 'DIRECT_FROM_SITE'
192
202
  },
193
203
  RECORD_TYPE: {
194
204
  newLoans: 'newLoans' as loanRecordType,
@@ -1,6 +1,6 @@
1
1
  export interface DatabaseObject extends ObjectKeys {
2
2
  id?: number;
3
- uid?: string;
3
+ uId?: string;
4
4
  createdBy?: number;
5
5
  updatedBy?: number;
6
6
  createdAt?: Date;
@@ -1,6 +1,6 @@
1
1
  export interface DatabaseObject extends ObjectKeys {
2
2
  id?: number;
3
- uid?: string;
3
+ uId?: string;
4
4
  createdBy?: number;
5
5
  updatedBy?: number;
6
6
  createdAt?: Date;
@@ -36,6 +36,7 @@ export interface IBorrowers extends DatabaseObject {
36
36
  }
37
37
  export interface ICorrectCSVData {
38
38
  clientBorrowerId: string;
39
+ paymentAccountId: string;
39
40
  name: string;
40
41
  fatherName: string;
41
42
  motherName: string;
@@ -38,6 +38,7 @@ export interface IBorrowers extends DatabaseObject {
38
38
 
39
39
  export interface ICorrectCSVData {
40
40
  clientBorrowerId: string;
41
+ paymentAccountId: string;
41
42
  name: string;
42
43
  fatherName: string;
43
44
  motherName: string;
@@ -44,6 +44,7 @@ export * from './portfoliosTarget';
44
44
  export * from './reassignment';
45
45
  export * from './paymentAccounts';
46
46
  export * from './cdr';
47
+ export * from './paymentLinks';
47
48
  import { ConnectionOptions, Dialect, ReplicationOptions } from 'sequelize/types';
48
49
  export interface DBConnection extends ConnectionOptions {
49
50
  host: string;
@@ -47,3 +47,4 @@ tslib_1.__exportStar(require("./portfoliosTarget"), exports);
47
47
  tslib_1.__exportStar(require("./reassignment"), exports);
48
48
  tslib_1.__exportStar(require("./paymentAccounts"), exports);
49
49
  tslib_1.__exportStar(require("./cdr"), exports);
50
+ tslib_1.__exportStar(require("./paymentLinks"), exports);
@@ -44,7 +44,7 @@ export * from './portfoliosTarget';
44
44
  export * from './reassignment';
45
45
  export * from './paymentAccounts'
46
46
  export * from './cdr'
47
-
47
+ export * from './paymentLinks'
48
48
  import {
49
49
  ConnectionOptions,
50
50
  Dialect,
@@ -1,4 +1,4 @@
1
- import { JobTypeEnum } from '../../constants';
1
+ import { Constants, JobTypeEnum } from '../../constants';
2
2
  import { DatabaseObject } from '../baseObject';
3
3
  export interface ResponseBase {
4
4
  success: boolean;
@@ -23,7 +23,7 @@ export interface IJob extends DatabaseObject {
23
23
  insertedCount?: number;
24
24
  lastInsertedIndex?: number;
25
25
  progressPercentage?: number;
26
- status?: 'waiting' | 'pending' | 'completed' | 'failed' | 'inprogress' | 'paused';
26
+ status?: (typeof Constants.JOB_STATUS)[keyof typeof Constants.JOB_STATUS];
27
27
  errorMsg?: string;
28
28
  errorFileKey?: string;
29
29
  fileKey: string;
@@ -1,4 +1,4 @@
1
- import { JobTypeEnum } from '../../constants';
1
+ import { Constants, JobTypeEnum } from '../../constants';
2
2
  import { DatabaseObject } from '../baseObject';
3
3
 
4
4
  export interface ResponseBase {
@@ -27,13 +27,7 @@ export interface IJob extends DatabaseObject {
27
27
  insertedCount?: number;
28
28
  lastInsertedIndex?: number;
29
29
  progressPercentage?: number;
30
- status?:
31
- | 'waiting'
32
- | 'pending'
33
- | 'completed'
34
- | 'failed'
35
- | 'inprogress'
36
- | 'paused';
30
+ status?: (typeof Constants.JOB_STATUS)[keyof typeof Constants.JOB_STATUS];
37
31
  errorMsg?: string;
38
32
  errorFileKey?: string;
39
33
  fileKey: string;
@@ -52,4 +52,6 @@ export interface ILoans extends DatabaseObject {
52
52
  assignedUser?: number;
53
53
  deactivated?: boolean;
54
54
  groupId?: string;
55
+ paymentAccountId?: number;
56
+ campaignId?: number;
55
57
  }
@@ -53,4 +53,6 @@ export interface ILoans extends DatabaseObject {
53
53
  assignedUser?: number;
54
54
  deactivated?: boolean;
55
55
  groupId?: string;
56
+ paymentAccountId?: number;
57
+ campaignId?: number;
56
58
  }
@@ -1,8 +1,24 @@
1
1
  import { DatabaseObject } from '../baseObject';
2
+ import { IListPayload } from '../payload';
2
3
  export interface IPaymentAccounts extends DatabaseObject {
3
4
  clientId: number;
4
5
  provider: string;
5
6
  name: string;
6
7
  config: JSON;
7
- isActive: boolean;
8
+ isActive?: boolean;
9
+ }
10
+ export interface IPaymentAccountsCreate extends DatabaseObject {
11
+ clientId?: number;
12
+ clientUid: string;
13
+ provider: string;
14
+ name: string;
15
+ config: {
16
+ merchantId: string;
17
+ accessKey: string;
18
+ secretKey: string;
19
+ };
20
+ }
21
+ export interface IPaymentAccountsList extends IListPayload {
22
+ clientUid: string;
23
+ clientId?: number;
8
24
  }
@@ -1,9 +1,27 @@
1
1
  import { DatabaseObject } from '../baseObject';
2
+ import { IListPayload } from '../payload';
2
3
 
3
4
  export interface IPaymentAccounts extends DatabaseObject {
4
5
  clientId: number;
5
6
  provider: string;
6
7
  name: string;
7
8
  config: JSON;
8
- isActive: boolean;
9
+ isActive?: boolean;
9
10
  }
11
+
12
+ export interface IPaymentAccountsCreate extends DatabaseObject {
13
+ clientId?: number;
14
+ clientUid: string;
15
+ provider: string;
16
+ name: string;
17
+ config: {
18
+ merchantId: string;
19
+ accessKey: string;
20
+ secretKey: string;
21
+ }
22
+ }
23
+
24
+ export interface IPaymentAccountsList extends IListPayload{
25
+ clientUid: string;
26
+ clientId?: number;
27
+ }
@@ -0,0 +1,9 @@
1
+ import { DatabaseObject } from '../baseObject';
2
+ export interface IPaymentLinks extends DatabaseObject {
3
+ loanUid: string;
4
+ loanId?: number;
5
+ paymentAccountId: number;
6
+ code?: string;
7
+ amount: number;
8
+ expiredAt: Date;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { DatabaseObject } from '../baseObject';
2
+
3
+ export interface IPaymentLinks extends DatabaseObject {
4
+ loanUid: string;
5
+ loanId?: number;
6
+ paymentAccountId: number;
7
+ code?: string;
8
+ amount: number;
9
+ expiredAt: Date;
10
+ }
@@ -1,34 +1,34 @@
1
- import { DatabaseObject } from '../baseObject';
2
1
  import { IJob } from '../jobs';
3
- export interface IPayments extends DatabaseObject {
4
- borrowerId: number;
5
- clientName?: string;
6
- loanNumber: string;
7
- transactionId?: string;
8
- phone?: string;
9
- email?: string;
2
+ export interface IPayments {
3
+ id?: number;
4
+ uId?: string;
5
+ source: string;
6
+ loanId: number;
7
+ paymentLinkId?: number;
8
+ paymentAccountId?: number;
10
9
  amount: number;
11
- paymentDate: Date;
12
- paymentSource?: string;
13
- paymentType?: string;
14
- paymentStatus?: string;
15
- status?: string;
16
- note?: string;
17
- }
18
- export interface IPaymentCorrectCSVData extends DatabaseObject {
19
- borrowerId: number;
20
- clientName: string;
21
- loanNumber: string;
10
+ status: string;
11
+ fileId?: number;
12
+ transactionId?: string;
13
+ extraInfo?: JSON;
14
+ paymentDate?: Date;
15
+ }
16
+ export interface IPaymentUpdatePaymentRes {
17
+ status: string;
22
18
  transactionId: string;
23
- phone?: string;
24
- email?: string;
19
+ extraInfo: JSON;
20
+ }
21
+ export interface IPaymentCorrectCSVData {
22
+ source: string;
23
+ loanNumber: string;
24
+ paymentLinkId?: number;
25
+ paymentAccountId?: number;
25
26
  amount: number;
26
- paymentDate: Date;
27
- paymentSource?: string;
28
- paymentType?: string;
29
- paymentStatus?: string;
30
- status?: string;
31
- note?: string;
27
+ status: string;
28
+ fileId?: number;
29
+ transactionId?: string;
30
+ extraInfo?: JSON;
31
+ paymentDate?: Date;
32
32
  }
33
33
  export interface IIncorrectPaymentCSVData extends IPaymentCorrectCSVData {
34
34
  errors: string;
@@ -40,3 +40,56 @@ export interface IPaymentValidRecordsParams {
40
40
  currentJob: IJob;
41
41
  clientId: number;
42
42
  }
43
+ export interface IPaymentAccountConfig {
44
+ merchantId: string;
45
+ accessKey: string;
46
+ secretKey: string;
47
+ }
48
+ export interface IEnkashInitPayment {
49
+ orderId: string;
50
+ amount: {
51
+ value: number;
52
+ currency: string;
53
+ };
54
+ returnUrl?: string;
55
+ notifyUrl?: string;
56
+ customerInfo?: {
57
+ firstName?: string;
58
+ lastName?: string;
59
+ address?: {
60
+ streetName?: string;
61
+ city?: string;
62
+ state?: string;
63
+ country?: string;
64
+ zipcode?: string;
65
+ };
66
+ email?: string;
67
+ phoneNumber?: string;
68
+ };
69
+ customParameters?: {
70
+ property1?: string;
71
+ property2?: string;
72
+ };
73
+ description?: string;
74
+ paymentDetail?: {
75
+ accountNumber?: string;
76
+ ifsc?: string;
77
+ };
78
+ }
79
+ export interface IEnkashInitPaymentResPayload {
80
+ payload: {
81
+ redirectionUrl: string;
82
+ orderId: string;
83
+ };
84
+ }
85
+ export interface IEnkashInitPaymentResponse {
86
+ response_code: number;
87
+ response_message: string;
88
+ payload: IEnkashInitPaymentResPayload;
89
+ }
90
+ export interface IEnkashAuthResponse {
91
+ token: string;
92
+ expiry: number;
93
+ resultCode: number;
94
+ resultMessage: string;
95
+ }