@stashfin/mysql2 1.4.12 → 1.4.14

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.
@@ -0,0 +1,17 @@
1
+ import mysql, { RowDataPacket, PoolOptions, ResultSetHeader } from 'mysql2/promise';
2
+ export interface MysqlConnectorOptions extends PoolOptions {
3
+ }
4
+ export declare class MysqlConnector {
5
+ private pool;
6
+ private credentials;
7
+ constructor(credentials: PoolOptions);
8
+ /** A random method to simulate a step before to get the class methods */
9
+ getConnection(): Promise<mysql.PoolConnection>;
10
+ queryRow<T extends RowDataPacket>(sql: string, values?: Array<string | number>): Promise<T | undefined>;
11
+ queryRows<T extends RowDataPacket>(sql: string, values?: Array<string | number>): Promise<T[]>;
12
+ queryArray<T extends RowDataPacket>(sql: string, values?: Array<string | number>): Promise<T[]>;
13
+ executeResult(sql: string, values?: unknown[]): Promise<ResultSetHeader>;
14
+ insertData(tableName: string, data: Record<string, string | number>): Promise<ResultSetHeader>;
15
+ updateData(tableName: string, data: Record<string, any>, condition: string, conditionValues?: Array<string | number>): Promise<ResultSetHeader>;
16
+ close(): Promise<void>;
17
+ }
@@ -0,0 +1,73 @@
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.MysqlConnector = void 0;
7
+ const promise_1 = __importDefault(require("mysql2/promise"));
8
+ //define class
9
+ class MysqlConnector {
10
+ pool;
11
+ credentials;
12
+ constructor(credentials) {
13
+ this.credentials = credentials;
14
+ this.pool = promise_1.default.createPool(this.credentials);
15
+ }
16
+ /** A random method to simulate a step before to get the class methods */
17
+ getConnection() {
18
+ if (!this?.pool)
19
+ this.pool = promise_1.default.createPool(this.credentials);
20
+ return this.pool.getConnection();
21
+ }
22
+ async queryRow(sql, values) {
23
+ const connection = await this.getConnection();
24
+ const [rows] = await connection.query(sql, values);
25
+ await connection.release();
26
+ return rows[0] || undefined;
27
+ }
28
+ async queryRows(sql, values) {
29
+ const connection = await this.getConnection();
30
+ const [rows] = await connection.query(sql, values);
31
+ await connection.release();
32
+ return rows;
33
+ }
34
+ async queryArray(sql, values) {
35
+ const connection = await this.getConnection();
36
+ const [rows] = await connection.query({
37
+ sql,
38
+ values,
39
+ rowsAsArray: true,
40
+ });
41
+ await connection.release();
42
+ return rows;
43
+ }
44
+ async executeResult(sql, values) {
45
+ const connection = await this.pool.getConnection();
46
+ const [rows] = await connection.query(sql, values);
47
+ await connection.release();
48
+ return rows;
49
+ }
50
+ async insertData(tableName, data) {
51
+ const keys = Object.keys(data);
52
+ const values = Object.values(data);
53
+ const sql = `INSERT INTO ${tableName} (${keys.join(', ')}) VALUES (${keys
54
+ .map(() => '?')
55
+ .join(', ')})`;
56
+ return this.executeResult(sql, values);
57
+ }
58
+ async updateData(tableName,
59
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
60
+ data, condition, conditionValues) {
61
+ const keys = Object.keys(data);
62
+ const values = Object.values(data);
63
+ const sql = `UPDATE ${tableName} SET ${keys
64
+ .map((key) => `${key} = ?`)
65
+ .join(', ')} WHERE ${condition}`;
66
+ const finalValues = [...values, ...(conditionValues || [])];
67
+ return this.executeResult(sql, finalValues);
68
+ }
69
+ async close() {
70
+ await this.pool.end();
71
+ }
72
+ }
73
+ exports.MysqlConnector = MysqlConnector;
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import mysql, { RowDataPacket, PoolOptions, ResultSetHeader } from 'mysql2/promise';
1
+ import mysql, { RowDataPacket, PoolOptions, ResultSetHeader } from 'mysql2';
2
2
  export interface MysqlConnectorOptions extends PoolOptions {
3
3
  }
