@stashfin/mysql2 1.4.635 → 1.4.637
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,27 @@
|
|
|
1
|
+
import { RowDataPacket } from "mysql2";
|
|
2
|
+
export interface MessageTemplateTable {
|
|
3
|
+
id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
channel: string;
|
|
7
|
+
template_type: string;
|
|
8
|
+
email_template_type?: string;
|
|
9
|
+
department?: string;
|
|
10
|
+
subject?: string;
|
|
11
|
+
body: string;
|
|
12
|
+
dlt_template_id?: number;
|
|
13
|
+
unicode: number;
|
|
14
|
+
redirect_url?: string;
|
|
15
|
+
link_tracking: 0 | 1;
|
|
16
|
+
skip_exception?: number;
|
|
17
|
+
utm_source?: string;
|
|
18
|
+
create_date?: Date;
|
|
19
|
+
update_date?: Date;
|
|
20
|
+
created_by?: string;
|
|
21
|
+
updated_by?: string;
|
|
22
|
+
skip_blocked_utm: 0 | 1;
|
|
23
|
+
sender_name?: string;
|
|
24
|
+
vendor?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface MessageTemplateModel extends MessageTemplateTable, RowDataPacket {
|
|
27
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { RowDataPacket } from 'mysql2';
|
|
2
|
+
export declare enum RewardType {
|
|
3
|
+
STASHCASH = "stashcash",
|
|
4
|
+
GOLD = "gold"
|
|
5
|
+
}
|
|
6
|
+
export declare enum RewardNature {
|
|
7
|
+
FIXED = "fixed",
|
|
8
|
+
RANDOM = "random",
|
|
9
|
+
PERC = "perc"
|
|
10
|
+
}
|
|
11
|
+
export declare enum EntryType {
|
|
12
|
+
CREDIT = "credit",
|
|
13
|
+
DEBIT = "debit"
|
|
14
|
+
}
|
|
15
|
+
export declare enum EventType {
|
|
16
|
+
EARN = "earn",
|
|
17
|
+
REDEEM = "redeem",
|
|
18
|
+
CONVERT = "convert",
|
|
19
|
+
EXPIRE = "expire",
|
|
20
|
+
REVERSE = "reverse"
|
|
21
|
+
}
|
|
22
|
+
export declare enum LedgerStatus {
|
|
23
|
+
PENDING = "pending",
|
|
24
|
+
SUCCESS = "success"
|
|
25
|
+
}
|
|
26
|
+
export declare enum StashCashStatus {
|
|
27
|
+
PENDING = "pending",
|
|
28
|
+
SUCCESS = "success",
|
|
29
|
+
FAILED = "failed"
|
|
30
|
+
}
|
|
31
|
+
export declare enum DeduplicationStatus {
|
|
32
|
+
PENDING = "pending",
|
|
33
|
+
SUCCESS = "success",
|
|
34
|
+
FAILED = "failed",
|
|
35
|
+
CANCELLED = "cancelled"
|
|
36
|
+
}
|
|
37
|
+
export declare enum ReservationStatus {
|
|
38
|
+
PENDING = "pending",
|
|
39
|
+
SUCCESS = "success",
|
|
40
|
+
EXPIRED = "expired",
|
|
41
|
+
FAILED = "failed"
|
|
42
|
+
}
|
|
43
|
+
export declare enum ReservationReason {
|
|
44
|
+
GOLD_REDEMPTION = "gold_redemption",
|
|
45
|
+
BILL_PAYMENT = "bill_payment",
|
|
46
|
+
VOUCHER_REDEMPTION = "voucher_redemption",
|
|
47
|
+
INVESTMENT = "investment",
|
|
48
|
+
LOAN_REPAYMENT = "loan_repayment"
|
|
49
|
+
}
|
|
50
|
+
export interface CustomerTier {
|
|
51
|
+
id: number;
|
|
52
|
+
customer_id: number;
|
|
53
|
+
tier_id: number;
|
|
54
|
+
assignment_date: string;
|
|
55
|
+
created_at: string | null;
|
|
56
|
+
is_current?: boolean;
|
|
57
|
+
}
|
|
58
|
+
export interface Deduplication {
|
|
59
|
+
id: number;
|
|
60
|
+
ext_transaction_id: string;
|
|
61
|
+
status: DeduplicationStatus;
|
|
62
|
+
error_message?: string;
|
|
63
|
+
request_payload?: string;
|
|
64
|
+
response_payload?: string;
|
|
65
|
+
created_at: string;
|
|
66
|
+
updated_at: string;
|
|
67
|
+
}
|
|
68
|
+
export interface Offer {
|
|
69
|
+
id: number;
|
|
70
|
+
title: string;
|
|
71
|
+
description?: string;
|
|
72
|
+
offer_code: string;
|
|
73
|
+
product_id: number;
|
|
74
|
+
total_budget: number;
|
|
75
|
+
user_daily_limit: number;
|
|
76
|
+
user_weekly_limit: number;
|
|
77
|
+
user_monthly_limit: number;
|
|
78
|
+
backup_offer_id?: number | null;
|
|
79
|
+
reward_type: RewardType;
|
|
80
|
+
reward_nature: RewardNature;
|
|
81
|
+
min_value: string;
|
|
82
|
+
max_value: string;
|
|
83
|
+
created_at: string;
|
|
84
|
+
updated_at: string;
|
|
85
|
+
user_total_limit?: number;
|
|
86
|
+
used_budget?: number;
|
|
87
|
+
tier?: number;
|
|
88
|
+
startDate?: string | null;
|
|
89
|
+
endDate?: string | null;
|
|
90
|
+
is_deleted?: boolean;
|
|
91
|
+
is_active?: boolean;
|
|
92
|
+
perc?: number;
|
|
93
|
+
}
|
|
94
|
+
export interface RewardLedger {
|
|
95
|
+
id: number;
|
|
96
|
+
user_id: number;
|
|
97
|
+
reward_type: RewardType;
|
|
98
|
+
entry_type: EntryType;
|
|
99
|
+
amount: number;
|
|
100
|
+
event_type: EventType;
|
|
101
|
+
offer_id?: number | null;
|
|
102
|
+
product_id?: number | null;
|
|
103
|
+
tier_id?: number | null;
|
|
104
|
+
expires_at?: string | null;
|
|
105
|
+
created_at: string;
|
|
106
|
+
description?: string | null;
|
|
107
|
+
status?: LedgerStatus;
|
|
108
|
+
ext_transaction_id?: string | null;
|
|
109
|
+
amount_rem?: number | null;
|
|
110
|
+
meta_data?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface StashCashBalance {
|
|
113
|
+
id: number;
|
|
114
|
+
user_id: number;
|
|
115
|
+
total_balance: number;
|
|
116
|
+
total_redeemable_balance: number;
|
|
117
|
+
total_expired_balance: number;
|
|
118
|
+
}
|
|
119
|
+
export interface StashCashLedger {
|
|
120
|
+
id: number;
|
|
121
|
+
user_id: number;
|
|
122
|
+
entry_type: EntryType;
|
|
123
|
+
amount: number;
|
|
124
|
+
event_type: EventType;
|
|
125
|
+
offer_id?: number | null;
|
|
126
|
+
product_id?: number | null;
|
|
127
|
+
tier_id?: number | null;
|
|
128
|
+
expires_at?: string | null;
|
|
129
|
+
created_at: string;
|
|
130
|
+
description?: string | null;
|
|
131
|
+
status?: StashCashStatus;
|
|
132
|
+
ext_transaction_id?: string | null;
|
|
133
|
+
amount_rem?: number | null;
|
|
134
|
+
meta_data?: string;
|
|
135
|
+
is_expired?: boolean;
|
|
136
|
+
reward_nature?: RewardNature | null;
|
|
137
|
+
}
|
|
138
|
+
export interface StashCashReservation {
|
|
139
|
+
id: number;
|
|
140
|
+
customer_id: string;
|
|
141
|
+
ext_transaction_id: string;
|
|
142
|
+
product_id?: string | null;
|
|
143
|
+
offer_id?: string | null;
|
|
144
|
+
reserved_amount: string;
|
|
145
|
+
status: ReservationStatus;
|
|
146
|
+
reservation_reason: ReservationReason;
|
|
147
|
+
error_message?: string;
|
|
148
|
+
response_payload?: string;
|
|
149
|
+
expires_at?: string | null;
|
|
150
|
+
created_at: string;
|
|
151
|
+
updated_at: string;
|
|
152
|
+
entries?: string;
|
|
153
|
+
}
|
|
154
|
+
export interface Tier {
|
|
155
|
+
id: number;
|
|
156
|
+
name: string;
|
|
157
|
+
is_active: boolean;
|
|
158
|
+
reward_multiplier?: Record<string, number>;
|
|
159
|
+
rules?: Record<string, any>;
|
|
160
|
+
}
|
|
161
|
+
export interface OfferCodeUsage {
|
|
162
|
+
id: number;
|
|
163
|
+
customer_id: number;
|
|
164
|
+
offer_id: number;
|
|
165
|
+
usage_date: string;
|
|
166
|
+
}
|
|
167
|
+
export interface OfferModel extends Offer, RowDataPacket {
|
|
168
|
+
}
|
|
169
|
+
export interface OfferCodeUsageModel extends OfferCodeUsage, RowDataPacket {
|
|
170
|
+
}
|
|
171
|
+
export interface RewardLedgerModel extends RewardLedger, RowDataPacket {
|
|
172
|
+
}
|
|
173
|
+
export interface StashCashLedgerModel extends StashCashLedger, RowDataPacket {
|
|
174
|
+
}
|
|
175
|
+
export interface StashCashBalanceModel extends StashCashBalance, RowDataPacket {
|
|
176
|
+
}
|
|
177
|
+
export interface StashCashReservationModel extends StashCashReservation, RowDataPacket {
|
|
178
|
+
}
|
|
179
|
+
export interface CustomerTierModel extends CustomerTier, RowDataPacket {
|
|
180
|
+
}
|
|
181
|
+
export interface DeduplicationModel extends Deduplication, RowDataPacket {
|
|
182
|
+
}
|
|
183
|
+
export interface TierModel extends Tier, RowDataPacket {
|
|
184
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReservationReason = exports.ReservationStatus = exports.DeduplicationStatus = exports.StashCashStatus = exports.LedgerStatus = exports.EventType = exports.EntryType = exports.RewardNature = exports.RewardType = void 0;
|
|
4
|
+
var RewardType;
|
|
5
|
+
(function (RewardType) {
|
|
6
|
+
RewardType["STASHCASH"] = "stashcash";
|
|
7
|
+
RewardType["GOLD"] = "gold";
|
|
8
|
+
})(RewardType || (exports.RewardType = RewardType = {}));
|
|
9
|
+
var RewardNature;
|
|
10
|
+
(function (RewardNature) {
|
|
11
|
+
RewardNature["FIXED"] = "fixed";
|
|
12
|
+
RewardNature["RANDOM"] = "random";
|
|
13
|
+
RewardNature["PERC"] = "perc";
|
|
14
|
+
})(RewardNature || (exports.RewardNature = RewardNature = {}));
|
|
15
|
+
var EntryType;
|
|
16
|
+
(function (EntryType) {
|
|
17
|
+
EntryType["CREDIT"] = "credit";
|
|
18
|
+
EntryType["DEBIT"] = "debit";
|
|
19
|
+
})(EntryType || (exports.EntryType = EntryType = {}));
|
|
20
|
+
var EventType;
|
|
21
|
+
(function (EventType) {
|
|
22
|
+
EventType["EARN"] = "earn";
|
|
23
|
+
EventType["REDEEM"] = "redeem";
|
|
24
|
+
EventType["CONVERT"] = "convert";
|
|
25
|
+
EventType["EXPIRE"] = "expire";
|
|
26
|
+
EventType["REVERSE"] = "reverse";
|
|
27
|
+
})(EventType || (exports.EventType = EventType = {}));
|
|
28
|
+
var LedgerStatus;
|
|
29
|
+
(function (LedgerStatus) {
|
|
30
|
+
LedgerStatus["PENDING"] = "pending";
|
|
31
|
+
LedgerStatus["SUCCESS"] = "success";
|
|
32
|
+
})(LedgerStatus || (exports.LedgerStatus = LedgerStatus = {}));
|
|
33
|
+
var StashCashStatus;
|
|
34
|
+
(function (StashCashStatus) {
|
|
35
|
+
StashCashStatus["PENDING"] = "pending";
|
|
36
|
+
StashCashStatus["SUCCESS"] = "success";
|
|
37
|
+
StashCashStatus["FAILED"] = "failed";
|
|
38
|
+
})(StashCashStatus || (exports.StashCashStatus = StashCashStatus = {}));
|
|
39
|
+
var DeduplicationStatus;
|
|
40
|
+
(function (DeduplicationStatus) {
|
|
41
|
+
DeduplicationStatus["PENDING"] = "pending";
|
|
42
|
+
DeduplicationStatus["SUCCESS"] = "success";
|
|
43
|
+
DeduplicationStatus["FAILED"] = "failed";
|
|
44
|
+
DeduplicationStatus["CANCELLED"] = "cancelled";
|
|
45
|
+
})(DeduplicationStatus || (exports.DeduplicationStatus = DeduplicationStatus = {}));
|
|
46
|
+
var ReservationStatus;
|
|
47
|
+
(function (ReservationStatus) {
|
|
48
|
+
ReservationStatus["PENDING"] = "pending";
|
|
49
|
+
ReservationStatus["SUCCESS"] = "success";
|
|
50
|
+
ReservationStatus["EXPIRED"] = "expired";
|
|
51
|
+
ReservationStatus["FAILED"] = "failed";
|
|
52
|
+
})(ReservationStatus || (exports.ReservationStatus = ReservationStatus = {}));
|
|
53
|
+
var ReservationReason;
|
|
54
|
+
(function (ReservationReason) {
|
|
55
|
+
ReservationReason["GOLD_REDEMPTION"] = "gold_redemption";
|
|
56
|
+
ReservationReason["BILL_PAYMENT"] = "bill_payment";
|
|
57
|
+
ReservationReason["VOUCHER_REDEMPTION"] = "voucher_redemption";
|
|
58
|
+
ReservationReason["INVESTMENT"] = "investment";
|
|
59
|
+
ReservationReason["LOAN_REPAYMENT"] = "loan_repayment";
|
|
60
|
+
})(ReservationReason || (exports.ReservationReason = ReservationReason = {}));
|