@6thbridge/utils 1.0.6 → 1.0.8
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/lib/database/index.d.ts +7 -0
- package/lib/database/index.js +4 -1
- package/lib/database/index.js.map +1 -1
- package/lib/logger/logger.js +3 -7
- package/lib/logger/logger.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/index.js +1 -1
- package/lib/types/index.js.map +1 -1
- package/lib/types/integrations/charge.entity.d.ts +65 -0
- package/lib/types/integrations/charge.entity.js +25 -0
- package/lib/types/integrations/charge.entity.js.map +1 -0
- package/lib/types/integrations/credential.entity.d.ts +13 -0
- package/lib/types/integrations/credential.entity.js +13 -0
- package/lib/types/integrations/credential.entity.js.map +1 -0
- package/lib/types/integrations/index.d.ts +4 -0
- package/lib/types/integrations/index.js +21 -0
- package/lib/types/integrations/index.js.map +1 -0
- package/lib/types/{integration.entity.d.ts → integrations/integration.entity.d.ts} +55 -22
- package/lib/types/{integration.entity.js → integrations/integration.entity.js} +17 -24
- package/lib/types/integrations/integration.entity.js.map +1 -0
- package/lib/types/integrations/provider.entity.d.ts +37 -0
- package/lib/types/integrations/provider.entity.js +27 -0
- package/lib/types/integrations/provider.entity.js.map +1 -0
- package/lib/utils/amount.d.ts +1 -0
- package/lib/utils/amount.js +11 -0
- package/lib/utils/amount.js.map +1 -1
- package/lib/utils/phoneNumber.spec.js +9 -0
- package/lib/utils/phoneNumber.spec.js.map +1 -1
- package/package.json +3 -4
- package/lib/types/integration.entity.js.map +0 -1
package/lib/types/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export * from './user.entity';
|
|
|
3
3
|
export * from './client.entity';
|
|
4
4
|
export * from './broker.entity';
|
|
5
5
|
export * from './custom.exception';
|
|
6
|
-
export * from './
|
|
6
|
+
export * from './integrations';
|
|
7
7
|
export * from './permission';
|
|
8
8
|
export * from './route.entity';
|
|
9
9
|
export * from './user.entity';
|
package/lib/types/index.js
CHANGED
|
@@ -20,7 +20,7 @@ __exportStar(require("./user.entity"), exports);
|
|
|
20
20
|
__exportStar(require("./client.entity"), exports);
|
|
21
21
|
__exportStar(require("./broker.entity"), exports);
|
|
22
22
|
__exportStar(require("./custom.exception"), exports);
|
|
23
|
-
__exportStar(require("./
|
|
23
|
+
__exportStar(require("./integrations"), exports);
|
|
24
24
|
__exportStar(require("./permission"), exports);
|
|
25
25
|
__exportStar(require("./route.entity"), exports);
|
|
26
26
|
__exportStar(require("./user.entity"), exports);
|
package/lib/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,gDAA+B;AAC/B,kDAAiC;AACjC,kDAAiC;AACjC,qDAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,gDAA+B;AAC/B,kDAAiC;AACjC,kDAAiC;AACjC,qDAAoC;AACpC,iDAAgC;AAChC,+CAA8B;AAC9B,iDAAgC;AAChC,gDAA+B;AAC/B,kDAAiC;AACjC,4CAA0B;AAC1B,uDAAqC;AAoBrC,IAAK,aAIJ;AAJD,WAAK,aAAa;IAChB,gDAA+B,CAAA;IAC/B,gDAA+B,CAAA;IAC/B,gDAA+B,CAAA;AACjC,CAAC,EAJI,aAAa,6BAAb,aAAa,QAIjB"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export declare const ChargeType: {
|
|
2
|
+
Provider: string;
|
|
3
|
+
Platform: string;
|
|
4
|
+
VatOnFees: string;
|
|
5
|
+
Partner: string;
|
|
6
|
+
Other: string;
|
|
7
|
+
};
|
|
8
|
+
export type ChargeBearer = {
|
|
9
|
+
customer?: number;
|
|
10
|
+
merchant?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare enum ChargeBearerEnum {
|
|
13
|
+
customer = "customer",
|
|
14
|
+
merchant = "merchant"
|
|
15
|
+
}
|
|
16
|
+
export type FlatChargeEntity = {
|
|
17
|
+
percentage?: number;
|
|
18
|
+
fixed?: number;
|
|
19
|
+
};
|
|
20
|
+
export type TierChargeEntity = {
|
|
21
|
+
lowerBound?: number;
|
|
22
|
+
upperBound?: number;
|
|
23
|
+
percentage?: number;
|
|
24
|
+
fixed?: number;
|
|
25
|
+
};
|
|
26
|
+
export declare class ChargeEntity {
|
|
27
|
+
id: string;
|
|
28
|
+
clientId: string;
|
|
29
|
+
label: string;
|
|
30
|
+
type: (typeof ChargeType)[keyof typeof ChargeType];
|
|
31
|
+
tier?: TierChargeEntity[];
|
|
32
|
+
flat?: FlatChargeEntity;
|
|
33
|
+
bearer?: ChargeBearer;
|
|
34
|
+
}
|
|
35
|
+
export declare class SingleChargeResult {
|
|
36
|
+
id: string;
|
|
37
|
+
label: string;
|
|
38
|
+
type: string;
|
|
39
|
+
flat: {
|
|
40
|
+
fixed: number;
|
|
41
|
+
percentage: number;
|
|
42
|
+
total: number;
|
|
43
|
+
};
|
|
44
|
+
tier: {
|
|
45
|
+
tierLabel: string;
|
|
46
|
+
fixed: number;
|
|
47
|
+
percentage: number;
|
|
48
|
+
total: number;
|
|
49
|
+
};
|
|
50
|
+
total: number;
|
|
51
|
+
customer: number;
|
|
52
|
+
merchant: number;
|
|
53
|
+
clientId?: string;
|
|
54
|
+
}
|
|
55
|
+
export declare class ChargeResult {
|
|
56
|
+
version: number;
|
|
57
|
+
total: number;
|
|
58
|
+
customer: number;
|
|
59
|
+
merchant: number;
|
|
60
|
+
provider: number;
|
|
61
|
+
platform: number;
|
|
62
|
+
chargeBearer?: ChargeBearerEnum;
|
|
63
|
+
ownIntegration?: boolean;
|
|
64
|
+
breakdown: SingleChargeResult[];
|
|
65
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChargeResult = exports.SingleChargeResult = exports.ChargeEntity = exports.ChargeBearerEnum = exports.ChargeType = void 0;
|
|
4
|
+
exports.ChargeType = {
|
|
5
|
+
Provider: 'provider',
|
|
6
|
+
Platform: 'platform',
|
|
7
|
+
VatOnFees: 'vatOnFees',
|
|
8
|
+
Partner: 'partner',
|
|
9
|
+
Other: 'other',
|
|
10
|
+
};
|
|
11
|
+
var ChargeBearerEnum;
|
|
12
|
+
(function (ChargeBearerEnum) {
|
|
13
|
+
ChargeBearerEnum["customer"] = "customer";
|
|
14
|
+
ChargeBearerEnum["merchant"] = "merchant";
|
|
15
|
+
})(ChargeBearerEnum || (exports.ChargeBearerEnum = ChargeBearerEnum = {}));
|
|
16
|
+
class ChargeEntity {
|
|
17
|
+
}
|
|
18
|
+
exports.ChargeEntity = ChargeEntity;
|
|
19
|
+
class SingleChargeResult {
|
|
20
|
+
}
|
|
21
|
+
exports.SingleChargeResult = SingleChargeResult;
|
|
22
|
+
class ChargeResult {
|
|
23
|
+
}
|
|
24
|
+
exports.ChargeResult = ChargeResult;
|
|
25
|
+
//# sourceMappingURL=charge.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"charge.entity.js","sourceRoot":"","sources":["../../../src/types/integrations/charge.entity.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;IACtB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;CACjB,CAAC;AAOF,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,yCAAqB,CAAA;IACrB,yCAAqB,CAAA;AACzB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAaD,MAAa,YAAY;CAQxB;AARD,oCAQC;AAED,MAAa,kBAAkB;CAW9B;AAXD,gDAWC;AAGD,MAAa,YAAY;CAUxB;AAVD,oCAUC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ProviderType } from "./provider.entity";
|
|
2
|
+
export declare class CredentialEntity {
|
|
3
|
+
id: string;
|
|
4
|
+
clientId: string;
|
|
5
|
+
label: string;
|
|
6
|
+
type: ProviderType;
|
|
7
|
+
provider: string;
|
|
8
|
+
country: string;
|
|
9
|
+
isDefault: boolean;
|
|
10
|
+
authorization?: Record<string, any>;
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
static getId(credential: CredentialEntity): any;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CredentialEntity = void 0;
|
|
4
|
+
class CredentialEntity {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.isDefault = false;
|
|
7
|
+
}
|
|
8
|
+
static getId(credential) {
|
|
9
|
+
return credential._id || credential.id;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.CredentialEntity = CredentialEntity;
|
|
13
|
+
//# sourceMappingURL=credential.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential.entity.js","sourceRoot":"","sources":["../../../src/types/integrations/credential.entity.ts"],"names":[],"mappings":";;;AAEA,MAAa,gBAAgB;IAA7B;QAOI,cAAS,GAAY,KAAK,CAAC;IAQ/B,CAAC;IAHG,MAAM,CAAC,KAAK,CAAC,UAA4B;QACrC,OAAO,UAAU,CAAC,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC;IAC3C,CAAC;CACJ;AAfD,4CAeC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./charge.entity"), exports);
|
|
18
|
+
__exportStar(require("./credential.entity"), exports);
|
|
19
|
+
__exportStar(require("./provider.entity"), exports);
|
|
20
|
+
__exportStar(require("./integration.entity"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/integrations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,sDAAmC;AACnC,oDAAiC;AACjC,uDAAoC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { ChargeEntity, ChargeResult } from "./charge.entity";
|
|
2
|
+
import { CredentialEntity } from "./credential.entity";
|
|
3
|
+
import { ProviderType } from "./provider.entity";
|
|
1
4
|
export declare enum IntegrationPaymentMode {
|
|
2
5
|
POSTPAID = "postpaid",
|
|
3
6
|
PREPAID = "prepaid"
|
|
@@ -6,44 +9,32 @@ export declare enum IntegrationChargeBearerEnum {
|
|
|
6
9
|
merchant = "merchant",
|
|
7
10
|
customer = "customer"
|
|
8
11
|
}
|
|
9
|
-
export declare enum IntegrationType {
|
|
10
|
-
Notification = "notification",
|
|
11
|
-
File = "file",
|
|
12
|
-
Payment = "payment",
|
|
13
|
-
Authentication = "authentication",
|
|
14
|
-
Disbursement = "disbursement"
|
|
15
|
-
}
|
|
16
12
|
export declare enum IntegrationStatus {
|
|
17
13
|
active = "active",
|
|
18
14
|
suspended = "suspended",
|
|
19
15
|
deleted = "deleted"
|
|
20
16
|
}
|
|
21
|
-
export
|
|
17
|
+
export declare class IntegrationEntity extends CredentialEntity {
|
|
22
18
|
clientId: string;
|
|
23
|
-
type:
|
|
19
|
+
type: ProviderType;
|
|
24
20
|
logo?: string;
|
|
25
21
|
channel: string;
|
|
26
22
|
provider: string;
|
|
23
|
+
senderId?: string;
|
|
27
24
|
label: string;
|
|
28
|
-
fields: any[];
|
|
29
|
-
integrationType: string;
|
|
30
|
-
integrationId?: string;
|
|
31
25
|
integrationOwnerClientId?: string;
|
|
32
26
|
channels?: string[];
|
|
33
27
|
currencies?: string[];
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
webhook: string;
|
|
37
|
-
isDefault: boolean;
|
|
28
|
+
currency?: string;
|
|
29
|
+
country: string;
|
|
38
30
|
description?: string;
|
|
39
|
-
providerWebhook: string;
|
|
40
|
-
providerWebhookId: string;
|
|
41
31
|
authorization?: any;
|
|
32
|
+
chargeIds?: string[];
|
|
42
33
|
status: IntegrationStatus;
|
|
34
|
+
integrationLabel?: string;
|
|
43
35
|
[x: string]: any;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
36
|
+
static getIntegrationLabel(integration: IntegrationEntity): string;
|
|
37
|
+
}
|
|
47
38
|
export declare enum IntegrationChargeType {
|
|
48
39
|
fixed = "fixed",
|
|
49
40
|
percentage = "percentage"
|
|
@@ -93,5 +84,47 @@ export declare class IntegrationCharge {
|
|
|
93
84
|
fixed: number;
|
|
94
85
|
} | IntegrationChargeEntity;
|
|
95
86
|
VATOnChargeAndFees?: IntegrationChargeEntity;
|
|
96
|
-
|
|
87
|
+
}
|
|
88
|
+
export declare enum TrafficAction {
|
|
89
|
+
REJECT = "REJECT",
|
|
90
|
+
QUEUE = "QUEUE"
|
|
91
|
+
}
|
|
92
|
+
export declare class TrafficControlEntity {
|
|
93
|
+
id: string;
|
|
94
|
+
country: string | null;
|
|
95
|
+
provider: string | null;
|
|
96
|
+
clientId: string | null;
|
|
97
|
+
type: ProviderType | null;
|
|
98
|
+
action?: TrafficAction;
|
|
99
|
+
statusDescription: string | null;
|
|
100
|
+
deletedAt?: Date | null;
|
|
101
|
+
[x: string]: any;
|
|
102
|
+
}
|
|
103
|
+
export interface SecuredIntegrationResponse extends IntegrationEntity {
|
|
104
|
+
id: string;
|
|
105
|
+
clientId: string;
|
|
106
|
+
type: ProviderType;
|
|
107
|
+
provider: string;
|
|
108
|
+
logo?: string;
|
|
109
|
+
label: string;
|
|
110
|
+
channel: string;
|
|
111
|
+
webhook?: string;
|
|
112
|
+
channels?: string[];
|
|
113
|
+
currencies?: string[];
|
|
114
|
+
currency?: string;
|
|
115
|
+
country: string;
|
|
116
|
+
description?: string;
|
|
117
|
+
isOwnKeys: boolean;
|
|
118
|
+
credentials: CredentialEntity;
|
|
119
|
+
charge: IntegrationCharge | null;
|
|
120
|
+
charges: ChargeEntity[];
|
|
121
|
+
routingData?: Record<string, any>;
|
|
122
|
+
authorization?: Record<string, any>;
|
|
123
|
+
isRouted?: boolean;
|
|
124
|
+
integrationOwnerClientId: string;
|
|
125
|
+
credentialId?: string;
|
|
126
|
+
credentialLabel?: string;
|
|
127
|
+
logId?: string;
|
|
128
|
+
chargeResult?: ChargeResult;
|
|
129
|
+
trafficControl?: TrafficControlEntity;
|
|
97
130
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IntegrationCharge = exports.IntegrationChargeBearer = exports.IntegrationChargeEntity = exports.IntegrationChargeType = exports.
|
|
3
|
+
exports.TrafficControlEntity = exports.TrafficAction = exports.IntegrationCharge = exports.IntegrationChargeBearer = exports.IntegrationChargeEntity = exports.IntegrationChargeType = exports.IntegrationEntity = exports.IntegrationStatus = exports.IntegrationChargeBearerEnum = exports.IntegrationPaymentMode = void 0;
|
|
4
|
+
const credential_entity_1 = require("./credential.entity");
|
|
5
|
+
const provider_entity_1 = require("./provider.entity");
|
|
4
6
|
var IntegrationPaymentMode;
|
|
5
7
|
(function (IntegrationPaymentMode) {
|
|
6
8
|
IntegrationPaymentMode["POSTPAID"] = "postpaid";
|
|
@@ -11,20 +13,18 @@ var IntegrationChargeBearerEnum;
|
|
|
11
13
|
IntegrationChargeBearerEnum["merchant"] = "merchant";
|
|
12
14
|
IntegrationChargeBearerEnum["customer"] = "customer";
|
|
13
15
|
})(IntegrationChargeBearerEnum || (exports.IntegrationChargeBearerEnum = IntegrationChargeBearerEnum = {}));
|
|
14
|
-
var IntegrationType;
|
|
15
|
-
(function (IntegrationType) {
|
|
16
|
-
IntegrationType["Notification"] = "notification";
|
|
17
|
-
IntegrationType["File"] = "file";
|
|
18
|
-
IntegrationType["Payment"] = "payment";
|
|
19
|
-
IntegrationType["Authentication"] = "authentication";
|
|
20
|
-
IntegrationType["Disbursement"] = "disbursement";
|
|
21
|
-
})(IntegrationType || (exports.IntegrationType = IntegrationType = {}));
|
|
22
16
|
var IntegrationStatus;
|
|
23
17
|
(function (IntegrationStatus) {
|
|
24
18
|
IntegrationStatus["active"] = "active";
|
|
25
19
|
IntegrationStatus["suspended"] = "suspended";
|
|
26
20
|
IntegrationStatus["deleted"] = "deleted";
|
|
27
21
|
})(IntegrationStatus || (exports.IntegrationStatus = IntegrationStatus = {}));
|
|
22
|
+
class IntegrationEntity extends credential_entity_1.CredentialEntity {
|
|
23
|
+
static getIntegrationLabel(integration) {
|
|
24
|
+
return `${integration.label || integration.provider} - ${integration.type == provider_entity_1.ProviderType.Payment ? 'Collection' : integration.type} - ${integration.country}`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.IntegrationEntity = IntegrationEntity;
|
|
28
28
|
var IntegrationChargeType;
|
|
29
29
|
(function (IntegrationChargeType) {
|
|
30
30
|
IntegrationChargeType["fixed"] = "fixed";
|
|
@@ -41,21 +41,14 @@ class IntegrationChargeBearer {
|
|
|
41
41
|
}
|
|
42
42
|
exports.IntegrationChargeBearer = IntegrationChargeBearer;
|
|
43
43
|
class IntegrationCharge {
|
|
44
|
-
static getEmptyChargeEntity(override) {
|
|
45
|
-
return Object.assign({ bearer: { merchant: 100, customer: 0 }, platform: {
|
|
46
|
-
type: IntegrationChargeType.flat,
|
|
47
|
-
value: {
|
|
48
|
-
percentage: 0.5,
|
|
49
|
-
fixed: 0,
|
|
50
|
-
},
|
|
51
|
-
}, provider: {
|
|
52
|
-
type: IntegrationChargeType.flat,
|
|
53
|
-
value: {
|
|
54
|
-
percentage: 0,
|
|
55
|
-
fixed: 0,
|
|
56
|
-
},
|
|
57
|
-
} }, override);
|
|
58
|
-
}
|
|
59
44
|
}
|
|
60
45
|
exports.IntegrationCharge = IntegrationCharge;
|
|
46
|
+
var TrafficAction;
|
|
47
|
+
(function (TrafficAction) {
|
|
48
|
+
TrafficAction["REJECT"] = "REJECT";
|
|
49
|
+
TrafficAction["QUEUE"] = "QUEUE";
|
|
50
|
+
})(TrafficAction || (exports.TrafficAction = TrafficAction = {}));
|
|
51
|
+
class TrafficControlEntity {
|
|
52
|
+
}
|
|
53
|
+
exports.TrafficControlEntity = TrafficControlEntity;
|
|
61
54
|
//# sourceMappingURL=integration.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration.entity.js","sourceRoot":"","sources":["../../../src/types/integrations/integration.entity.ts"],"names":[],"mappings":";;;AACA,2DAAqD;AACrD,uDAA+C;AAE/C,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAC9B,+CAAqB,CAAA;IACrB,6CAAmB,CAAA;AACvB,CAAC,EAHW,sBAAsB,sCAAtB,sBAAsB,QAGjC;AAED,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACnC,oDAAqB,CAAA;IACrB,oDAAqB,CAAA;AACzB,CAAC,EAHW,2BAA2B,2CAA3B,2BAA2B,QAGtC;AAED,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IACzB,sCAAiB,CAAA;IACjB,4CAAuB,CAAA;IACvB,wCAAmB,CAAA;AACvB,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B;AAED,MAAa,iBAAkB,SAAQ,oCAAgB;IAuBnD,MAAM,CAAC,mBAAmB,CAAC,WAA8B;QACrD,OAAO,GAAG,WAAW,CAAC,KAAK,IAAI,WAAW,CAAC,QAAQ,MAAM,WAAW,CAAC,IAAI,IAAI,8BAAY,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC;IACnK,CAAC;CACJ;AA1BD,8CA0BC;AAED,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC7B,wCAAe,CAAA;IACf,kDAAyB,CAAA;AAC7B,CAAC,EAHW,qBAAqB,qCAArB,qBAAqB,QAGhC;AAGD,WAAY,qBAAqB;IAC7B,sCAAa,CAAA;IACb,sCAAa,CAAA;AACjB,CAAC,EAHW,qBAAqB,qCAArB,qBAAqB,QAGhC;AAcD,MAAa,uBAAuB;CAGnC;AAHD,0DAGC;AAED,MAAa,uBAAuB;CAGnC;AAHD,0DAGC;AAED,MAAa,iBAAiB;CAW7B;AAXD,8CAWC;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,kCAAiB,CAAA;IACjB,gCAAe,CAAA;AACnB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AACD,MAAa,oBAAoB;CAUhC;AAVD,oDAUC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare class ProviderField {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
required: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare enum ProviderStatus {
|
|
8
|
+
active = "active",
|
|
9
|
+
inactive = "inactive"
|
|
10
|
+
}
|
|
11
|
+
export declare enum ProviderType {
|
|
12
|
+
Notification = "notification",
|
|
13
|
+
File = "file",
|
|
14
|
+
Payment = "payment",
|
|
15
|
+
Authentication = "authentication",
|
|
16
|
+
Disbursement = "disbursement"
|
|
17
|
+
}
|
|
18
|
+
export declare class ProviderEntity {
|
|
19
|
+
label: string;
|
|
20
|
+
type: ProviderType;
|
|
21
|
+
group?: string;
|
|
22
|
+
provider: string;
|
|
23
|
+
homeURL: string;
|
|
24
|
+
logo: string;
|
|
25
|
+
channels: string[];
|
|
26
|
+
currencies?: string[];
|
|
27
|
+
currency?: string;
|
|
28
|
+
country?: string;
|
|
29
|
+
fields: ProviderField[];
|
|
30
|
+
description?: string;
|
|
31
|
+
webhook: boolean;
|
|
32
|
+
supportsPlatformKeyUsage?: boolean;
|
|
33
|
+
supportsOwnKeyUsage?: boolean;
|
|
34
|
+
isVisible?: boolean;
|
|
35
|
+
status?: ProviderStatus;
|
|
36
|
+
[x: string]: any;
|
|
37
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProviderEntity = exports.ProviderType = exports.ProviderStatus = exports.ProviderField = void 0;
|
|
4
|
+
class ProviderField {
|
|
5
|
+
}
|
|
6
|
+
exports.ProviderField = ProviderField;
|
|
7
|
+
var ProviderStatus;
|
|
8
|
+
(function (ProviderStatus) {
|
|
9
|
+
ProviderStatus["active"] = "active";
|
|
10
|
+
ProviderStatus["inactive"] = "inactive";
|
|
11
|
+
})(ProviderStatus || (exports.ProviderStatus = ProviderStatus = {}));
|
|
12
|
+
var ProviderType;
|
|
13
|
+
(function (ProviderType) {
|
|
14
|
+
ProviderType["Notification"] = "notification";
|
|
15
|
+
ProviderType["File"] = "file";
|
|
16
|
+
ProviderType["Payment"] = "payment";
|
|
17
|
+
ProviderType["Authentication"] = "authentication";
|
|
18
|
+
ProviderType["Disbursement"] = "disbursement";
|
|
19
|
+
})(ProviderType || (exports.ProviderType = ProviderType = {}));
|
|
20
|
+
class ProviderEntity {
|
|
21
|
+
constructor() {
|
|
22
|
+
this.isVisible = true;
|
|
23
|
+
this.status = ProviderStatus.active;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.ProviderEntity = ProviderEntity;
|
|
27
|
+
//# sourceMappingURL=provider.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.entity.js","sourceRoot":"","sources":["../../../src/types/integrations/provider.entity.ts"],"names":[],"mappings":";;;AACA,MAAa,aAAa;CAKzB;AALD,sCAKC;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,uCAAqB,CAAA;AACvB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,6CAA6B,CAAA;IAC7B,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;AAC/B,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB;AACD,MAAa,cAAc;IAA3B;QAgBE,cAAS,GAAa,IAAI,CAAC;QAC3B,WAAM,GAAoB,cAAc,CAAC,MAAM,CAAC;IAGlD,CAAC;CAAA;AApBD,wCAoBC"}
|
package/lib/utils/amount.d.ts
CHANGED
|
@@ -25,5 +25,6 @@ export declare class AmountUtil {
|
|
|
25
25
|
static processAmount(currency: string, amount: number): number;
|
|
26
26
|
static convertAmountToMinorValue(amount: number): number;
|
|
27
27
|
static convertAmountToMajorValue(amount: number): number;
|
|
28
|
+
static getCurrencyFromCountry(countryCode: string): string;
|
|
28
29
|
}
|
|
29
30
|
export {};
|
package/lib/utils/amount.js
CHANGED
|
@@ -28,6 +28,14 @@ exports.symbols = {
|
|
|
28
28
|
XAF: 'FCFA',
|
|
29
29
|
GHS: 'GH₵', //ghana cedis
|
|
30
30
|
};
|
|
31
|
+
const countryCurrencyMap = {
|
|
32
|
+
CI: 'XOF',
|
|
33
|
+
CM: 'XAF',
|
|
34
|
+
GN: 'GNF',
|
|
35
|
+
ML: 'XOF',
|
|
36
|
+
BJ: 'XOF',
|
|
37
|
+
TG: 'XOF',
|
|
38
|
+
};
|
|
31
39
|
const localeMap = {
|
|
32
40
|
XOF: 'fr',
|
|
33
41
|
XAF: 'fr',
|
|
@@ -115,6 +123,9 @@ class AmountUtil {
|
|
|
115
123
|
static convertAmountToMajorValue(amount) {
|
|
116
124
|
return new bignumber_js_1.default(amount).dividedBy(100).toNumber();
|
|
117
125
|
}
|
|
126
|
+
static getCurrencyFromCountry(countryCode) {
|
|
127
|
+
return countryCurrencyMap[countryCode] || countryCode;
|
|
128
|
+
}
|
|
118
129
|
}
|
|
119
130
|
exports.AmountUtil = AmountUtil;
|
|
120
131
|
//# sourceMappingURL=amount.js.map
|
package/lib/utils/amount.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"amount.js","sourceRoot":"","sources":["../../src/utils/amount.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AAExB,QAAA,+BAA+B,GAAG,CAAC,KAAK,EAAE,KAAK,EAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AAC7D,QAAA,0BAA0B,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAC5C,QAAA,OAAO,GAA4B;IAC5C,GAAG,EAAE,GAAG,EAAE,YAAY;IACtB,GAAG,EAAE,GAAG,EAAE,OAAO;IACjB,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,GAAG,EAAE,oBAAoB;IAC9B,GAAG,EAAE,GAAG,EAAE,yBAAyB;IACnC,GAAG,EAAE,GAAG,EAAE,qBAAqB;IAC/B,GAAG,EAAE,GAAG,EAAE,eAAe;IACzB,GAAG,EAAE,GAAG,EAAE,eAAe;IACzB,GAAG,EAAE,GAAG,EAAE,mBAAmB;IAC7B,GAAG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,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC9D,CAAC;IAED,MAAM,CAAC,yBAAyB,CAAC,MAAc;QAC3C,OAAO,IAAI,sBAAS,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC3D,CAAC;IAED,MAAM,CAAC,sBAAsB,CAAC,WAAmB;QAC7C,OAAO,kBAAkB,CAAC,WAAW,CAAC,IAAI,WAAW,CAAC;IAC1D,CAAC;CAEJ;AAjGD,gCAiGC"}
|
|
@@ -55,6 +55,15 @@ describe('Phone Number Test', () => {
|
|
|
55
55
|
const isPhoneNumberValid = phoneNumber_1.PhoneNumberUtil.isPhoneNumberPossible(phoneNumber, 'CI');
|
|
56
56
|
expect(isPhoneNumberValid).toBe(true);
|
|
57
57
|
});
|
|
58
|
+
it('should format benin number', function () {
|
|
59
|
+
let phoneNumber = '116690237';
|
|
60
|
+
const formattedPhoneNumber = phoneNumber_1.PhoneNumberUtil.formatPhoneNumber({
|
|
61
|
+
phoneNumber,
|
|
62
|
+
countryCode: "BJ"
|
|
63
|
+
}, {});
|
|
64
|
+
console.log("formattedPhoneNumber", formattedPhoneNumber);
|
|
65
|
+
// expect(isPhoneNumberValid).toBe(true);
|
|
66
|
+
});
|
|
58
67
|
});
|
|
59
68
|
});
|
|
60
69
|
//# sourceMappingURL=phoneNumber.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phoneNumber.spec.js","sourceRoot":"","sources":["../../src/utils/phoneNumber.spec.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,+CAA8C;AAE9C,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,iDAAiD;IACjD,6EAA6E;IAC7E,gDAAgD;IAChD,oEAAoE;IACpE,uCAAuC;IACvC,QAAQ;IACR,EAAE;IACF,gEAAgE;IAChE,2DAA2D;IAC3D,0E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B,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;YACpF,MAAM,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,oEAAoE,EAAE;YACvE,IAAI,WAAW,GAAW,kBAAkB,CAAC;YAC7C,MAAM,kBAAkB,GAAG,6BAAe,CAAC,qBAAqB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;YACpF,MAAM,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,kDAAkD,EAAE;YACrD,IAAI,WAAW,GAAW,eAAe,CAAC;YAC1C,MAAM,kBAAkB,GAAG,6BAAe,CAAC,qBAAqB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;YACpF,MAAM,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QAED,EAAE,CAAC,4BAA4B,EAAE;YAC7B,IAAI,WAAW,GAAW,WAAW,CAAC;YACtC,MAAM,oBAAoB,GAAG,6BAAe,CAAC,iBAAiB,CAAC;gBAC3D,WAAW;gBACX,WAAW,EAAE,IAAI;aACpB,EAAE,EAAE,CAAC,CAAC;YAEP,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,oBAAoB,CAAC,CAAC;YAC1D,yCAAyC;QAC7C,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@6thbridge/utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "simple interface for the our commonly used functions",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -24,9 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "ISC",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@aws-sdk/client-secrets-manager": "^3.687.0",
|
|
28
27
|
"@opentelemetry/api": "^1.9.0",
|
|
29
|
-
"@opentelemetry/auto-instrumentations-node": "^0.
|
|
28
|
+
"@opentelemetry/auto-instrumentations-node": "^0.62.2",
|
|
30
29
|
"amqp-connection-manager": "^4.1.14",
|
|
31
30
|
"amqplib": "^0.10.8",
|
|
32
31
|
"apitoolkit-express": "^2.4.6",
|
|
@@ -37,7 +36,7 @@
|
|
|
37
36
|
"dayjs": "^1.11.13",
|
|
38
37
|
"ioredis": "^5.6.1",
|
|
39
38
|
"joi": "^17.13.3",
|
|
40
|
-
"libphonenumber-js": "^1.12.
|
|
39
|
+
"libphonenumber-js": "^1.12.17",
|
|
41
40
|
"lodash": "^4.17.21",
|
|
42
41
|
"mongoose": "^8.16.5",
|
|
43
42
|
"mongoose-paginate-v2": "^1.9.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integration.entity.js","sourceRoot":"","sources":["../../src/types/integration.entity.ts"],"names":[],"mappings":";;;AAAA,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,+CAAqB,CAAA;IACrB,6CAAmB,CAAA;AACrB,CAAC,EAHW,sBAAsB,sCAAtB,sBAAsB,QAGjC;AAED,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,oDAAqB,CAAA;IACrB,oDAAqB,CAAA;AACvB,CAAC,EAHW,2BAA2B,2CAA3B,2BAA2B,QAGtC;AAED,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,gDAA6B,CAAA;IAC7B,gCAAa,CAAA;IACb,sCAAmB,CAAA;IACnB,oDAAiC,CAAA;IACjC,gDAA6B,CAAA;AAC/B,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B;AAED,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,4CAAuB,CAAA;IAC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