@stashfin/mysql2 1.2.3 → 1.2.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.
@@ -24,12 +24,13 @@ export interface CustomerTable {
24
24
  email_verified?: number | null;
25
25
  ip?: string | null;
26
26
  device_id?: string | null;
27
+ is_registered?: number | null;
27
28
  os_version?: string | null;
28
29
  push_id?: string | null;
29
30
  auth_token?: string | null;
30
31
  app_version?: string | null;
31
32
  biometric_enabled?: number | null;
32
- journey_step?: number | null;
33
+ journey_sequence?: number | null;
33
34
  category?: string | null;
34
35
  loc_limit?: number | null;
35
36
  /** Defaults to: active. */
@@ -14,9 +14,10 @@ export interface JourneySteps {
14
14
  category: string;
15
15
  step: string;
16
16
  data: JSONValue;
17
+ sequence?: number | null;
18
+ fields?: string | null;
17
19
  /** Defaults to: CURRENT_TIMESTAMP. */
18
20
  created_at?: Date | null;
19
- /** Defaults to: CURRENT_TIMESTAMP. */
20
21
  updated_at?: Date | null;
21
22
  }
22
23
  export interface JourneyStepsModel extends JourneySteps, RowDataPacket {
@@ -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: number | 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: number | null;
20
+ daily_roi: number | null;
21
+ /** Defaults to: processing_fee. */
22
+ disbursal_mode?: 'JSON' | 'spdc' | 'processing_fee' | 'discount' | 'apr' | null;
23
+ /** Defaults to: active. */
24
+ status?: 'active' | 'inactive' | null;
25
+ source: string | null;
26
+ ip?: string | null;
27
+ approval_date: Date | null;
28
+ disbursal_date: Date | 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 });
@@ -0,0 +1,51 @@
1
+ import { RowDataPacket } from "mysql2";
2
+ interface Rule {
3
+ key: string;
4
+ value: string | number;
5
+ operator: string;
6
+ }
7
+ interface Rules {
8
+ data: Rule[];
9
+ }
10
+ interface MetaData {
11
+ icon: string;
12
+ title: string;
13
+ eligibilityCriteria: string;
14
+ steps: string[];
15
+ }
16
+ interface Stat {
17
+ count: number;
18
+ total: number;
19
+ }
20
+ export interface OfferTable {
21
+ id: number;
22
+ title: string;
23
+ reward_type: string;
24
+ amount: number;
25
+ sc_type: string;
26
+ discount_type: string;
27
+ max_value: number;
28
+ rpu: number;
29
+ budget: number;
30
+ icon: string;
31
+ event_name: string;
32
+ event_sub_type: string;
33
+ description: string;
34
+ redirect_url: string;
35
+ offer_type: string;
36
+ start_required: boolean;
37
+ is_active: boolean;
38
+ deleted: boolean;
39
+ csv_segment: number;
40
+ sc_expiry: Date;
41
+ expiry: Date;
42
+ rules: Rules;
43
+ metaData: MetaData;
44
+ stats: Stat;
45
+ created_at: Date;
46
+ updated_at: Date;
47
+ created_by: string;
48
+ }
49
+ export interface OfferModel extends OfferTable, RowDataPacket {
50
+ }
51
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,29 +2,33 @@ import { RowDataPacket } from 'mysql2';
2
2
  export interface StashCashTable {
3
3
  id?: number;
4
4
  customer_id: number;
5
+ /** Defaults to: 0 */
5
6
  locked: number;
6
7
  unlocked: number;
7
- created_at: Date;
8
- updated_at: Date;
9
- is_active: boolean;
10
- is_deleted: boolean;
8
+ /** Defaults to: CURRENT_TIMESTAMP. */
9
+ created_at?: Date | null;
10
+ updated_at?: Date | null;
11
+ user_guide?: boolean;
12
+ is_active?: boolean;
13
+ is_deleted?: boolean;
11
14
  }
12
15
  export interface StashCashTrascationTable {
13
16
  id?: number;
14
- customer_id: number;
15
- campaign_id: number;
16
- txn_id: number;
17
+ customer_id?: number;
18
+ campaign_id?: number;
19
+ txn_id: string;
17
20
  sc_type: string;
18
- amount: number;
19
- balance: number;
21
+ amount?: number;
20
22
  remaining: number;
21
- txn_type: string;
22
- status: string;
23
- expiry: Date;
24
- created_at: Date;
25
- updated_at: Date;
26
- is_active: boolean;
27
- is_deleted: boolean;
23
+ txn_type: 'debit' | 'credit' | 'expired' | 'reversal';
24
+ /** Defaults to: active. */
25
+ status?: 'active' | 'inactive';
26
+ expiry?: Date | null;
27
+ /** Defaults to: CURRENT_TIMESTAMP. */
28
+ created_at?: Date | null;
29
+ updated_at?: Date | null;
30
+ is_active?: boolean;
31
+ is_deleted?: boolean;
28
32
  }
29
33
  export interface StashCashModel extends StashCashTable, RowDataPacket {
30
34
  }
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@stashfin/mysql2",
3
- "version": "1.2.3",
3
+ "version": "1.2.6",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "tsc --build",
9
+ "build:ws": "tsc --build && copy package.json dist/",
9
10
  "postbuild": "cp package.json dist/ ",
10
11
  "publish:patch": "npm version patch && npm run build && cd dist && npm publish --access public",
11
12
  "publish:minor": "npm version minor && npm run build && cd dist && npm publish --access public"
@@ -15,5 +16,8 @@
15
16
  "license": "ISC",
16
17
  "dependencies": {
17
18
  "mysql2": "^3.9.9"
19
+ },
20
+ "devDependencies": {
21
+ "cpy-cli": "^5.0.0"
18
22
  }
19
23
  }