4
4
  export declare class MysqlConnector {
@@ -6,7 +6,8 @@ export declare class MysqlConnector {
6
6
  private credentials;
7
7
  constructor(credentials: PoolOptions);
8
8
  /** A random method to simulate a step before to get the class methods */
9
- getConnection(): Promise<mysql.PoolConnection>;
9
+ getPoolConnection(): mysql.Pool;
10
+ getConnection(): Promise<import("mysql2/promise").PoolConnection>;
10
11
  queryRow<T extends RowDataPacket>(sql: string, values?: Array<string | number>): Promise<T | undefined>;
11
12
  queryRows<T extends RowDataPacket>(sql: string, values?: Array<string | number>): Promise<T[]>;
12
13
  queryArray<T extends RowDataPacket>(sql: string, values?: Array<string | number>): Promise<T[]>;
package/index.js CHANGED
@@ -4,48 +4,73 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.MysqlConnector = void 0;
7
- const promise_1 = __importDefault(require("mysql2/promise"));
7
+ const mysql2_1 = __importDefault(require("mysql2"));
8
8
  //define class
9
9
  class MysqlConnector {
10
10
  pool;
11
11
  credentials;
12
12
  constructor(credentials) {
13
13
  this.credentials = credentials;
14
- this.pool = promise_1.default.createPool(this.credentials);
14
+ this.pool = mysql2_1.default.createPool(this.credentials);
15
15
  }
16
16
  /** A random method to simulate a step before to get the class methods */
17
+ getPoolConnection() {
18
+ if (!this?.pool)
19
+ this.pool = mysql2_1.default.createPool(this.credentials);
20
+ return this.pool;
21
+ }
17
22
  getConnection() {
18
23
  if (!this?.pool)
19
- this.pool = promise_1.default.createPool(this.credentials);
20
- return this.pool.getConnection();
24
+ this.pool = mysql2_1.default.createPool(this.credentials);
25
+ return this.pool.promise().getConnection();
21
26
  }
22
27
  async queryRow(sql, values) {
23
- const connection = await this.getConnection();
24
- const [rows] = await connection.query(sql, values);
25
- await connection.release();
26
- return rows[0] || undefined;
28
+ const pool = this.getPoolConnection();
29
+ return new Promise((resolve, reject) => {
30
+ pool.query(sql, values, function (err, results, fields) {
31
+ if (err)
32
+ reject(err);
33
+ // Connection is automatically released when query resolves
34
+ else
35
+ resolve(results[0] || undefined);
36
+ });
37
+ });
27
38
  }
28
39
  async queryRows(sql, values) {
29
- const connection = await this.getConnection();
30
- const [rows] = await connection.query(sql, values);
31
- await connection.release();
32
- return rows;
40
+ const pool = this.getPoolConnection();
41
+ return new Promise((resolve, reject) => {
42
+ pool.query(sql, values, function (err, results, fields) {
43
+ // Connection is automatically released when query resolves
44
+ if (err)
45
+ reject(err);
46
+ else
47
+ resolve(results);
48
+ });
49
+ });
33
50
  }
34
51
  async queryArray(sql, values) {
35
- const connection = await this.getConnection();
36
- const [rows] = await connection.query({
37
- sql,
38
- values,
39
- rowsAsArray: true,
52
+ const pool = this.getPoolConnection();
53
+ return new Promise((resolve, reject) => {
54
+ pool.query({ sql, values, rowsAsArray: true }, function (err, results, fields) {
55
+ // Connection is automatically released when query resolves
56
+ if (err)
57
+ reject(err);
58
+ else
59
+ resolve(results);
60
+ });
40
61
  });
41
- await connection.release();
42
- return rows;
43
62
  }
44
63
  async executeResult(sql, values) {
45
- const connection = await this.pool.getConnection();
46
- const [rows] = await connection.query(sql, values);
47
- await connection.release();
48
- return rows;
64
+ const pool = this.getPoolConnection();
65
+ return new Promise((resolve, reject) => {
66
+ pool.query(sql, values, function (err, results, fields) {
67
+ // Connection is automatically released when query resolves
68
+ if (err)
69
+ reject(err);
70
+ else
71
+ resolve(results || undefined);
72
+ });
73
+ });
49
74
  }
50
75
  async insertData(tableName, data) {
51
76
  const keys = Object.keys(data);
@@ -0,0 +1,17 @@
1
+ import mysql, { RowDataPacket, PoolOptions, ResultSetHeader } from 'mysql2/promise';
2
+ export interface MysqlConnectorOptions extends PoolOptions {
3
+ }
4
+ export declare class MysqlConnector {
5
+ private pool;
6
+ private credentials;
7
+ constructor(credentials: PoolOptions);
8
+ /** A random method to simulate a step before to get the class methods */
9
+ getConnection(): Promise<mysql.PoolConnection>;
10
+ queryRow<T extends RowDataPacket>(sql: string, values?: Array<string | number>): Promise<T | undefined>;
11
+ queryRows<T extends RowDataPacket>(sql: string, values?: Array<string | number>): Promise<T[]>;
12
+ queryArray<T extends RowDataPacket>(sql: string, values?: Array<string | number>): Promise<T[]>;
13
+ executeResult(sql: string, values?: unknown[]): Promise<ResultSetHeader>;
14
+ insertData(tableName: string, data: Record<string, string | number>): Promise<ResultSetHeader>;
15
+ updateData(tableName: string, data: Record<string, any>, condition: string, conditionValues?: Array<string | number>): Promise<ResultSetHeader>;
16
+ close(): Promise<void>;
17
+ }
@@ -0,0 +1,73 @@
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.MysqlConnector = void 0;
7
+ const promise_1 = __importDefault(require("mysql2/promise"));
8
+ //define class
9
+ class MysqlConnector {
10
+ pool;
11
+ credentials;
12
+ constructor(credentials) {
13
+ this.credentials = credentials;
14
+ this.pool = promise_1.default.createPool(this.credentials);
15
+ }
16
+ /** A random method to simulate a step before to get the class methods */
17
+ getConnection() {
18
+ if (!this?.pool)
19
+ this.pool = promise_1.default.createPool(this.credentials);
20
+ return this.pool.getConnection();
21
+ }
22
+ async queryRow(sql, values) {
23
+ const connection = await this.getConnection();
24
+ const [rows] = await connection.query(sql, values);
25
+ await connection.release();
26
+ return rows[0] || undefined;
27
+ }
28
+ async queryRows(sql, values) {
29
+ const connection = await this.getConnection();
30
+ const [rows] = await connection.query(sql, values);
31
+ await connection.release();
32
+ return rows;
33
+ }
34
+ async queryArray(sql, values) {
35
+ const connection = await this.getConnection();
36
+ const [rows] = await connection.query({
37
+ sql,
38
+ values,
39
+ rowsAsArray: true,
40
+ });
41
+ await connection.release();
42
+ return rows;
43
+ }
44
+ async executeResult(sql, values) {
45
+ const connection = await this.pool.getConnection();
46
+ const [rows] = await connection.query(sql, values);
47
+ await connection.release();
48
+ return rows;
49
+ }
50
+ async insertData(tableName, data) {
51
+ const keys = Object.keys(data);
52
+ const values = Object.values(data);
53
+ const sql = `INSERT INTO ${tableName} (${keys.join(', ')}) VALUES (${keys
54
+ .map(() => '?')
55
+ .join(', ')})`;
56
+ return this.executeResult(sql, values);
57
+ }
58
+ async updateData(tableName,
59
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
60
+ data, condition, conditionValues) {
61
+ const keys = Object.keys(data);
62
+ const values = Object.values(data);
63
+ const sql = `UPDATE ${tableName} SET ${keys
64
+ .map((key) => `${key} = ?`)
65
+ .join(', ')} WHERE ${condition}`;
66
+ const finalValues = [...values, ...(conditionValues || [])];
67
+ return this.executeResult(sql, finalValues);
68
+ }
69
+ async close() {
70
+ await this.pool.end();
71
+ }
72
+ }
73
+ exports.MysqlConnector = MysqlConnector;
@@ -0,0 +1,23 @@
1
+ import { RowDataPacket } from 'mysql2';
2
+ export type JSONPrimitive = string | number | boolean | null;
3
+ export type JSONValue = JSONObject | JSONArray;
4
+ export type JSONObject = {
5
+ [member: string]: JSONPrimitive;
6
+ };
7
+ export type JSONArray = Array<JSONValue>;
8
+ export interface BBPSProvidersTable {
9
+ id: number;
10
+ name: string;
11
+ logo: string;
12
+ state: string;
13
+ data: JSONValue;
14
+ utilityid: number;
15
+ vendorid: number;
16
+ billerid: string;
17
+ created_at: Date;
18
+ updated_at: Date;
19
+ is_active: number;
20
+ is_deleted: number;
21
+ }
22
+ export interface BBPSProvidersModel extends BBPSProvidersTable, RowDataPacket {
23
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,26 @@
1
+ import { RowDataPacket } from 'mysql2';
2
+ export interface BBPSTransactionsTable {
3
+ id: number;
4
+ customerid: number;
5
+ utilityid: number;
6
+ providerid: number;
7
+ account: string;
8
+ billamount: number;
9
+ amount: number;
10
+ discount: number;
11
+ promo: string;
12
+ duedate: Date;
13
+ status: string;
14
+ mode: string;
15
+ paymentid: string;
16
+ txnid: string;
17
+ attempted_at: Date;
18
+ paid_at: Date;
19
+ processed_at: Date;
20
+ created_at: Date;
21
+ updated_at: Date;
22
+ is_active: number;
23
+ is_deleted: number;
24
+ }
25
+ export interface BBPSTransactionsModel extends BBPSTransactionsTable, RowDataPacket {
26
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import { RowDataPacket } from 'mysql2';
2
+ export interface BBPSUtilitiesTable {
3
+ id: number;
4
+ name: string;
5
+ logo: string;
6
+ vendorid: number;
7
+ created_at: Date;
8
+ updated_at: Date;
9
+ is_active: number;
10
+ is_deleted: number;
11
+ }
12
+ export interface BBPSUtilitiesModel extends BBPSUtilitiesTable, RowDataPacket {
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { RowDataPacket } from 'mysql2';
2
+ export interface BBPSVendorsTable {
3
+ id: number;
4
+ name: string;
5
+ created_at: Date;
6
+ updated_at: Date;
7
+ is_active: number;
8
+ is_deleted: number;
9
+ }
10
+ export interface BBPSVendorsModel extends BBPSVendorsTable, RowDataPacket {
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ import { RowDataPacket } from 'mysql2';
2
+ export type JSONPrimitive = string | number | boolean | null;
3
+ export type JSONValue = JSONObject | JSONArray;
4
+ export type JSONObject = {
5
+ [member: string]: JSONPrimitive;
6
+ };
7
+ export type JSONArray = Array<JSONValue>;
8
+ export interface BannerTable {
9
+ id: number;
10
+ name: string;
11
+ image_url: string;
12
+ web_url?: string | null;
13
+ landing_page?: string | null;
14
+ api_mode?: string | null;
15
+ app_version: number;
16
+ status: string;
17
+ created_at: Date;
18
+ updated_at: Date;
19
+ }
20
+ export interface BannerModel extends BannerTable, RowDataPacket {
21
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -16,6 +16,7 @@ export interface CustomerTable {
16
16
  mother_maiden_name?: string | null;
17
17
  dob?: Date | null;
18
18
  company_name?: string | null;
19
+ official_email?: string | null;
19
20
  pincode?: string | null;
20
21
  mpin?: string | null;
21
22
  pan?: string | null;
@@ -24,6 +25,9 @@ export interface CustomerTable {
24
25
  email_verified?: number | null;
25
26
  ip?: string | null;
26
27
  device_id?: string | null;
28
+ is_registered?: number | null;
29
+ mobile_hash?: string | null;
30
+ email_hash?: string | null;
27
31
  os_version?: string | null;
28
32
  push_id?: string | null;
29
33
  auth_token?: string | null;
@@ -37,7 +41,17 @@ export interface CustomerTable {
37
41
  source?: string | null;
38
42
  tnc_version?: string | null;
39
43
  login_date?: Date | null;
44
+ min_tenure?: number | null;
45
+ max_tenure?: number | null;
46
+ roi?: number | null;
47
+ processing_rate?: number | null;
40
48
  agent_id?: number | null;
49
+ /** Defaults to: new */
50
+ application_type?: string | null;
51
+ /** Defaults to: incomplete */
52
+ application_status?: string | null;
53
+ /** Defaults to: organic */
54
+ customer_type?: string | null;
41
55
  /** Defaults to: CURRENT_TIMESTAMP. */
42
56
  created_at?: Date | null;
43
57
  /** Defaults to: CURRENT_TIMESTAMP. */
@@ -0,0 +1,30 @@
1
+ import { RowDataPacket } from 'mysql2';
2
+ export type JSONPrimitive = string | number | boolean | null;
3
+ export type JSONValue = JSONObject | JSONArray;
4
+ export type JSONObject = {
5
+ [member: string]: JSONPrimitive;
6
+ };
7
+ export type JSONArray = Array<JSONValue>;
8
+ export interface DashboardBlock {
9
+ block_name: string;
10
+ block_title: string;
11
+ block_code: string;
12
+ text: string;
13
+ image_url: string;
14
+ video_url?: string;
15
+ video_length?: number;
16
+ action_url?: string;
17
+ landing_page?: string;
18
+ api_mode?: string;
19
+ app_version: string;
20
+ old_customers: boolean;
21
+ is_new?: boolean;
22
+ action_type?: string;
23
+ color1?: string;
24
+ color2?: string;
25
+ image_trailing?: string;
26
+ tag?: JSONValue;
27
+ overlay_image?: string;
28
+ }
29
+ export interface DashboardBlockModel extends DashboardBlock, RowDataPacket {
30
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,36 @@
1
+ import { RowDataPacket } from 'mysql2';
2
+ export type JSONPrimitive = string | number | boolean | null;
3
+ export type JSONValue = JSONObject | JSONArray;
4
+ export type JSONObject = {
5
+ [member: string]: JSONPrimitive;
6
+ };
7
+ export type JSONArray = Array<JSONValue>;
8
+ export interface InstallmentsTable {
9
+ id?: number | null;
10
+ customer_id: number | null;
11
+ loan_id?: number | null;
12
+ seq_no: number | null;
13
+ amount?: number | null;
14
+ principal?: number | null;
15
+ interest?: number | null;
16
+ penalty?: number | null;
17
+ r_principal?: number | null;
18
+ r_interest?: number | null;
19
+ r_penalty?: number | null;
20
+ r_pif_principal?: number | null;
21
+ r_pif_interest?: number | null;
22
+ r_pif_penalty?: number | null;
23
+ status?: 'active' | 'closed' | 'delayed' | 'paid' | 'future' | null;
24
+ dpd?: number | null;
25
+ due_date?: Date | null;
26
+ discount?: number | null;
27
+ starting_balance?: number | null;
28
+ ending_balance?: number | null;
29
+ closed_at?: Date | null;
30
+ created_at?: Date | null;
31
+ updated_at?: Date | null;
32
+ is_active?: number | null;
33
+ is_deleted?: number | null;
34
+ }
35
+ export interface InstallmentsModel extends InstallmentsTable, RowDataPacket {
36
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,43 @@
1
+ import { RowDataPacket } from 'mysql2';
2
+ export type JSONPrimitive = string | number | boolean | null;
3
+ export type JSONValue = JSONObject | JSONArray;
4
+ export type JSONObject = {
5
+ [member: string]: JSONPrimitive;
6
+ };
7
+ export type JSONArray = Array<JSONValue>;
8
+ export interface LoansTable {
9
+ id?: number | null;
10
+ customer_id: number | null;
11
+ category?: string | null;
12
+ ref_id: string | null;
13
+ amount?: number | null;
14
+ disbursal_amount?: number | null;
15
+ bill_amount?: number | null;
16
+ bill_date?: Date | null;
17
+ roi?: number | null;
18
+ tenure: number | null;
19
+ fees?: JSONValue;
20
+ daily_roi?: string | null;
21
+ /** Defaults to: processing_fee. */
22
+ disbursal_mode?: 'IMPS' | 'NEFT' | null;
23
+ /** Defaults to: active. */
24
+ status?: 'pending' | 'active' | 'close' | 'restructured' | 'rejected' | 'approved' | 'cancelled' | null;
25
+ source?: 'app' | 'thirdparty' | null;
26
+ ip?: string | null;
27
+ approval_date?: Date | null;
28
+ disbursal_date?: string | null;
29
+ closure_date?: Date | null;
30
+ is_auto_processing?: number | null;
31
+ remarks?: string | null;
32
+ restructure_id?: number | null;
33
+ emi_start_date?: Date | null;
34
+ created_at?: Date | null;
35
+ /** Defaults to: CURRENT_TIMESTAMP. */
36
+ updated_at?: Date | null;
37
+ /** Defaults to: 1. */
38
+ is_active?: number | null;
39
+ /** Defaults to: 0. */
40
+ is_deleted?: number | null;
41
+ }
42
+ export interface LoansModel extends LoansTable, RowDataPacket {
43
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -16,14 +16,18 @@ export interface StashCashTrascationTable {
16
16
  id?: number;
17
17
  customer_id?: number;
18
18
  campaign_id?: number;
19
+ campaign_name: string;
19
20
  txn_id: string;
20
21
  sc_type: string;
21
- amount?: number;
22
+ amount: number;
23
+ locked: number;
24
+ unlocked: number;
22
25
  remaining: number;
23
- txn_type: 'debit' | 'credit' | 'expired' | 'reversal';
24
- /** Defaults to: active. */
25
- status?: 'active' | 'inactive';
26
+ txn_type: 'debit' | 'credit';
27
+ sub_type: 'rewarded' | 'paid' | 'expired' | 'reversed' | 'transferred';
28
+ status?: 'pending' | 'success' | 'failure';
26
29
  expiry?: Date | null;
30
+ is_expired: boolean;
27
31
  /** Defaults to: CURRENT_TIMESTAMP. */
28
32
  created_at?: Date | null;
29
33
  updated_at?: Date | null;
@@ -7,5 +7,5 @@ export interface UserAuthTokenTable {
7
7
  published: number;
8
8
  device_id: string;
9
9
  }
10
- export interface UserAuthTokenModel extends UserAuthTokenTable, RowDataPacket {
10
+ export interface UserAuthTokenModel extends RowDataPacket {
11
11
  }
@@ -1,8 +1,8 @@
1
1
  import { RowDataPacket } from 'mysql2';
2
2
  export interface UserKYCBankTable {
3
3
  customer_id: number;
4
- account_no: string;
5
- ifsc_code: string;
4
+ account_no: number;
5
+ ifsc_code: number;
6
6
  }
7
- export interface UserKYCBankModel extends UserKYCBankTable, RowDataPacket {
7
+ export interface UserKYCBankModel extends RowDataPacket {
8
8
  }
@@ -1,17 +1,14 @@
1
1
  import { RowDataPacket } from 'mysql2';
2
2
  export interface KYCPanTable {
3
- pan_number: string;
4
- father_name: string;
5
- dob: string;
6
- first_name: string;
7
- middle_name: string;
8
- last_name: string;
3
+ pan_numeber: number;
4
+ customer_id: number;
5
+ is_active: number;
9
6
  }
10
7
  export interface KYCPanFileTable {
11
8
  pan_proof: string;
12
9
  user_id: number;
13
10
  }
14
- export interface KYCPanModel extends KYCPanTable, RowDataPacket {
11
+ export interface KYCPanModel extends RowDataPacket {
15
12
  }
16
- export interface KYCPanFileModel extends KYCPanFileTable, RowDataPacket {
13
+ export interface KYCPanFileModel extends RowDataPacket {
17
14
  }
@@ -1,16 +1,11 @@
1
1
  import { RowDataPacket } from 'mysql2';
2
2
  export interface WealthUserTable {
3
3
  customer_id: number;
4
- first_name: string;
5
- last_name: string;
6
- email: string;
7
- phone: string;
8
4
  user_external_id: string;
9
5
  gateway_id: string;
10
6
  grip_user_auth_token?: string;
11
7
  grip_user_auth_token_expiry?: number;
12
8
  grip_user_consent?: string;
13
- grip_user_kyc_status?: string;
14
9
  created_at?: Date;
15
10
  updated_at?: Date;
16
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stashfin/mysql2",
3
- "version": "1.4.12",
3
+ "version": "1.4.14",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",