@rocketlink/crm-model 1.0.281 → 1.0.282
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/webhookInbox.request.dto.d.ts +9 -0
- package/dist/dtos/webhookInbox.request.dto.d.ts.map +1 -0
- package/dist/dtos/webhookInbox.request.dto.js +2 -0
- package/dist/gateways/adapters/model/transactionFinXP.model.d.ts +2 -2
- package/dist/gateways/adapters/model/transactionFinXP.model.js +2 -2
- package/dist/gateways/adapters/model/transactionNovalNet.model.d.ts +1 -1
- package/dist/gateways/adapters/model/transactionNovalNet.model.js +1 -1
- package/dist/gateways/providers/dtos/webhook.genesis.response.dto.d.ts +2 -0
- package/dist/gateways/providers/dtos/webhook.genesis.response.dto.d.ts.map +1 -1
- package/dist/gateways/providers/dtos/webhook.genesis.response.dto.js +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/model/constants/gateway.constants.d.ts +5 -5
- package/dist/model/constants/gateway.constants.js +6 -6
- package/dist/model/constants/webhookInbox.constants.d.ts +8 -0
- package/dist/model/constants/webhookInbox.constants.d.ts.map +1 -0
- package/dist/model/constants/webhookInbox.constants.js +11 -0
- package/dist/model/providerError.model.d.ts +2 -1
- package/dist/model/providerError.model.d.ts.map +1 -1
- package/dist/model/webhookInbox.model.d.ts +15 -0
- package/dist/model/webhookInbox.model.d.ts.map +1 -0
- package/dist/model/webhookInbox.model.js +2 -0
- package/package.json +1 -1
- package/src/dtos/webhookInbox.request.dto.ts +9 -0
- package/src/gateways/adapters/model/transactionFinXP.model.ts +4 -4
- package/src/gateways/adapters/model/transactionNovalNet.model.ts +2 -2
- package/src/gateways/providers/dtos/webhook.genesis.response.dto.ts +5 -2
- package/src/index.ts +3 -0
- package/src/model/constants/gateway.constants.ts +6 -6
- package/src/model/constants/webhookInbox.constants.ts +7 -0
- package/src/model/providerError.model.ts +2 -1
- package/src/model/webhookInbox.model.ts +15 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PaginatedRequest } from "./common/paginated.request.dto";
|
|
2
|
+
export interface WebhookInboxesRequest extends PaginatedRequest {
|
|
3
|
+
id?: number;
|
|
4
|
+
adapterCode?: string;
|
|
5
|
+
midId?: number;
|
|
6
|
+
uniqueId?: string;
|
|
7
|
+
notificationStatus?: string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=webhookInbox.request.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhookInbox.request.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/webhookInbox.request.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -5,7 +5,7 @@ export type TransactionType = TransactionFinXP;
|
|
|
5
5
|
export declare function isTransactionFinXP(t: Transaction): t is TransactionFinXP;
|
|
6
6
|
export declare function isTransactionFinXPChargeback(t: Transaction): t is TransactionFinXPChargeback;
|
|
7
7
|
export interface TransactionFinXP extends Transaction {
|
|
8
|
-
adapter: typeof ADAPTERS.
|
|
8
|
+
adapter: typeof ADAPTERS.FINXP;
|
|
9
9
|
provider: PROVIDERS;
|
|
10
10
|
id?: number;
|
|
11
11
|
status?: typeof TRANSACTION_STATUS_FINXP;
|
|
@@ -64,7 +64,7 @@ export interface TransactionFinXP extends Transaction {
|
|
|
64
64
|
updatedAt?: Date;
|
|
65
65
|
}
|
|
66
66
|
export interface TransactionFinXPChargeback extends Transaction {
|
|
67
|
-
adapter: typeof ADAPTERS.
|
|
67
|
+
adapter: typeof ADAPTERS.FINXP;
|
|
68
68
|
id?: number;
|
|
69
69
|
status?: string;
|
|
70
70
|
chargebackDate?: string;
|
|
@@ -5,10 +5,10 @@ exports.isTransactionFinXP = isTransactionFinXP;
|
|
|
5
5
|
exports.isTransactionFinXPChargeback = isTransactionFinXPChargeback;
|
|
6
6
|
const gateway_constants_1 = require("../../../model/constants/gateway.constants");
|
|
7
7
|
function isTransactionFinXP(t) {
|
|
8
|
-
return t?.adapter === gateway_constants_1.ADAPTERS.
|
|
8
|
+
return t?.adapter === gateway_constants_1.ADAPTERS.FINXP;
|
|
9
9
|
}
|
|
10
10
|
function isTransactionFinXPChargeback(t) {
|
|
11
|
-
return t?.adapter === gateway_constants_1.ADAPTERS.
|
|
11
|
+
return t?.adapter === gateway_constants_1.ADAPTERS.FINXP;
|
|
12
12
|
}
|
|
13
13
|
exports.finXPCSVToTransactionColumn = {
|
|
14
14
|
status: "STATUS",
|
|
@@ -3,7 +3,7 @@ import { ADAPTERS, PROVIDERS } from "../../../model/constants/gateway.constants"
|
|
|
3
3
|
import { NOVALNET_STATUS, NOVALNET_STATUS_DESC, NOVALNET_TRANSACTION_TYPE } from "@/gateways/adapters/model/transactionNovalNet.constants";
|
|
4
4
|
export declare function isTransactionNovalnet(t: Transaction): t is TransactionNovalNet;
|
|
5
5
|
export interface TransactionNovalNet extends Transaction {
|
|
6
|
-
adapter: typeof ADAPTERS.
|
|
6
|
+
adapter: typeof ADAPTERS.NOVALNET;
|
|
7
7
|
provider: PROVIDERS;
|
|
8
8
|
id?: number;
|
|
9
9
|
date?: string;
|
|
@@ -4,7 +4,7 @@ exports.novalNetTransactionColumnValues = exports.novalNetTransactionColumnKeys
|
|
|
4
4
|
exports.isTransactionNovalnet = isTransactionNovalnet;
|
|
5
5
|
const gateway_constants_1 = require("../../../model/constants/gateway.constants");
|
|
6
6
|
function isTransactionNovalnet(t) {
|
|
7
|
-
return t?.adapter === gateway_constants_1.ADAPTERS.
|
|
7
|
+
return t?.adapter === gateway_constants_1.ADAPTERS.NOVALNET;
|
|
8
8
|
}
|
|
9
9
|
exports.novalNetTransactionColumnMapper = {
|
|
10
10
|
date: "Date",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.genesis.response.dto.d.ts","sourceRoot":"","sources":["../../../../src/gateways/providers/dtos/webhook.genesis.response.dto.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;
|
|
1
|
+
{"version":3,"file":"webhook.genesis.response.dto.d.ts","sourceRoot":"","sources":["../../../../src/gateways/providers/dtos/webhook.genesis.response.dto.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,uBAAuB,GAAI,UAAU,sBAAsB,KAAG,MACyD,CAAC"}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildGenesisResponseXml = void 0;
|
|
4
|
+
const buildGenesisResponseXml = (response) => `<?xml version="1.0" encoding="UTF-8"?>\n<notification_echo>\n <unique_id>${response.uniqueId}</unique_id>\n</notification_echo>`;
|
|
5
|
+
exports.buildGenesisResponseXml = buildGenesisResponseXml;
|
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export * from './dtos/aclSubject.request.dto';
|
|
|
43
43
|
export * from './dtos/aclAction.request.dto';
|
|
44
44
|
export * from './dtos/hostedPage.request.dto';
|
|
45
45
|
export * from './dtos/checkout.request.dto';
|
|
46
|
+
export * from './dtos/webhookInbox.request.dto';
|
|
46
47
|
export * from './mappers/csv/csvRowDataOrder.csv.mapper';
|
|
47
48
|
export * from './mappers/csv/csvRowDataSubscriptionId.csv.mapper';
|
|
48
49
|
export * from './model/constants/lead.constants';
|
|
@@ -59,6 +60,7 @@ export * from './model/constants/job.constants';
|
|
|
59
60
|
export * from './model/constants/event.constants';
|
|
60
61
|
export * from './model/constants/offer.constants';
|
|
61
62
|
export * from './model/constants/acl.constants';
|
|
63
|
+
export * from './model/constants/webhookInbox.constants';
|
|
62
64
|
export * from './model/campaign.model';
|
|
63
65
|
export * from './model/category.model';
|
|
64
66
|
export * from './model/csv.model';
|
|
@@ -92,6 +94,7 @@ export * from './model/aclSubject.model';
|
|
|
92
94
|
export * from './model/aclAction.model';
|
|
93
95
|
export * from './model/aclRolePermission.model';
|
|
94
96
|
export * from './model/hostedPage.model';
|
|
97
|
+
export * from './model/webhookInbox.model';
|
|
95
98
|
export * from './gateways/adapters/model/transactionEmp.model';
|
|
96
99
|
export * from './gateways/adapters/model/transactionNovalNet.model';
|
|
97
100
|
export * from './gateways/adapters/model/transactionFinXP.model';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC7G,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAE1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+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Ac,gDAAgD,CAAC;AAC/D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,iDAAiD,CAAC;AAChE,cAAc,8CAA8C,CAAC;AAE7D,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -68,6 +68,7 @@ __exportStar(require("./dtos/aclSubject.request.dto"), exports);
|
|
|
68
68
|
__exportStar(require("./dtos/aclAction.request.dto"), exports);
|
|
69
69
|
__exportStar(require("./dtos/hostedPage.request.dto"), exports);
|
|
70
70
|
__exportStar(require("./dtos/checkout.request.dto"), exports);
|
|
71
|
+
__exportStar(require("./dtos/webhookInbox.request.dto"), exports);
|
|
71
72
|
// Export all Mappers
|
|
72
73
|
__exportStar(require("./mappers/csv/csvRowDataOrder.csv.mapper"), exports);
|
|
73
74
|
__exportStar(require("./mappers/csv/csvRowDataSubscriptionId.csv.mapper"), exports);
|
|
@@ -86,6 +87,7 @@ __exportStar(require("./model/constants/job.constants"), exports);
|
|
|
86
87
|
__exportStar(require("./model/constants/event.constants"), exports);
|
|
87
88
|
__exportStar(require("./model/constants/offer.constants"), exports);
|
|
88
89
|
__exportStar(require("./model/constants/acl.constants"), exports);
|
|
90
|
+
__exportStar(require("./model/constants/webhookInbox.constants"), exports);
|
|
89
91
|
// Export all Models
|
|
90
92
|
__exportStar(require("./model/campaign.model"), exports);
|
|
91
93
|
__exportStar(require("./model/category.model"), exports);
|
|
@@ -121,6 +123,7 @@ __exportStar(require("./model/aclSubject.model"), exports);
|
|
|
121
123
|
__exportStar(require("./model/aclAction.model"), exports);
|
|
122
124
|
__exportStar(require("./model/aclRolePermission.model"), exports);
|
|
123
125
|
__exportStar(require("./model/hostedPage.model"), exports);
|
|
126
|
+
__exportStar(require("./model/webhookInbox.model"), exports);
|
|
124
127
|
// Export Gateway Adapters Models
|
|
125
128
|
__exportStar(require("./gateways/adapters/model/transactionEmp.model"), exports);
|
|
126
129
|
__exportStar(require("./gateways/adapters/model/transactionNovalNet.model"), exports);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const ADAPTERS: {
|
|
2
2
|
EMP: string;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
FINXP: string;
|
|
4
|
+
PAYNT: string;
|
|
5
|
+
PAYSTRAX: string;
|
|
6
|
+
PAY_BANK_2_BANK: string;
|
|
7
|
+
NOVALNET: string;
|
|
8
8
|
UNKNOWN: string;
|
|
9
9
|
ALL: string;
|
|
10
10
|
};
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PROVIDERS = exports.ADAPTER_NAME_VALUES = exports.ADAPTERS = void 0;
|
|
4
4
|
exports.ADAPTERS = {
|
|
5
|
-
EMP: "emp", //
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
EMP: "emp", // API-integrated via Genesis/RocketPay providers
|
|
6
|
+
FINXP: "finxp", // Manual (CSV import). Status: pending
|
|
7
|
+
PAYNT: "paynt", // Pending integration
|
|
8
|
+
PAYSTRAX: "paystrax", // Pending integration
|
|
9
|
+
PAY_BANK_2_BANK: "paybank2bank", // Pending integration
|
|
10
|
+
NOVALNET: "novalnet", // Manual (CSV import). All chargebacks in one place
|
|
11
11
|
UNKNOWN: "unknown",
|
|
12
12
|
ALL: "all",
|
|
13
13
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhookInbox.constants.d.ts","sourceRoot":"","sources":["../../../src/model/constants/webhookInbox.constants.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC9B,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WEBHOOK_INBOX_STATUS = void 0;
|
|
4
|
+
var WEBHOOK_INBOX_STATUS;
|
|
5
|
+
(function (WEBHOOK_INBOX_STATUS) {
|
|
6
|
+
WEBHOOK_INBOX_STATUS["RECEIVED"] = "RECEIVED";
|
|
7
|
+
WEBHOOK_INBOX_STATUS["QUEUED"] = "QUEUED";
|
|
8
|
+
WEBHOOK_INBOX_STATUS["PROCESSING"] = "PROCESSING";
|
|
9
|
+
WEBHOOK_INBOX_STATUS["PROCESSED"] = "PROCESSED";
|
|
10
|
+
WEBHOOK_INBOX_STATUS["FAILED"] = "FAILED";
|
|
11
|
+
})(WEBHOOK_INBOX_STATUS || (exports.WEBHOOK_INBOX_STATUS = WEBHOOK_INBOX_STATUS = {}));
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ADAPTERS } from "./constants/gateway.constants";
|
|
1
|
+
import { ADAPTERS, PROVIDERS } from "./constants/gateway.constants";
|
|
2
2
|
export interface ProviderError {
|
|
3
3
|
id?: number;
|
|
4
4
|
adapter: ADAPTERS;
|
|
5
|
+
provider?: PROVIDERS;
|
|
5
6
|
midId?: number;
|
|
6
7
|
orderId?: number;
|
|
7
8
|
amount?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providerError.model.d.ts","sourceRoot":"","sources":["../../src/model/providerError.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"providerError.model.d.ts","sourceRoot":"","sources":["../../src/model/providerError.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,QAAQ,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AAED,4CAA4C;AAC5C,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { WEBHOOK_INBOX_STATUS } from './constants/webhookInbox.constants';
|
|
2
|
+
export interface WebhookInbox {
|
|
3
|
+
id?: number;
|
|
4
|
+
adapterCode?: string;
|
|
5
|
+
midId?: number;
|
|
6
|
+
uniqueId?: string;
|
|
7
|
+
notificationStatus?: WEBHOOK_INBOX_STATUS;
|
|
8
|
+
rawPayload?: string;
|
|
9
|
+
queueName?: string;
|
|
10
|
+
jobId?: string;
|
|
11
|
+
errorMessage?: string;
|
|
12
|
+
createdAt?: Date;
|
|
13
|
+
updatedAt?: Date;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=webhookInbox.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhookInbox.model.d.ts","sourceRoot":"","sources":["../../src/model/webhookInbox.model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE/E,MAAM,WAAW,YAAY;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
|
package/package.json
CHANGED
|
@@ -5,15 +5,15 @@ import { TRANSACTION_STATUS_FINXP } from "@/gateways/adapters/model/transactionF
|
|
|
5
5
|
export type TransactionType = TransactionFinXP;
|
|
6
6
|
|
|
7
7
|
export function isTransactionFinXP(t: Transaction): t is TransactionFinXP {
|
|
8
|
-
return t?.adapter === ADAPTERS.
|
|
8
|
+
return t?.adapter === ADAPTERS.FINXP;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export function isTransactionFinXPChargeback(t: Transaction): t is TransactionFinXPChargeback {
|
|
12
|
-
return t?.adapter === ADAPTERS.
|
|
12
|
+
return t?.adapter === ADAPTERS.FINXP;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export interface TransactionFinXP extends Transaction {
|
|
16
|
-
adapter: typeof ADAPTERS.
|
|
16
|
+
adapter: typeof ADAPTERS.FINXP;
|
|
17
17
|
provider: PROVIDERS;
|
|
18
18
|
id?: number;
|
|
19
19
|
status?: typeof TRANSACTION_STATUS_FINXP;
|
|
@@ -72,7 +72,7 @@ export interface TransactionFinXP extends Transaction {
|
|
|
72
72
|
updatedAt?: Date;
|
|
73
73
|
}
|
|
74
74
|
export interface TransactionFinXPChargeback extends Transaction {
|
|
75
|
-
adapter: typeof ADAPTERS.
|
|
75
|
+
adapter: typeof ADAPTERS.FINXP;
|
|
76
76
|
id?: number;
|
|
77
77
|
status?: string;
|
|
78
78
|
chargebackDate?: string;
|
|
@@ -3,11 +3,11 @@ import { ADAPTERS, PROVIDERS } from "../../../model/constants/gateway.constants"
|
|
|
3
3
|
import { NOVALNET_STATUS, NOVALNET_STATUS_DESC, NOVALNET_TRANSACTION_TYPE } from "@/gateways/adapters/model/transactionNovalNet.constants";
|
|
4
4
|
|
|
5
5
|
export function isTransactionNovalnet(t: Transaction): t is TransactionNovalNet {
|
|
6
|
-
return t?.adapter === ADAPTERS.
|
|
6
|
+
return t?.adapter === ADAPTERS.NOVALNET;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export interface TransactionNovalNet extends Transaction {
|
|
10
|
-
adapter: typeof ADAPTERS.
|
|
10
|
+
adapter: typeof ADAPTERS.NOVALNET;
|
|
11
11
|
provider: PROVIDERS;
|
|
12
12
|
id?: number;
|
|
13
13
|
date?: string;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export interface WebhookGenesisResponse {
|
|
2
|
-
|
|
3
|
-
}
|
|
2
|
+
uniqueId: string;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export const buildGenesisResponseXml = (response: WebhookGenesisResponse): string =>
|
|
6
|
+
`<?xml version="1.0" encoding="UTF-8"?>\n<notification_echo>\n <unique_id>${response.uniqueId}</unique_id>\n</notification_echo>`;
|
package/src/index.ts
CHANGED
|
@@ -47,6 +47,7 @@ export * from './dtos/aclSubject.request.dto';
|
|
|
47
47
|
export * from './dtos/aclAction.request.dto';
|
|
48
48
|
export * from './dtos/hostedPage.request.dto';
|
|
49
49
|
export * from './dtos/checkout.request.dto';
|
|
50
|
+
export * from './dtos/webhookInbox.request.dto';
|
|
50
51
|
|
|
51
52
|
// Export all Mappers
|
|
52
53
|
export * from './mappers/csv/csvRowDataOrder.csv.mapper';
|
|
@@ -67,6 +68,7 @@ export * from './model/constants/job.constants';
|
|
|
67
68
|
export * from './model/constants/event.constants';
|
|
68
69
|
export * from './model/constants/offer.constants';
|
|
69
70
|
export * from './model/constants/acl.constants';
|
|
71
|
+
export * from './model/constants/webhookInbox.constants';
|
|
70
72
|
|
|
71
73
|
// Export all Models
|
|
72
74
|
export * from './model/campaign.model';
|
|
@@ -103,6 +105,7 @@ export * from './model/aclSubject.model';
|
|
|
103
105
|
export * from './model/aclAction.model';
|
|
104
106
|
export * from './model/aclRolePermission.model';
|
|
105
107
|
export * from './model/hostedPage.model';
|
|
108
|
+
export * from './model/webhookInbox.model';
|
|
106
109
|
|
|
107
110
|
// Export Gateway Adapters Models
|
|
108
111
|
export * from './gateways/adapters/model/transactionEmp.model';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export const ADAPTERS = {
|
|
2
|
-
EMP: "emp",
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
EMP: "emp", // API-integrated via Genesis/RocketPay providers
|
|
3
|
+
FINXP: "finxp", // Manual (CSV import). Status: pending
|
|
4
|
+
PAYNT: "paynt", // Pending integration
|
|
5
|
+
PAYSTRAX: "paystrax", // Pending integration
|
|
6
|
+
PAY_BANK_2_BANK: "paybank2bank", // Pending integration
|
|
7
|
+
NOVALNET: "novalnet", // Manual (CSV import). All chargebacks in one place
|
|
8
8
|
UNKNOWN: "unknown",
|
|
9
9
|
ALL: "all",
|
|
10
10
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ADAPTERS } from "./constants/gateway.constants";
|
|
1
|
+
import { ADAPTERS, PROVIDERS } from "./constants/gateway.constants";
|
|
2
2
|
|
|
3
3
|
export interface ProviderError {
|
|
4
4
|
id?: number;
|
|
5
5
|
adapter: ADAPTERS;
|
|
6
|
+
provider?: PROVIDERS;
|
|
6
7
|
midId?: number;
|
|
7
8
|
orderId?: number;
|
|
8
9
|
amount?: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { WEBHOOK_INBOX_STATUS } from './constants/webhookInbox.constants';
|
|
2
|
+
|
|
3
|
+
export interface WebhookInbox {
|
|
4
|
+
id?: number;
|
|
5
|
+
adapterCode?: string;
|
|
6
|
+
midId?: number;
|
|
7
|
+
uniqueId?: string;
|
|
8
|
+
notificationStatus?: WEBHOOK_INBOX_STATUS;
|
|
9
|
+
rawPayload?: string;
|
|
10
|
+
queueName?: string;
|
|
11
|
+
jobId?: string;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
createdAt?: Date;
|
|
14
|
+
updatedAt?: Date;
|
|
15
|
+
}
|