gm-mcp 2.0.5 → 2.0.6
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.
|
@@ -66,10 +66,12 @@ const BASE_REQUIRED_CRITERIA = {
|
|
|
66
66
|
outstanding_balance: "0",
|
|
67
67
|
parnter_contract_expirity: "Not yet expired",
|
|
68
68
|
time_sheet: "The data exists",
|
|
69
|
-
geofencing_status: "??",
|
|
70
69
|
};
|
|
71
70
|
const EWA_02_CRITERIA = Object.assign(Object.assign({}, BASE_REQUIRED_CRITERIA), { dda: "REGISTERED" });
|
|
72
71
|
const EWA_03_CRITERIA = Object.assign(Object.assign({}, BASE_REQUIRED_CRITERIA), { dda: "REGISTERED" });
|
|
72
|
+
const formatter = (record) => {
|
|
73
|
+
return Object.keys(record).map(key => `${key}: ${record[key]}`).join(',');
|
|
74
|
+
};
|
|
73
75
|
function accessibleTool(phoneNumber) {
|
|
74
76
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
77
|
try {
|
|
@@ -117,7 +119,11 @@ function accessibleTool(phoneNumber) {
|
|
|
117
119
|
current_information: currentInformation,
|
|
118
120
|
valid_information: requiredCriteria,
|
|
119
121
|
};
|
|
120
|
-
|
|
122
|
+
const result = `
|
|
123
|
+
Customer ${customer.customer_full_name}, partner name ${customer.partner_name} has these informations: ${formatter(currentInformation)}
|
|
124
|
+
Eligibility Criteria for Salary Advances: ${formatter(requiredCriteria)}
|
|
125
|
+
`;
|
|
126
|
+
return { content: [{ type: "text", text: result }] };
|
|
121
127
|
}
|
|
122
128
|
catch (error) {
|
|
123
129
|
return {
|
package/package.json
CHANGED
|
@@ -67,7 +67,6 @@ const BASE_REQUIRED_CRITERIA = {
|
|
|
67
67
|
outstanding_balance: "0",
|
|
68
68
|
parnter_contract_expirity: "Not yet expired",
|
|
69
69
|
time_sheet: "The data exists",
|
|
70
|
-
geofencing_status: "??",
|
|
71
70
|
};
|
|
72
71
|
|
|
73
72
|
const EWA_02_CRITERIA = {
|
|
@@ -80,6 +79,10 @@ const EWA_03_CRITERIA = {
|
|
|
80
79
|
dda: "REGISTERED",
|
|
81
80
|
};
|
|
82
81
|
|
|
82
|
+
const formatter = (record:Record<string,any>) => {
|
|
83
|
+
return Object.keys(record).map(key => `${key}: ${record[key]}`).join(',')
|
|
84
|
+
}
|
|
85
|
+
|
|
83
86
|
export async function accessibleTool(phoneNumber: string): Promise<CallToolResult> {
|
|
84
87
|
try {
|
|
85
88
|
const customer = await findCustomerEWAByPhonenumber(phoneNumber);
|
|
@@ -132,7 +135,12 @@ export async function accessibleTool(phoneNumber: string): Promise<CallToolResul
|
|
|
132
135
|
valid_information: requiredCriteria,
|
|
133
136
|
};
|
|
134
137
|
|
|
135
|
-
|
|
138
|
+
const result = `
|
|
139
|
+
Customer ${customer.customer_full_name}, partner name ${customer.partner_name} has these informations: ${formatter(currentInformation)}
|
|
140
|
+
Eligibility Criteria for Salary Advances: ${formatter(requiredCriteria)}
|
|
141
|
+
`
|
|
142
|
+
|
|
143
|
+
return { content: [{ type: "text", text: result }] };
|
|
136
144
|
} catch (error) {
|
|
137
145
|
return {
|
|
138
146
|
content: [
|