@rocketlink/crm-model 1.0.256 → 1.0.258
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.
- package/dist/dtos/campaign.request.dto.d.ts +2 -2
- package/dist/dtos/campaign.request.dto.d.ts.map +1 -1
- package/dist/dtos/lead.request.dto.d.ts +1 -0
- package/dist/dtos/lead.request.dto.d.ts.map +1 -1
- package/dist/dtos/transaction.request.dto.d.ts +1 -1
- package/dist/dtos/transaction.request.dto.d.ts.map +1 -1
- package/dist/gateways/adapters/dtos/transaction-novalnet.request.dto.d.ts +4 -2
- package/dist/gateways/adapters/dtos/transaction-novalnet.request.dto.d.ts.map +1 -1
- package/dist/gateways/adapters/model/transactionEmp.constants.d.ts +16 -0
- package/dist/gateways/adapters/model/transactionEmp.constants.d.ts.map +1 -0
- package/dist/gateways/adapters/model/transactionEmp.constants.js +16 -0
- package/dist/gateways/adapters/model/transactionEmp.model.d.ts +3 -10
- package/dist/gateways/adapters/model/transactionEmp.model.d.ts.map +1 -1
- package/dist/gateways/adapters/model/transactionEmp.model.js +1 -8
- package/dist/gateways/adapters/model/transactionFinXP.constants.d.ts +13 -0
- package/dist/gateways/adapters/model/transactionFinXP.constants.d.ts.map +1 -0
- package/dist/gateways/adapters/model/transactionFinXP.constants.js +14 -0
- package/dist/gateways/adapters/model/transactionFinXP.model.d.ts +2 -1
- package/dist/gateways/adapters/model/transactionFinXP.model.d.ts.map +1 -1
- package/dist/gateways/adapters/model/transactionNovalNet.constants.d.ts +25 -0
- package/dist/gateways/adapters/model/transactionNovalNet.constants.d.ts.map +1 -0
- package/dist/gateways/adapters/model/transactionNovalNet.constants.js +24 -0
- package/dist/gateways/adapters/model/transactionNovalNet.model.d.ts +4 -17
- package/dist/gateways/adapters/model/transactionNovalNet.model.d.ts.map +1 -1
- package/dist/gateways/adapters/model/transactionNovalNet.model.js +1 -14
- package/dist/gateways/providers/model/genesis.constants.d.ts +6 -17
- package/dist/gateways/providers/model/genesis.constants.d.ts.map +1 -1
- package/dist/gateways/providers/model/genesis.constants.js +4 -15
- package/dist/gateways/providers/model/genesis.model.d.ts +6 -6
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/model/campaign.model.d.ts +2 -2
- package/dist/model/campaign.model.d.ts.map +1 -1
- package/dist/model/constants/paymentData.constants.d.ts +3 -9
- package/dist/model/constants/paymentData.constants.d.ts.map +1 -1
- package/dist/model/constants/paymentData.constants.js +2 -7
- package/dist/model/constants/transaction.constants.d.ts +9 -13
- package/dist/model/constants/transaction.constants.d.ts.map +1 -1
- package/dist/model/constants/transaction.constants.js +13 -13
- package/dist/model/paymentData.model.d.ts +4 -12
- package/dist/model/paymentData.model.d.ts.map +1 -1
- package/dist/model/paymentData.model.js +1 -5
- package/dist/model/transaction.model.d.ts +5 -3
- package/dist/model/transaction.model.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/dtos/campaign.request.dto.ts +2 -2
- package/src/dtos/lead.request.dto.ts +1 -0
- package/src/dtos/transaction.request.dto.ts +1 -1
- package/src/gateways/adapters/dtos/transaction-novalnet.request.dto.ts +4 -2
- package/src/gateways/adapters/model/transactionEmp.constants.ts +16 -0
- package/src/gateways/adapters/model/transactionEmp.model.ts +4 -13
- package/src/gateways/adapters/model/transactionFinXP.constants.ts +12 -0
- package/src/gateways/adapters/model/transactionFinXP.model.ts +2 -1
- package/src/gateways/adapters/model/transactionNovalNet.constants.ts +27 -0
- package/src/gateways/adapters/model/transactionNovalNet.model.ts +4 -18
- package/src/gateways/providers/model/genesis.constants.ts +6 -18
- package/src/gateways/providers/model/genesis.model.ts +6 -6
- package/src/index.ts +3 -0
- package/src/model/campaign.model.ts +2 -2
- package/src/model/constants/paymentData.constants.ts +3 -12
- package/src/model/constants/transaction.constants.ts +15 -14
- package/src/model/paymentData.model.ts +6 -18
- package/src/model/transaction.model.ts +5 -4
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
export declare const TRANSACTION_TYPE: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
DEBIT: string;
|
|
3
|
+
REFUND: string;
|
|
4
|
+
CHARGEBACK: string;
|
|
5
|
+
PREAUTHORIZE: string;
|
|
6
|
+
CAPTURE: string;
|
|
7
|
+
VOID: string;
|
|
8
|
+
CHARGEBACK_REVERSAL: string;
|
|
5
9
|
};
|
|
6
|
-
export declare const TRANSACTION_TYPE_VALUES: string[];
|
|
7
10
|
export type TRANSACTION_TYPE = (typeof TRANSACTION_TYPE)[keyof typeof TRANSACTION_TYPE];
|
|
8
11
|
export declare const TRANSACTION_STATUS: {
|
|
9
12
|
PENDING_ASYNC: string;
|
|
10
13
|
SUCCESS: string;
|
|
11
14
|
FAILED: string;
|
|
12
|
-
UNKNOWN: string;
|
|
13
15
|
};
|
|
14
16
|
export type TRANSACTION_STATUS = (typeof TRANSACTION_STATUS)[keyof typeof TRANSACTION_STATUS];
|
|
15
|
-
export declare const
|
|
17
|
+
export declare const BILLING_TYPE: {
|
|
16
18
|
INITIAL: string;
|
|
17
19
|
REBILL: string;
|
|
18
20
|
STEPDOWN: string;
|
|
19
21
|
};
|
|
20
|
-
export type
|
|
21
|
-
export declare const PAYMENT_TYPE: {
|
|
22
|
-
SDD_SALE: string;
|
|
23
|
-
REFUND: string;
|
|
24
|
-
CHARGEBACK: string;
|
|
25
|
-
};
|
|
26
|
-
export type PAYMENT_TYPE = (typeof PAYMENT_TYPE)[keyof typeof PAYMENT_TYPE];
|
|
22
|
+
export type BILLING_TYPE = (typeof BILLING_TYPE)[keyof typeof BILLING_TYPE];
|
|
27
23
|
//# sourceMappingURL=transaction.constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.constants.d.ts","sourceRoot":"","sources":["../../../src/model/constants/transaction.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"transaction.constants.d.ts","sourceRoot":"","sources":["../../../src/model/constants/transaction.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;CAa5B,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAExF,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAE9F,eAAO,MAAM,YAAY;;;;CAIxB,CAAC;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.BILLING_TYPE = exports.TRANSACTION_STATUS = exports.TRANSACTION_TYPE = void 0;
|
|
4
4
|
exports.TRANSACTION_TYPE = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
// CC + DD
|
|
6
|
+
DEBIT: "DEBIT",
|
|
7
|
+
REFUND: "REFUND",
|
|
8
|
+
CHARGEBACK: "CHARGEBACK",
|
|
9
|
+
// CC only
|
|
10
|
+
PREAUTHORIZE: "PREAUTHORIZE",
|
|
11
|
+
CAPTURE: "CAPTURE",
|
|
12
|
+
VOID: "VOID",
|
|
13
|
+
// DD only
|
|
14
|
+
CHARGEBACK_REVERSAL: "CHARGEBACK_REVERSAL",
|
|
8
15
|
};
|
|
9
|
-
exports.TRANSACTION_TYPE_VALUES = Object.values(exports.TRANSACTION_TYPE);
|
|
10
16
|
exports.TRANSACTION_STATUS = {
|
|
11
17
|
PENDING_ASYNC: "PENDING_ASYNC",
|
|
12
18
|
SUCCESS: "SUCCESS",
|
|
13
|
-
FAILED: "FAILED"
|
|
14
|
-
UNKNOWN: "UNKNOWN",
|
|
19
|
+
FAILED: "FAILED"
|
|
15
20
|
};
|
|
16
|
-
exports.
|
|
21
|
+
exports.BILLING_TYPE = {
|
|
17
22
|
INITIAL: "INITIAL",
|
|
18
23
|
REBILL: "REBILL",
|
|
19
24
|
STEPDOWN: "STEPDOWN",
|
|
20
25
|
};
|
|
21
|
-
exports.PAYMENT_TYPE = {
|
|
22
|
-
SDD_SALE: "SDD_SALE",
|
|
23
|
-
REFUND: "REFUND",
|
|
24
|
-
CHARGEBACK: "CHARGEBACK"
|
|
25
|
-
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Lead } from "./lead.model";
|
|
2
|
-
import { PAYMENT_METHOD
|
|
2
|
+
import { PAYMENT_METHOD } from "./constants/paymentData.constants";
|
|
3
3
|
export interface PaymentData {
|
|
4
4
|
id?: number;
|
|
5
|
-
type:
|
|
5
|
+
type: PAYMENT_METHOD;
|
|
6
6
|
leadId?: number;
|
|
7
7
|
lead?: Lead;
|
|
8
8
|
createdAt?: Date;
|
|
9
9
|
updatedAt?: Date;
|
|
10
10
|
}
|
|
11
|
-
export type PaymentDataType = SEPAPaymentData | CreditCardPaymentData
|
|
11
|
+
export type PaymentDataType = SEPAPaymentData | CreditCardPaymentData;
|
|
12
12
|
export interface SEPAPaymentData extends PaymentData {
|
|
13
|
-
type: typeof PAYMENT_METHOD.
|
|
13
|
+
type: typeof PAYMENT_METHOD.DIRECT_DEBIT;
|
|
14
14
|
id?: number;
|
|
15
15
|
iban?: string;
|
|
16
16
|
bic?: string;
|
|
@@ -27,14 +27,6 @@ export interface CreditCardPaymentData extends PaymentData {
|
|
|
27
27
|
createdAt?: Date;
|
|
28
28
|
updatedAt?: Date;
|
|
29
29
|
}
|
|
30
|
-
export interface OpenBankingPaymentData extends PaymentData {
|
|
31
|
-
type: typeof PAYMENT_METHOD.OPEN_BANKING;
|
|
32
|
-
id?: number;
|
|
33
|
-
pb2b_av_id: string;
|
|
34
|
-
createdAt?: Date;
|
|
35
|
-
updatedAt?: Date;
|
|
36
|
-
}
|
|
37
30
|
export declare function isSepa(p: PaymentDataType | undefined): p is SEPAPaymentData;
|
|
38
31
|
export declare function isCreditCard(p: PaymentDataType): p is CreditCardPaymentData;
|
|
39
|
-
export declare function isOpenBanking(p: PaymentDataType): p is OpenBankingPaymentData;
|
|
40
32
|
//# sourceMappingURL=paymentData.model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paymentData.model.d.ts","sourceRoot":"","sources":["../../src/model/paymentData.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"paymentData.model.d.ts","sourceRoot":"","sources":["../../src/model/paymentData.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AACD,MAAM,MAAM,eAAe,GAAG,eAAe,GAAG,qBAAqB,CAAC;AAEtE,MAAM,WAAW,eAAgB,SAAQ,WAAW;IAClD,IAAI,EAAE,OAAO,cAAc,CAAC,YAAY,CAAC;IACzC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD,IAAI,EAAE,OAAO,cAAc,CAAC,WAAW,CAAC;IACxC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,eAAe,GAAG,SAAS,GAAG,CAAC,IAAI,eAAe,CAE3E;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,eAAe,GAAG,CAAC,IAAI,qBAAqB,CAE3E"}
|
|
@@ -2,14 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isSepa = isSepa;
|
|
4
4
|
exports.isCreditCard = isCreditCard;
|
|
5
|
-
exports.isOpenBanking = isOpenBanking;
|
|
6
5
|
const paymentData_constants_1 = require("./constants/paymentData.constants");
|
|
7
6
|
function isSepa(p) {
|
|
8
|
-
return p?.type === paymentData_constants_1.PAYMENT_METHOD.
|
|
7
|
+
return p?.type === paymentData_constants_1.PAYMENT_METHOD.DIRECT_DEBIT;
|
|
9
8
|
}
|
|
10
9
|
function isCreditCard(p) {
|
|
11
10
|
return p.type === paymentData_constants_1.PAYMENT_METHOD.CREDIT_CARD;
|
|
12
11
|
}
|
|
13
|
-
function isOpenBanking(p) {
|
|
14
|
-
return p.type === paymentData_constants_1.PAYMENT_METHOD.OPEN_BANKING;
|
|
15
|
-
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ADAPTERS, PROVIDERS } from "./constants/gateway.constants";
|
|
2
2
|
import { Mid } from "./mid.model";
|
|
3
|
-
import type {
|
|
3
|
+
import type { BILLING_TYPE, TRANSACTION_STATUS, TRANSACTION_TYPE } from "./constants/transaction.constants";
|
|
4
|
+
import type { PAYMENT_METHOD } from "./constants/paymentData.constants";
|
|
4
5
|
export interface Transaction {
|
|
5
6
|
id?: number;
|
|
6
7
|
provider?: PROVIDERS;
|
|
@@ -11,8 +12,9 @@ export interface Transaction {
|
|
|
11
12
|
mid?: Mid;
|
|
12
13
|
orderId?: number;
|
|
13
14
|
orderItemId?: number;
|
|
14
|
-
|
|
15
|
-
internalTransactionType?:
|
|
15
|
+
internalPaymentMethod?: PAYMENT_METHOD;
|
|
16
|
+
internalTransactionType?: TRANSACTION_TYPE;
|
|
17
|
+
billingCycleType?: BILLING_TYPE;
|
|
16
18
|
internalTransactionStatus?: TRANSACTION_STATUS;
|
|
17
19
|
response?: string;
|
|
18
20
|
createdAt?: Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.model.d.ts","sourceRoot":"","sources":["../../src/model/transaction.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"transaction.model.d.ts","sourceRoot":"","sources":["../../src/model/transaction.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC5G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB,CAAC,EAAE,cAAc,CAAC;IACvC,uBAAuB,CAAC,EAAE,gBAAgB,CAAC;IAC3C,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAChC,yBAAyB,CAAC,EAAE,kBAAkB,CAAC;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PaginatedRequest } from "./common/paginated.request.dto";
|
|
2
|
-
import {
|
|
2
|
+
import { PAYMENT_METHOD } from "../model/constants/paymentData.constants";
|
|
3
3
|
|
|
4
4
|
export interface CampaignsRequest extends PaginatedRequest {
|
|
5
5
|
id?: number;
|
|
6
6
|
name?: string;
|
|
7
7
|
categoryId?: number;
|
|
8
|
-
paymentMethod?:
|
|
8
|
+
paymentMethod?: PAYMENT_METHOD;
|
|
9
9
|
hookProfileId?: number;
|
|
10
10
|
}
|
|
@@ -6,7 +6,7 @@ export interface TransactionsRequest extends PaginatedRequest {
|
|
|
6
6
|
adapter?: ADAPTERS;
|
|
7
7
|
midId?: number;
|
|
8
8
|
orderId?: number;
|
|
9
|
-
|
|
9
|
+
billingCycleType?: string;
|
|
10
10
|
internalTransactionStatus?: string;
|
|
11
11
|
internalTransactionStatuses?: string[];
|
|
12
12
|
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { PaginatedRequest } from "../../../dtos/common/paginated.request.dto";
|
|
2
2
|
import { PaginatedResponse } from "../../../dtos/common/paginated.response.dto";
|
|
3
3
|
import { TransactionNovalNet } from "../model/transactionNovalNet.model";
|
|
4
|
+
import { NOVALNET_STATUS, NOVALNET_STATUS_DESC, NOVALNET_TRANSACTION_TYPE } from "@/gateways/adapters/model/transactionNovalNet.constants";
|
|
4
5
|
|
|
5
6
|
export interface TransactionsNovalNetRequest extends PaginatedRequest, Omit<Partial<TransactionNovalNet>, 'customerNumber' | 'orderNumber'> {
|
|
6
7
|
midId?: number;
|
|
7
8
|
orderId?: number;
|
|
8
9
|
tid?: string;
|
|
9
|
-
|
|
10
|
+
status?: NOVALNET_STATUS;
|
|
11
|
+
statusDesc?: NOVALNET_STATUS_DESC;
|
|
12
|
+
paymentType?: NOVALNET_TRANSACTION_TYPE;
|
|
10
13
|
statuses?: string[];
|
|
11
14
|
statusDescs?: string[];
|
|
12
|
-
paymentType?: string;
|
|
13
15
|
amount?: string;
|
|
14
16
|
customerNumber?: string;
|
|
15
17
|
orderNumber?: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const TRANSACTION_TYPE_EMP = {
|
|
2
|
+
sdd_sale: "sdd_sale",
|
|
3
|
+
chargeback: "chargeback",
|
|
4
|
+
refund: "refund",
|
|
5
|
+
sdd_refund: "sdd_refund",
|
|
6
|
+
};
|
|
7
|
+
export type TRANSACTION_TYPE_EMP = (typeof TRANSACTION_TYPE_EMP)[keyof typeof TRANSACTION_TYPE_EMP];
|
|
8
|
+
|
|
9
|
+
export const TRANSACTION_STATUS_EMP = {
|
|
10
|
+
approved: "approved",
|
|
11
|
+
chargeback: "chargebacked",
|
|
12
|
+
rejected: "rejected",
|
|
13
|
+
declined: "declined",
|
|
14
|
+
pending_async: "pending_async",
|
|
15
|
+
};
|
|
16
|
+
export type TRANSACTION_STATUS_EMP = (typeof TRANSACTION_STATUS_EMP)[keyof typeof TRANSACTION_STATUS_EMP];
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { Transaction } from "../../../model/transaction.model";
|
|
2
2
|
import { ADAPTERS, PROVIDERS } from "../../../model/constants/gateway.constants";
|
|
3
|
-
|
|
4
|
-
export const TRANSACTION_EMP_STATUS = {
|
|
5
|
-
approved: "approved",
|
|
6
|
-
chargeback: "chargebacked",
|
|
7
|
-
rejected: "rejected",
|
|
8
|
-
declined: "declined",
|
|
9
|
-
pending_async: "pending_async",
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type TRANSACTION_EMP_STATUS = (typeof TRANSACTION_EMP_STATUS)[keyof typeof TRANSACTION_EMP_STATUS];
|
|
3
|
+
import { TRANSACTION_STATUS_EMP, TRANSACTION_TYPE_EMP } from "./transactionEmp.constants";
|
|
13
4
|
|
|
14
5
|
export function isTransactionEmp(t: Transaction): t is TransactionEmp {
|
|
15
6
|
return t?.adapter === ADAPTERS.EMP;
|
|
@@ -19,8 +10,8 @@ export interface TransactionEmp extends Transaction {
|
|
|
19
10
|
adapter: typeof ADAPTERS.EMP; //CRM info
|
|
20
11
|
provider: PROVIDERS; //CRM info
|
|
21
12
|
id?: number;
|
|
22
|
-
type?:
|
|
23
|
-
status?:
|
|
13
|
+
type?: TRANSACTION_TYPE_EMP; //apiResponse.transaction_type
|
|
14
|
+
status?: TRANSACTION_STATUS_EMP;
|
|
24
15
|
unique_id?: string; //EMP transactionId
|
|
25
16
|
transaction_id?: string; //orderId-Yyyymmddhhmmsss
|
|
26
17
|
iban_account_no?: string; //apiResponse.bank_account_number
|
|
@@ -119,7 +110,7 @@ export interface TransactionRocketPayEmp extends Transaction {
|
|
|
119
110
|
returnType?: string;
|
|
120
111
|
paymentMethod?: string;
|
|
121
112
|
response?: string;
|
|
122
|
-
createdAt?: Date;
|
|
113
|
+
createdAt?: Date;
|
|
123
114
|
updatedAt?: Date;
|
|
124
115
|
}
|
|
125
116
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const TRANSACTION_STATUS_FINXP = {
|
|
2
|
+
SETTLEMENT: "SETTLEMENT", //SUCCESS
|
|
3
|
+
REJECT: "REJECT", //FAILED
|
|
4
|
+
CANCELLED: "CANCELLED", //FAILED
|
|
5
|
+
ERROR: "ERROR", //FAILED
|
|
6
|
+
ABNORMAL: "ABNORMAL", //FAILED
|
|
7
|
+
FRRJC: "FR-RJC", //FAILED
|
|
8
|
+
FCRJC: "FC-RJC", //FAILED
|
|
9
|
+
FCCANC: "FC-CANC", //FAILED
|
|
10
|
+
DONE: "DONE", //SUCCESS
|
|
11
|
+
} as const;
|
|
12
|
+
export type TRANSACTION_STATUS_FINXP = (typeof TRANSACTION_STATUS_FINXP)[keyof typeof TRANSACTION_STATUS_FINXP];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Transaction } from "../../../model/transaction.model";
|
|
2
2
|
import { ADAPTERS, PROVIDERS } from "../../../model/constants/gateway.constants";
|
|
3
|
+
import { TRANSACTION_STATUS_FINXP } from "@/gateways/adapters/model/transactionFinXP.constants";
|
|
3
4
|
|
|
4
5
|
export type TransactionType = TransactionFinXP;
|
|
5
6
|
|
|
@@ -15,7 +16,7 @@ export interface TransactionFinXP extends Transaction {
|
|
|
15
16
|
adapter: typeof ADAPTERS.finXP;
|
|
16
17
|
provider: PROVIDERS;
|
|
17
18
|
id?: number;
|
|
18
|
-
status?:
|
|
19
|
+
status?: typeof TRANSACTION_STATUS_FINXP;
|
|
19
20
|
endToEndId?: string;
|
|
20
21
|
merchant?: string;
|
|
21
22
|
amount?: string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const NOVALNET_TRANSACTION_TYPE = {
|
|
2
|
+
DIRECT_DEBIT_SEPA: "DIRECT_DEBIT_SEPA", // payment
|
|
3
|
+
RETURN_DEBIT_SEPA: "RETURN_DEBIT_SEPA", // chargeback
|
|
4
|
+
REFUND_BY_BANK_TRANSFER_EURO: "REFUND_BY_BANK_TRANSFER_EURO" // refund
|
|
5
|
+
} as const;
|
|
6
|
+
export type NOVALNET_TRANSACTION_TYPE = (typeof NOVALNET_TRANSACTION_TYPE)[keyof typeof NOVALNET_TRANSACTION_TYPE];
|
|
7
|
+
|
|
8
|
+
export const NOVALNET_STATUS = {
|
|
9
|
+
100: 100
|
|
10
|
+
};
|
|
11
|
+
export type NOVALNET_STATUS = (typeof NOVALNET_STATUS)[keyof typeof NOVALNET_STATUS];
|
|
12
|
+
|
|
13
|
+
export const NOVALNET_STATUS_DESC = {
|
|
14
|
+
success: 'successful',
|
|
15
|
+
pending: 'pending',
|
|
16
|
+
failed: 'failed',
|
|
17
|
+
confirmed: 'confirmed',
|
|
18
|
+
cancelled: 'cancelled',
|
|
19
|
+
refunded: 'refunded',
|
|
20
|
+
chargeback: 'chargeback',
|
|
21
|
+
rejected: 'rejected',
|
|
22
|
+
declined: 'declined',
|
|
23
|
+
on_hold: 'on_hold',
|
|
24
|
+
processing: 'processing',
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type NOVALNET_STATUS_DESC = (typeof NOVALNET_STATUS_DESC)[keyof typeof NOVALNET_STATUS_DESC];
|
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
import { Transaction } from "../../../model/transaction.model";
|
|
2
2
|
import { ADAPTERS, PROVIDERS } from "../../../model/constants/gateway.constants";
|
|
3
|
-
|
|
4
|
-
export const NOVALNET_STATUS_DESC = {
|
|
5
|
-
SUCCESS: 'SUCCESSFUL',
|
|
6
|
-
PENDING: 'PENDING',
|
|
7
|
-
FAILED: 'FAILED',
|
|
8
|
-
CONFIRMED: 'CONFIRMED',
|
|
9
|
-
CANCELLED: 'CANCELLED',
|
|
10
|
-
REFUNDED: 'REFUNDED',
|
|
11
|
-
CHARGEBACK: 'CHARGEBACK',
|
|
12
|
-
REJECTED: 'REJECTED',
|
|
13
|
-
DECLINED: 'DECLINED',
|
|
14
|
-
ON_HOLD: 'ON_HOLD',
|
|
15
|
-
PROCESSING: 'PROCESSING'
|
|
16
|
-
} as const;
|
|
17
|
-
export type NOVALNET_STATUS_DESC = (typeof NOVALNET_STATUS_DESC)[keyof typeof NOVALNET_STATUS_DESC];
|
|
3
|
+
import { NOVALNET_STATUS, NOVALNET_STATUS_DESC, NOVALNET_TRANSACTION_TYPE } from "@/gateways/adapters/model/transactionNovalNet.constants";
|
|
18
4
|
|
|
19
5
|
export function isTransactionNovalnet(t: Transaction): t is TransactionNovalNet {
|
|
20
6
|
return t?.adapter === ADAPTERS.Novalnet;
|
|
@@ -29,9 +15,9 @@ export interface TransactionNovalNet extends Transaction {
|
|
|
29
15
|
activationDate?: string;
|
|
30
16
|
activationTime?: string;
|
|
31
17
|
tid?: string;
|
|
32
|
-
status?:
|
|
33
|
-
statusDesc?:
|
|
34
|
-
paymentType?:
|
|
18
|
+
status?: NOVALNET_STATUS;
|
|
19
|
+
statusDesc?: NOVALNET_STATUS_DESC;
|
|
20
|
+
paymentType?: NOVALNET_TRANSACTION_TYPE;
|
|
35
21
|
invoiceType?: string;
|
|
36
22
|
invoiceRef?: string;
|
|
37
23
|
amount?: string;
|
|
@@ -1,30 +1,18 @@
|
|
|
1
|
-
export const
|
|
2
|
-
SEPA_DD: {
|
|
3
|
-
SDD_SALE: "sdd_sale",
|
|
4
|
-
SDD_REFUND: "sdd_refund"
|
|
5
|
-
},
|
|
6
|
-
CREDIT_CARD: {
|
|
7
|
-
SALE: "sale",
|
|
8
|
-
REFUND: "refund",
|
|
9
|
-
CHARGEBACK: "chargeback",
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const GENESIS_TRANSACTION_TYPE = {
|
|
1
|
+
export const TRANSACTION_TYPE_GENESIS = {
|
|
14
2
|
SDD_SALE: "sdd_sale",
|
|
15
3
|
SDD_REFUND: "sdd_refund"
|
|
16
4
|
};
|
|
17
|
-
export type
|
|
5
|
+
export type TRANSACTION_TYPE_GENESIS = (typeof TRANSACTION_TYPE_GENESIS)[keyof typeof TRANSACTION_TYPE_GENESIS];
|
|
18
6
|
|
|
19
|
-
export const
|
|
7
|
+
export const TRANSACTION_STATUS_GENESIS = {
|
|
20
8
|
APPROVED: "approved",
|
|
21
9
|
PENDING_ASYNC: "pending_async",
|
|
22
10
|
ERROR: "error"
|
|
23
11
|
};
|
|
24
|
-
export type
|
|
12
|
+
export type TRANSACTION_STATUS_GENESIS = (typeof TRANSACTION_STATUS_GENESIS)[keyof typeof TRANSACTION_STATUS_GENESIS];
|
|
25
13
|
|
|
26
|
-
export const
|
|
14
|
+
export const TRANSACTION_MODE_GENESIS = {
|
|
27
15
|
LIVE: "live",
|
|
28
16
|
TEST: "test"
|
|
29
17
|
};
|
|
30
|
-
export type
|
|
18
|
+
export type TRANSACTION_MODE_GENESIS = (typeof TRANSACTION_MODE_GENESIS)[keyof typeof TRANSACTION_MODE_GENESIS];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { TRANSACTION_TYPE_GENESIS } from "./genesis.constants";
|
|
2
|
+
import { TRANSACTION_STATUS_GENESIS } from "./genesis.constants";
|
|
3
|
+
import { TRANSACTION_MODE_GENESIS } from "./genesis.constants";
|
|
4
4
|
import { PROVIDERS } from "../../../model/constants/gateway.constants";
|
|
5
5
|
import type { ProviderAuth } from "../../../model/mid.model";
|
|
6
6
|
|
|
@@ -55,8 +55,8 @@ export interface GenesisSddSaleParams {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
export interface GenesisResponse {
|
|
58
|
-
transaction_type?:
|
|
59
|
-
status:
|
|
58
|
+
transaction_type?: TRANSACTION_TYPE_GENESIS;
|
|
59
|
+
status: TRANSACTION_STATUS_GENESIS;
|
|
60
60
|
unique_id: string; //EMP transactionId
|
|
61
61
|
transaction_id?: string; //orderId. When we download CSV from the adapter, this value is present in "Merchant Transaction ID"
|
|
62
62
|
bank_account_number?: string;
|
|
@@ -64,7 +64,7 @@ export interface GenesisResponse {
|
|
|
64
64
|
technical_message?: string;
|
|
65
65
|
code?: string;
|
|
66
66
|
message?: string;
|
|
67
|
-
mode?:
|
|
67
|
+
mode?: TRANSACTION_MODE_GENESIS,
|
|
68
68
|
timestamp?: string; //"2025-10-27T14:42:27Z"
|
|
69
69
|
descriptor?: string;
|
|
70
70
|
amount?: string;
|
package/src/index.ts
CHANGED
|
@@ -92,6 +92,9 @@ export * from './model/transactionError.model';
|
|
|
92
92
|
export * from './gateways/adapters/model/transactionEmp.model';
|
|
93
93
|
export * from './gateways/adapters/model/transactionNovalNet.model';
|
|
94
94
|
export * from './gateways/adapters/model/transactionFinXP.model';
|
|
95
|
+
export * from './gateways/adapters/model/transactionEmp.constants';
|
|
96
|
+
export * from './gateways/adapters/model/transactionNovalNet.constants';
|
|
97
|
+
export * from './gateways/adapters/model/transactionFinXP.constants';
|
|
95
98
|
|
|
96
99
|
// Export Gateway Adapters DTOs
|
|
97
100
|
export * from './gateways/adapters/dtos/transaction-emp.request.dto';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PAYMENT_METHOD } from "./constants/paymentData.constants";
|
|
2
2
|
import type { HookProfile } from "./hookProfile.model";
|
|
3
3
|
import type { Offer } from "./offer.model";
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ export interface Campaign {
|
|
|
7
7
|
name?: string;
|
|
8
8
|
description?: string;
|
|
9
9
|
categoryId?: number;
|
|
10
|
-
paymentMethod?:
|
|
10
|
+
paymentMethod?: PAYMENT_METHOD;
|
|
11
11
|
trafficSourceId?: number;
|
|
12
12
|
offers?: Offer[];
|
|
13
13
|
offerIds?: number[];
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
export const PAYMENT_METHOD = {
|
|
2
|
-
SEPA: "SEPA",
|
|
3
2
|
CREDIT_CARD: "CREDIT_CARD",
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export type PaymentMethodType = (typeof PAYMENT_METHOD)[keyof typeof PAYMENT_METHOD];
|
|
8
|
-
|
|
9
|
-
export const CAMPAIGN_PAYMENT_METHOD = {
|
|
10
|
-
CC: "CC",
|
|
11
|
-
DD: "DD"
|
|
12
|
-
} as const;
|
|
13
|
-
|
|
14
|
-
export type CampaignPaymentMethodType = (typeof CAMPAIGN_PAYMENT_METHOD)[keyof typeof CAMPAIGN_PAYMENT_METHOD];
|
|
3
|
+
DIRECT_DEBIT: "DIRECT_DEBIT",
|
|
4
|
+
};
|
|
5
|
+
export type PAYMENT_METHOD = (typeof PAYMENT_METHOD)[keyof typeof PAYMENT_METHOD];
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
export const TRANSACTION_TYPE = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
// CC + DD
|
|
3
|
+
DEBIT: "DEBIT",
|
|
4
|
+
REFUND: "REFUND",
|
|
5
|
+
CHARGEBACK: "CHARGEBACK",
|
|
6
|
+
|
|
7
|
+
// CC only
|
|
8
|
+
PREAUTHORIZE: "PREAUTHORIZE",
|
|
9
|
+
CAPTURE: "CAPTURE",
|
|
10
|
+
VOID: "VOID",
|
|
11
|
+
|
|
12
|
+
// DD only
|
|
13
|
+
CHARGEBACK_REVERSAL: "CHARGEBACK_REVERSAL",
|
|
5
14
|
};
|
|
6
|
-
export const TRANSACTION_TYPE_VALUES = Object.values(TRANSACTION_TYPE);
|
|
7
15
|
export type TRANSACTION_TYPE = (typeof TRANSACTION_TYPE)[keyof typeof TRANSACTION_TYPE];
|
|
8
16
|
|
|
9
17
|
export const TRANSACTION_STATUS = {
|
|
10
18
|
PENDING_ASYNC: "PENDING_ASYNC",
|
|
11
19
|
SUCCESS: "SUCCESS",
|
|
12
|
-
FAILED: "FAILED"
|
|
13
|
-
UNKNOWN: "UNKNOWN",
|
|
20
|
+
FAILED: "FAILED"
|
|
14
21
|
};
|
|
15
22
|
export type TRANSACTION_STATUS = (typeof TRANSACTION_STATUS)[keyof typeof TRANSACTION_STATUS];
|
|
16
23
|
|
|
17
|
-
export const
|
|
24
|
+
export const BILLING_TYPE = {
|
|
18
25
|
INITIAL: "INITIAL",
|
|
19
26
|
REBILL: "REBILL",
|
|
20
27
|
STEPDOWN: "STEPDOWN",
|
|
21
28
|
};
|
|
22
|
-
export type
|
|
29
|
+
export type BILLING_TYPE = (typeof BILLING_TYPE)[keyof typeof BILLING_TYPE];
|
|
23
30
|
|
|
24
|
-
export const PAYMENT_TYPE = {
|
|
25
|
-
SDD_SALE: "SDD_SALE",
|
|
26
|
-
REFUND: "REFUND",
|
|
27
|
-
CHARGEBACK: "CHARGEBACK"
|
|
28
|
-
};
|
|
29
|
-
export type PAYMENT_TYPE = (typeof PAYMENT_TYPE)[keyof typeof PAYMENT_TYPE];
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Lead } from "./lead.model";
|
|
2
|
-
import { PAYMENT_METHOD
|
|
2
|
+
import { PAYMENT_METHOD } from "./constants/paymentData.constants";
|
|
3
3
|
|
|
4
4
|
export interface PaymentData {
|
|
5
5
|
id?: number;
|
|
6
|
-
type:
|
|
6
|
+
type: PAYMENT_METHOD;
|
|
7
7
|
leadId?: number;
|
|
8
8
|
lead?: Lead;
|
|
9
9
|
createdAt?: Date;
|
|
10
10
|
updatedAt?: Date;
|
|
11
11
|
}
|
|
12
|
-
export type PaymentDataType = SEPAPaymentData | CreditCardPaymentData
|
|
12
|
+
export type PaymentDataType = SEPAPaymentData | CreditCardPaymentData;
|
|
13
13
|
|
|
14
14
|
export interface SEPAPaymentData extends PaymentData {
|
|
15
|
-
type: typeof PAYMENT_METHOD.
|
|
15
|
+
type: typeof PAYMENT_METHOD.DIRECT_DEBIT;
|
|
16
16
|
id?: number;
|
|
17
17
|
iban?: string;
|
|
18
18
|
bic?: string;
|
|
@@ -31,22 +31,10 @@ export interface CreditCardPaymentData extends PaymentData {
|
|
|
31
31
|
updatedAt?: Date;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
export interface OpenBankingPaymentData extends PaymentData {
|
|
35
|
-
type: typeof PAYMENT_METHOD.OPEN_BANKING;
|
|
36
|
-
id?: number;
|
|
37
|
-
pb2b_av_id: string;
|
|
38
|
-
createdAt?: Date;
|
|
39
|
-
updatedAt?: Date;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
34
|
export function isSepa(p: PaymentDataType | undefined): p is SEPAPaymentData {
|
|
43
|
-
return p?.type === PAYMENT_METHOD.
|
|
35
|
+
return p?.type === PAYMENT_METHOD.DIRECT_DEBIT;
|
|
44
36
|
}
|
|
45
37
|
|
|
46
38
|
export function isCreditCard(p: PaymentDataType): p is CreditCardPaymentData {
|
|
47
39
|
return p.type === PAYMENT_METHOD.CREDIT_CARD;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export function isOpenBanking(p: PaymentDataType): p is OpenBankingPaymentData {
|
|
51
|
-
return p.type === PAYMENT_METHOD.OPEN_BANKING;
|
|
52
|
-
}
|
|
40
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ADAPTERS, PROVIDERS } from "./constants/gateway.constants";
|
|
2
2
|
import { Mid } from "./mid.model";
|
|
3
|
-
import type {
|
|
3
|
+
import type { BILLING_TYPE, TRANSACTION_STATUS, TRANSACTION_TYPE } from "./constants/transaction.constants";
|
|
4
|
+
import type { PAYMENT_METHOD } from "./constants/paymentData.constants";
|
|
4
5
|
|
|
5
6
|
export interface Transaction {
|
|
6
7
|
id?: number;
|
|
@@ -12,9 +13,9 @@ export interface Transaction {
|
|
|
12
13
|
mid?: Mid;
|
|
13
14
|
orderId?: number;
|
|
14
15
|
orderItemId?: number;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
internalPaymentMethod?: PAYMENT_METHOD;
|
|
17
|
+
internalTransactionType?: TRANSACTION_TYPE;
|
|
18
|
+
billingCycleType?: BILLING_TYPE;
|
|
18
19
|
internalTransactionStatus?: TRANSACTION_STATUS;
|
|
19
20
|
response?: string;
|
|
20
21
|
createdAt?: Date;
|