@rocketlink/crm-model 1.0.24 → 1.0.26
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/csvRow.request.dto.d.ts +2 -0
- package/dist/dtos/csvRow.request.dto.d.ts.map +1 -1
- package/dist/dtos/mid.request.dto.d.ts +11 -0
- package/dist/dtos/mid.request.dto.d.ts.map +1 -0
- package/dist/dtos/mid.request.dto.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/model/transaction.model.d.ts +0 -1
- package/dist/model/transaction.model.d.ts.map +1 -1
- package/package.json +28 -28
- package/src/dtos/base.request.dto.ts +3 -3
- package/src/dtos/campaign.request.dto.ts +4 -4
- package/src/dtos/category.request.dto.ts +8 -8
- package/src/dtos/common/base.request.dto.ts +4 -4
- package/src/dtos/common/paginated.request.dto.ts +6 -6
- package/src/dtos/common/paginated.response.dto.ts +11 -11
- package/src/dtos/csv.request.dto.ts +8 -8
- package/src/dtos/csv.response.dto.ts +9 -9
- package/src/dtos/csvRow.request.dto.ts +16 -14
- package/src/dtos/empTransactions.request.dto.ts +5 -5
- package/src/dtos/event.request.dto.ts +9 -9
- package/src/dtos/fastify.d.ts +18 -18
- package/src/dtos/field.request.dto.ts +4 -4
- package/src/dtos/hook.request.dto.ts +9 -9
- package/src/dtos/hookProfile.request.dto.ts +7 -7
- package/src/dtos/lead.request.dto.ts +11 -11
- package/src/dtos/mid.request.dto.ts +11 -0
- package/src/dtos/offer.request.dto.ts +15 -15
- package/src/dtos/order.request.dto.ts +22 -22
- package/src/dtos/product.request.dto.ts +9 -9
- package/src/dtos/subscription.request.dto.ts +20 -20
- package/src/dtos/transaction.request.dto.ts +13 -13
- package/src/dtos/transactionError.request.dto.ts +9 -9
- package/src/gateways/adapters/dtos/transaction-emp.request.dto.ts +21 -21
- package/src/gateways/adapters/dtos/transaction-finxp.request.dto.ts +9 -9
- package/src/gateways/adapters/dtos/transaction-novalnet.request.dto.ts +21 -21
- package/src/gateways/adapters/model/transactionEmp.model.ts +223 -223
- package/src/gateways/adapters/model/transactionFinXP.model.ts +193 -193
- package/src/gateways/adapters/model/transactionNovalNet.model.ts +224 -224
- package/src/gateways/providers/model/genesis.constants.ts +30 -30
- package/src/gateways/providers/model/genesis.model.ts +89 -89
- package/src/gateways/providers/model/novalNetManual.model.ts +119 -119
- package/src/index.ts +65 -64
- package/src/model/campaign.model.ts +15 -15
- package/src/model/category.model.ts +7 -7
- package/src/model/csv.model.ts +76 -76
- package/src/model/empTransactions.model.ts +8 -8
- package/src/model/event.model.ts +6 -6
- package/src/model/fastify.d.ts +18 -18
- package/src/model/field.model.ts +16 -16
- package/src/model/gateway.model.ts +49 -49
- package/src/model/hook.model.ts +12 -12
- package/src/model/hookOutbox.model.ts +12 -12
- package/src/model/hookProfile.model.ts +18 -18
- package/src/model/lead.model.ts +28 -28
- package/src/model/mid.model.ts +25 -25
- package/src/model/offer.model.ts +25 -25
- package/src/model/order.model.ts +40 -40
- package/src/model/paymentData.model.ts +58 -58
- package/src/model/product.model.ts +11 -11
- package/src/model/subscription.model.ts +28 -28
- package/src/model/transaction.model.ts +30 -30
- package/src/model/transactionError.model.ts +16 -16
- package/src/util/constants.ts +105 -105
- package/src/util/dateUtils.ts +71 -71
- package/tsconfig.json +27 -27
package/src/model/csv.model.ts
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { CSV_TYPES, CSVRowStatusTypes, CSVStatusTypes } from "../util/constants";
|
|
2
|
-
|
|
3
|
-
export interface CSV {
|
|
4
|
-
id?: number;
|
|
5
|
-
fileName: string;
|
|
6
|
-
uploadedFileUrl: string;
|
|
7
|
-
fileRows?: number;
|
|
8
|
-
doneRows?: number;
|
|
9
|
-
failedRows?: number;
|
|
10
|
-
status: CSVStatusTypes; // UPLOADED | PROCESSING | DONE
|
|
11
|
-
type?: CSV_TYPES;
|
|
12
|
-
csvRows?: CSVRow[];
|
|
13
|
-
createdAt?: Date;
|
|
14
|
-
updatedAt?: Date;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface CSVRow {
|
|
18
|
-
id?: number;
|
|
19
|
-
csvId?: number;
|
|
20
|
-
csv?: CSV;
|
|
21
|
-
rowIndex?: number; // 1..N (data row index)
|
|
22
|
-
payload?: Record<string, any>; // the row content (firstName, email, etc)
|
|
23
|
-
status?: CSVRowStatusTypes; // -- QUEUED | DONE | FAILED
|
|
24
|
-
errorMessage?: string;
|
|
25
|
-
createdAt?: Date;
|
|
26
|
-
updatedAt?: Date;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// firstName,lastName,address1,address2,city,state,country,zipCode,phone,email,iban,bic,offerId
|
|
30
|
-
export interface OrderCSVRow {
|
|
31
|
-
csvId?: number;
|
|
32
|
-
id?: number;
|
|
33
|
-
firstName?: string;
|
|
34
|
-
lastName?: string;
|
|
35
|
-
address1?: string;
|
|
36
|
-
address2?: string;
|
|
37
|
-
city?: string;
|
|
38
|
-
state?: string;
|
|
39
|
-
country?: string;
|
|
40
|
-
zipCode?: string;
|
|
41
|
-
phone?: string;
|
|
42
|
-
email?: string;
|
|
43
|
-
iban?: string;
|
|
44
|
-
bic?: string;
|
|
45
|
-
offerId?: number;
|
|
46
|
-
campaignId?: number;
|
|
47
|
-
createdAt?: Date;
|
|
48
|
-
updatedAt?: Date;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export const ordersCSVColumnsMapper: Partial<Record<keyof OrderCSVRow, string>> = {
|
|
52
|
-
firstName: "first Name",
|
|
53
|
-
lastName: "last Name",
|
|
54
|
-
address1: "address1",
|
|
55
|
-
address2: "address2",
|
|
56
|
-
city: "city",
|
|
57
|
-
state: "state",
|
|
58
|
-
country: "country",
|
|
59
|
-
zipCode: "zipCode",
|
|
60
|
-
phone: "phone",
|
|
61
|
-
email: "email",
|
|
62
|
-
iban: "iban",
|
|
63
|
-
bic: "bic",
|
|
64
|
-
offerId: "offer Id",
|
|
65
|
-
campaignId: "campaignId",
|
|
66
|
-
};
|
|
67
|
-
export const ordersCSVColumnKeys = Object.keys(ordersCSVColumnsMapper);
|
|
68
|
-
export const ordersCSVColumnValues = Object.values(ordersCSVColumnsMapper);
|
|
69
|
-
|
|
70
|
-
export interface SubscriptionIdCSVRow {
|
|
71
|
-
subscriptionId: number;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export const subscriptionIdCSVColumnMapper: Partial<Record<keyof SubscriptionIdCSVRow, string>> = {
|
|
75
|
-
subscriptionId: "subscriptionId"
|
|
76
|
-
};
|
|
1
|
+
import { CSV_TYPES, CSVRowStatusTypes, CSVStatusTypes } from "../util/constants";
|
|
2
|
+
|
|
3
|
+
export interface CSV {
|
|
4
|
+
id?: number;
|
|
5
|
+
fileName: string;
|
|
6
|
+
uploadedFileUrl: string;
|
|
7
|
+
fileRows?: number;
|
|
8
|
+
doneRows?: number;
|
|
9
|
+
failedRows?: number;
|
|
10
|
+
status: CSVStatusTypes; // UPLOADED | PROCESSING | DONE
|
|
11
|
+
type?: CSV_TYPES;
|
|
12
|
+
csvRows?: CSVRow[];
|
|
13
|
+
createdAt?: Date;
|
|
14
|
+
updatedAt?: Date;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface CSVRow {
|
|
18
|
+
id?: number;
|
|
19
|
+
csvId?: number;
|
|
20
|
+
csv?: CSV;
|
|
21
|
+
rowIndex?: number; // 1..N (data row index)
|
|
22
|
+
payload?: Record<string, any>; // the row content (firstName, email, etc)
|
|
23
|
+
status?: CSVRowStatusTypes; // -- QUEUED | DONE | FAILED
|
|
24
|
+
errorMessage?: string;
|
|
25
|
+
createdAt?: Date;
|
|
26
|
+
updatedAt?: Date;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// firstName,lastName,address1,address2,city,state,country,zipCode,phone,email,iban,bic,offerId
|
|
30
|
+
export interface OrderCSVRow {
|
|
31
|
+
csvId?: number;
|
|
32
|
+
id?: number;
|
|
33
|
+
firstName?: string;
|
|
34
|
+
lastName?: string;
|
|
35
|
+
address1?: string;
|
|
36
|
+
address2?: string;
|
|
37
|
+
city?: string;
|
|
38
|
+
state?: string;
|
|
39
|
+
country?: string;
|
|
40
|
+
zipCode?: string;
|
|
41
|
+
phone?: string;
|
|
42
|
+
email?: string;
|
|
43
|
+
iban?: string;
|
|
44
|
+
bic?: string;
|
|
45
|
+
offerId?: number;
|
|
46
|
+
campaignId?: number;
|
|
47
|
+
createdAt?: Date;
|
|
48
|
+
updatedAt?: Date;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export const ordersCSVColumnsMapper: Partial<Record<keyof OrderCSVRow, string>> = {
|
|
52
|
+
firstName: "first Name",
|
|
53
|
+
lastName: "last Name",
|
|
54
|
+
address1: "address1",
|
|
55
|
+
address2: "address2",
|
|
56
|
+
city: "city",
|
|
57
|
+
state: "state",
|
|
58
|
+
country: "country",
|
|
59
|
+
zipCode: "zipCode",
|
|
60
|
+
phone: "phone",
|
|
61
|
+
email: "email",
|
|
62
|
+
iban: "iban",
|
|
63
|
+
bic: "bic",
|
|
64
|
+
offerId: "offer Id",
|
|
65
|
+
campaignId: "campaignId",
|
|
66
|
+
};
|
|
67
|
+
export const ordersCSVColumnKeys = Object.keys(ordersCSVColumnsMapper);
|
|
68
|
+
export const ordersCSVColumnValues = Object.values(ordersCSVColumnsMapper);
|
|
69
|
+
|
|
70
|
+
export interface SubscriptionIdCSVRow {
|
|
71
|
+
subscriptionId: number;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const subscriptionIdCSVColumnMapper: Partial<Record<keyof SubscriptionIdCSVRow, string>> = {
|
|
75
|
+
subscriptionId: "subscriptionId"
|
|
76
|
+
};
|
|
77
77
|
export const subscriptionIdCSVColumnKeys = Object.keys(subscriptionIdCSVColumnMapper);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export interface EMPTransaction {
|
|
2
|
-
id: number;
|
|
3
|
-
orderId?: number;
|
|
4
|
-
customerId?: number;
|
|
5
|
-
amount?: number;
|
|
6
|
-
currency?: string;
|
|
7
|
-
createdAt?: Date;
|
|
8
|
-
updatedAt?: Date;
|
|
1
|
+
export interface EMPTransaction {
|
|
2
|
+
id: number;
|
|
3
|
+
orderId?: number;
|
|
4
|
+
customerId?: number;
|
|
5
|
+
amount?: number;
|
|
6
|
+
currency?: string;
|
|
7
|
+
createdAt?: Date;
|
|
8
|
+
updatedAt?: Date;
|
|
9
9
|
}
|
package/src/model/event.model.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export interface Event {
|
|
2
|
-
id?: string;
|
|
3
|
-
name?: string;
|
|
4
|
-
createdAt: Date;
|
|
5
|
-
updatedAt?: Date;
|
|
6
|
-
}
|
|
1
|
+
export interface Event {
|
|
2
|
+
id?: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
createdAt: Date;
|
|
5
|
+
updatedAt?: Date;
|
|
6
|
+
}
|
package/src/model/fastify.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { FastifyReply, FastifyRequest, RouteGenericInterface } from "fastify";
|
|
2
|
-
import "@fastify/jwt";
|
|
3
|
-
import "@fastify/mysql";
|
|
4
|
-
|
|
5
|
-
declare module '@fastify/jwt' {
|
|
6
|
-
interface FastifyJWT {
|
|
7
|
-
payload: { id: number; email: string };
|
|
8
|
-
user: { id: number; email: string };
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module "fastify" {
|
|
13
|
-
interface FastifyInstance {
|
|
14
|
-
authenticate: <T extends RouteGenericInterface = RouteGenericInterface>(
|
|
15
|
-
request: FastifyRequest<T>,
|
|
16
|
-
reply: FastifyReply
|
|
17
|
-
) => Promise<void>;
|
|
18
|
-
}
|
|
1
|
+
import { FastifyReply, FastifyRequest, RouteGenericInterface } from "fastify";
|
|
2
|
+
import "@fastify/jwt";
|
|
3
|
+
import "@fastify/mysql";
|
|
4
|
+
|
|
5
|
+
declare module '@fastify/jwt' {
|
|
6
|
+
interface FastifyJWT {
|
|
7
|
+
payload: { id: number; email: string };
|
|
8
|
+
user: { id: number; email: string };
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module "fastify" {
|
|
13
|
+
interface FastifyInstance {
|
|
14
|
+
authenticate: <T extends RouteGenericInterface = RouteGenericInterface>(
|
|
15
|
+
request: FastifyRequest<T>,
|
|
16
|
+
reply: FastifyReply
|
|
17
|
+
) => Promise<void>;
|
|
18
|
+
}
|
|
19
19
|
}
|
package/src/model/field.model.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export interface Field {
|
|
2
|
-
id?: number;
|
|
3
|
-
name: string;
|
|
4
|
-
dbTable: string;
|
|
5
|
-
dbColumn: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
createdAt: Date;
|
|
8
|
-
updatedAt?: Date;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface HookField {
|
|
12
|
-
id?: number;
|
|
13
|
-
hookId?: number;
|
|
14
|
-
fieldId?: number;
|
|
15
|
-
createdAt: Date;
|
|
16
|
-
updatedAt?: Date;
|
|
1
|
+
export interface Field {
|
|
2
|
+
id?: number;
|
|
3
|
+
name: string;
|
|
4
|
+
dbTable: string;
|
|
5
|
+
dbColumn: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
createdAt: Date;
|
|
8
|
+
updatedAt?: Date;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface HookField {
|
|
12
|
+
id?: number;
|
|
13
|
+
hookId?: number;
|
|
14
|
+
fieldId?: number;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
updatedAt?: Date;
|
|
17
17
|
}
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
export const BANKS = {
|
|
2
|
-
EMP: "emp", // status pending
|
|
3
|
-
finXP: "finxp", // manual. status pending.
|
|
4
|
-
Paynt: "paynt",
|
|
5
|
-
Paystrax: "paystrax",
|
|
6
|
-
PayBank2Bank: "paybank2bank",
|
|
7
|
-
Novalnet: "novalnet", //manual. all in un place CB
|
|
8
|
-
UNKNOWN: "unknown",
|
|
9
|
-
ALL: "all",
|
|
10
|
-
};
|
|
11
|
-
export const BANK_NAME_VALUES = Object.values(BANKS);
|
|
12
|
-
export type BANKS = (typeof BANKS)[keyof typeof BANKS];
|
|
13
|
-
|
|
14
|
-
export interface Adapter {
|
|
15
|
-
id?: number;
|
|
16
|
-
name?: BANKS;
|
|
17
|
-
description?: string;
|
|
18
|
-
apiIntegrated?: boolean;
|
|
19
|
-
createdAt?: Date;
|
|
20
|
-
updatedAt?: Date;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const PROVIDERS = {
|
|
24
|
-
ACI: "aci",
|
|
25
|
-
IXOPAY: "ixopay",
|
|
26
|
-
PayBank2Bank: "paybank2bank",
|
|
27
|
-
Genesis: "genesis",
|
|
28
|
-
};
|
|
29
|
-
export type PROVIDERS = (typeof BANKS)[keyof typeof BANKS];
|
|
30
|
-
|
|
31
|
-
export interface Provider {
|
|
32
|
-
id: number;
|
|
33
|
-
name: PROVIDERS;
|
|
34
|
-
description: string;
|
|
35
|
-
webhookUrl?: string;
|
|
36
|
-
webhookMethod?: string;
|
|
37
|
-
webhookToken?: string;
|
|
38
|
-
createdAt?: Date;
|
|
39
|
-
updatedAt?: Date;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface ProviderAdapter {
|
|
43
|
-
id?: number;
|
|
44
|
-
adapterId?: number;
|
|
45
|
-
adapter?: Adapter;
|
|
46
|
-
providerId?: number;
|
|
47
|
-
provider?: Provider;
|
|
48
|
-
createdAt?: Date;
|
|
49
|
-
updatedAt?: Date;
|
|
1
|
+
export const BANKS = {
|
|
2
|
+
EMP: "emp", // status pending
|
|
3
|
+
finXP: "finxp", // manual. status pending.
|
|
4
|
+
Paynt: "paynt",
|
|
5
|
+
Paystrax: "paystrax",
|
|
6
|
+
PayBank2Bank: "paybank2bank",
|
|
7
|
+
Novalnet: "novalnet", //manual. all in un place CB
|
|
8
|
+
UNKNOWN: "unknown",
|
|
9
|
+
ALL: "all",
|
|
10
|
+
};
|
|
11
|
+
export const BANK_NAME_VALUES = Object.values(BANKS);
|
|
12
|
+
export type BANKS = (typeof BANKS)[keyof typeof BANKS];
|
|
13
|
+
|
|
14
|
+
export interface Adapter {
|
|
15
|
+
id?: number;
|
|
16
|
+
name?: BANKS;
|
|
17
|
+
description?: string;
|
|
18
|
+
apiIntegrated?: boolean;
|
|
19
|
+
createdAt?: Date;
|
|
20
|
+
updatedAt?: Date;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const PROVIDERS = {
|
|
24
|
+
ACI: "aci",
|
|
25
|
+
IXOPAY: "ixopay",
|
|
26
|
+
PayBank2Bank: "paybank2bank",
|
|
27
|
+
Genesis: "genesis",
|
|
28
|
+
};
|
|
29
|
+
export type PROVIDERS = (typeof BANKS)[keyof typeof BANKS];
|
|
30
|
+
|
|
31
|
+
export interface Provider {
|
|
32
|
+
id: number;
|
|
33
|
+
name: PROVIDERS;
|
|
34
|
+
description: string;
|
|
35
|
+
webhookUrl?: string;
|
|
36
|
+
webhookMethod?: string;
|
|
37
|
+
webhookToken?: string;
|
|
38
|
+
createdAt?: Date;
|
|
39
|
+
updatedAt?: Date;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface ProviderAdapter {
|
|
43
|
+
id?: number;
|
|
44
|
+
adapterId?: number;
|
|
45
|
+
adapter?: Adapter;
|
|
46
|
+
providerId?: number;
|
|
47
|
+
provider?: Provider;
|
|
48
|
+
createdAt?: Date;
|
|
49
|
+
updatedAt?: Date;
|
|
50
50
|
}
|
package/src/model/hook.model.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Event } from "./event.model";
|
|
2
|
-
import { Field } from "./field.model";
|
|
3
|
-
|
|
4
|
-
export interface Hook {
|
|
5
|
-
id?: number;
|
|
6
|
-
name?: string;
|
|
7
|
-
eventId?: string;
|
|
8
|
-
url?: string;
|
|
9
|
-
event?: Event;
|
|
10
|
-
fields?: Field[];
|
|
11
|
-
createdAt: Date;
|
|
12
|
-
updatedAt?: Date;
|
|
1
|
+
import { Event } from "./event.model";
|
|
2
|
+
import { Field } from "./field.model";
|
|
3
|
+
|
|
4
|
+
export interface Hook {
|
|
5
|
+
id?: number;
|
|
6
|
+
name?: string;
|
|
7
|
+
eventId?: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
event?: Event;
|
|
10
|
+
fields?: Field[];
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
updatedAt?: Date;
|
|
13
13
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export interface HookOutbox {
|
|
2
|
-
id?: number;
|
|
3
|
-
hookId?: number;
|
|
4
|
-
campaignId?: number;
|
|
5
|
-
triggerId?: string;
|
|
6
|
-
payloadJson?: string;
|
|
7
|
-
status?: string;
|
|
8
|
-
statusDescription?: string;
|
|
9
|
-
attempts?: number;
|
|
10
|
-
createdAt?: Date;
|
|
11
|
-
updatedAt?: Date;
|
|
12
|
-
}
|
|
1
|
+
export interface HookOutbox {
|
|
2
|
+
id?: number;
|
|
3
|
+
hookId?: number;
|
|
4
|
+
campaignId?: number;
|
|
5
|
+
triggerId?: string;
|
|
6
|
+
payloadJson?: string;
|
|
7
|
+
status?: string;
|
|
8
|
+
statusDescription?: string;
|
|
9
|
+
attempts?: number;
|
|
10
|
+
createdAt?: Date;
|
|
11
|
+
updatedAt?: Date;
|
|
12
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import type { Hook } from "./hook.model";
|
|
2
|
-
|
|
3
|
-
export interface HookProfile {
|
|
4
|
-
id: number;
|
|
5
|
-
name: string;
|
|
6
|
-
type?: string;
|
|
7
|
-
hooks: Hook[];
|
|
8
|
-
createdAt: Date;
|
|
9
|
-
updatedAt?: Date;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface HookProfilesHooks {
|
|
13
|
-
id?: number;
|
|
14
|
-
hookProfileId?: number;
|
|
15
|
-
hookId?: number;
|
|
16
|
-
hook?: Hook;
|
|
17
|
-
createdAt: Date;
|
|
18
|
-
updatedAt?: Date;
|
|
1
|
+
import type { Hook } from "./hook.model";
|
|
2
|
+
|
|
3
|
+
export interface HookProfile {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
type?: string;
|
|
7
|
+
hooks: Hook[];
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
updatedAt?: Date;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface HookProfilesHooks {
|
|
13
|
+
id?: number;
|
|
14
|
+
hookProfileId?: number;
|
|
15
|
+
hookId?: number;
|
|
16
|
+
hook?: Hook;
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
updatedAt?: Date;
|
|
19
19
|
}
|
package/src/model/lead.model.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { REGISTRATION_MODE } from "../util/constants";
|
|
2
|
-
import { PaymentDataType } from "./paymentData.model";
|
|
3
|
-
import { CSVRow } from "./csv.model";
|
|
4
|
-
|
|
5
|
-
export interface Lead {
|
|
6
|
-
id?: number;
|
|
7
|
-
isCustomer?: boolean;
|
|
8
|
-
visitId?: number;
|
|
9
|
-
csvRowId?: number;
|
|
10
|
-
csvId?: number;
|
|
11
|
-
firstName?: string;
|
|
12
|
-
lastName?: string;
|
|
13
|
-
email?: string;
|
|
14
|
-
phoneNumber?: string;
|
|
15
|
-
address1?: string;
|
|
16
|
-
address2?: string;
|
|
17
|
-
street?: string;
|
|
18
|
-
city?: string;
|
|
19
|
-
state?: string;
|
|
20
|
-
country?: string;
|
|
21
|
-
zipCode?: string;
|
|
22
|
-
registrationMode?: REGISTRATION_MODE;
|
|
23
|
-
// customerId?: number;
|
|
24
|
-
paymentData?: PaymentDataType;
|
|
25
|
-
csvRow?: CSVRow;
|
|
26
|
-
createdAt?: Date;
|
|
27
|
-
updatedAt?: Date;
|
|
28
|
-
}
|
|
1
|
+
import { REGISTRATION_MODE } from "../util/constants";
|
|
2
|
+
import { PaymentDataType } from "./paymentData.model";
|
|
3
|
+
import { CSVRow } from "./csv.model";
|
|
4
|
+
|
|
5
|
+
export interface Lead {
|
|
6
|
+
id?: number;
|
|
7
|
+
isCustomer?: boolean;
|
|
8
|
+
visitId?: number;
|
|
9
|
+
csvRowId?: number;
|
|
10
|
+
csvId?: number;
|
|
11
|
+
firstName?: string;
|
|
12
|
+
lastName?: string;
|
|
13
|
+
email?: string;
|
|
14
|
+
phoneNumber?: string;
|
|
15
|
+
address1?: string;
|
|
16
|
+
address2?: string;
|
|
17
|
+
street?: string;
|
|
18
|
+
city?: string;
|
|
19
|
+
state?: string;
|
|
20
|
+
country?: string;
|
|
21
|
+
zipCode?: string;
|
|
22
|
+
registrationMode?: REGISTRATION_MODE;
|
|
23
|
+
// customerId?: number;
|
|
24
|
+
paymentData?: PaymentDataType;
|
|
25
|
+
csvRow?: CSVRow;
|
|
26
|
+
createdAt?: Date;
|
|
27
|
+
updatedAt?: Date;
|
|
28
|
+
}
|
package/src/model/mid.model.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { ProviderAdapter } from "./gateway.model";
|
|
2
|
-
|
|
3
|
-
export const MID_STATE = {
|
|
4
|
-
ACTIVE: 'ACTIVE',
|
|
5
|
-
TERMINATED: 'TERMINATED'
|
|
6
|
-
};
|
|
7
|
-
export type MID_STATE = (typeof MID_STATE)[keyof typeof MID_STATE];
|
|
8
|
-
|
|
9
|
-
export interface Mid {
|
|
10
|
-
id?: number;
|
|
11
|
-
name?: string;
|
|
12
|
-
providerAdapterId?: number;
|
|
13
|
-
providerAdapter?: ProviderAdapter;
|
|
14
|
-
currency?: string;
|
|
15
|
-
state?: MID_STATE;
|
|
16
|
-
descriptor?: string;
|
|
17
|
-
midAuth?: MidAuth;
|
|
18
|
-
createdAt?: Date;
|
|
19
|
-
updatedAt?: Date;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface MidAuth {
|
|
23
|
-
username: string;
|
|
24
|
-
password: string;
|
|
25
|
-
token: string;
|
|
1
|
+
import { ProviderAdapter } from "./gateway.model";
|
|
2
|
+
|
|
3
|
+
export const MID_STATE = {
|
|
4
|
+
ACTIVE: 'ACTIVE',
|
|
5
|
+
TERMINATED: 'TERMINATED'
|
|
6
|
+
};
|
|
7
|
+
export type MID_STATE = (typeof MID_STATE)[keyof typeof MID_STATE];
|
|
8
|
+
|
|
9
|
+
export interface Mid {
|
|
10
|
+
id?: number;
|
|
11
|
+
name?: string;
|
|
12
|
+
providerAdapterId?: number;
|
|
13
|
+
providerAdapter?: ProviderAdapter;
|
|
14
|
+
currency?: string;
|
|
15
|
+
state?: MID_STATE;
|
|
16
|
+
descriptor?: string;
|
|
17
|
+
midAuth?: MidAuth;
|
|
18
|
+
createdAt?: Date;
|
|
19
|
+
updatedAt?: Date;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface MidAuth {
|
|
23
|
+
username: string;
|
|
24
|
+
password: string;
|
|
25
|
+
token: string;
|
|
26
26
|
}
|
package/src/model/offer.model.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { OFFER_TYPE } from '../util/constants';
|
|
2
|
-
import { Campaign } from './campaign.model';
|
|
3
|
-
import { Mid } from './mid.model';
|
|
4
|
-
import { Product } from './product.model';
|
|
5
|
-
|
|
6
|
-
export interface Offer {
|
|
7
|
-
id?: number;
|
|
8
|
-
name?: string;
|
|
9
|
-
type?: OFFER_TYPE;
|
|
10
|
-
productId?: number;
|
|
11
|
-
product?: Product;
|
|
12
|
-
oneTimePayment?: boolean;
|
|
13
|
-
price?: number;
|
|
14
|
-
currency?: string;
|
|
15
|
-
trialPrice?: number;
|
|
16
|
-
trialIntervalUnit?: string;
|
|
17
|
-
trialPeriod?: string;
|
|
18
|
-
midId?: number;
|
|
19
|
-
mid?: Mid;
|
|
20
|
-
midRouterId?: string;
|
|
21
|
-
campaignId?: number;
|
|
22
|
-
campaign?: Campaign;
|
|
23
|
-
recurringSettingId?: string;
|
|
24
|
-
createdAt?: Date;
|
|
25
|
-
updatedAt?: Date;
|
|
1
|
+
import { OFFER_TYPE } from '../util/constants';
|
|
2
|
+
import { Campaign } from './campaign.model';
|
|
3
|
+
import { Mid } from './mid.model';
|
|
4
|
+
import { Product } from './product.model';
|
|
5
|
+
|
|
6
|
+
export interface Offer {
|
|
7
|
+
id?: number;
|
|
8
|
+
name?: string;
|
|
9
|
+
type?: OFFER_TYPE;
|
|
10
|
+
productId?: number;
|
|
11
|
+
product?: Product;
|
|
12
|
+
oneTimePayment?: boolean;
|
|
13
|
+
price?: number;
|
|
14
|
+
currency?: string;
|
|
15
|
+
trialPrice?: number;
|
|
16
|
+
trialIntervalUnit?: string;
|
|
17
|
+
trialPeriod?: string;
|
|
18
|
+
midId?: number;
|
|
19
|
+
mid?: Mid;
|
|
20
|
+
midRouterId?: string;
|
|
21
|
+
campaignId?: number;
|
|
22
|
+
campaign?: Campaign;
|
|
23
|
+
recurringSettingId?: string;
|
|
24
|
+
createdAt?: Date;
|
|
25
|
+
updatedAt?: Date;
|
|
26
26
|
}
|