@cliniq360/ondc-cli 1.0.1 → 2.0.2
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/README.md +29 -18
- package/dist/api-client.d.ts +10 -0
- package/dist/api-client.d.ts.map +1 -0
- package/dist/api-client.js +72 -0
- package/dist/api-client.js.map +1 -0
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +12 -7
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/forms.d.ts.map +1 -1
- package/dist/commands/forms.js +2 -2
- package/dist/commands/forms.js.map +1 -1
- package/dist/commands/journey.d.ts.map +1 -1
- package/dist/commands/journey.js +1 -1
- package/dist/commands/journey.js.map +1 -1
- package/dist/commands/offers.js +1 -1
- package/dist/commands/orders.d.ts.map +1 -1
- package/dist/commands/orders.js +1 -1
- package/dist/commands/orders.js.map +1 -1
- package/dist/commands/policy.d.ts.map +1 -1
- package/dist/commands/policy.js +1 -1
- package/dist/commands/policy.js.map +1 -1
- package/dist/commands/tools.js +4 -4
- package/dist/commands/tools.js.map +1 -1
- package/dist/config.d.ts +8 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +62 -10
- package/dist/config.js.map +1 -1
- package/dist/main.js +4 -4
- package/dist/main.js.map +1 -1
- package/dist/output.d.ts +4 -3
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +1 -38
- package/dist/output.js.map +1 -1
- package/dist/prompts.d.ts +1 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +8 -11
- package/dist/prompts.js.map +1 -1
- package/dist/tool-registry.d.ts +38 -0
- package/dist/tool-registry.d.ts.map +1 -0
- package/dist/tool-registry.js +566 -0
- package/dist/tool-registry.js.map +1 -0
- package/package.json +3 -4
- package/dist/mcp-client.d.ts +0 -7
- package/dist/mcp-client.d.ts.map +0 -1
- package/dist/mcp-client.js +0 -58
- package/dist/mcp-client.js.map +0 -1
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
const defaultAnnotations = {
|
|
2
|
+
readOnlyHint: false,
|
|
3
|
+
destructiveHint: false,
|
|
4
|
+
openWorldHint: true,
|
|
5
|
+
};
|
|
6
|
+
const readOnlyAnnotations = {
|
|
7
|
+
...defaultAnnotations,
|
|
8
|
+
readOnlyHint: true,
|
|
9
|
+
};
|
|
10
|
+
const destructiveAnnotations = {
|
|
11
|
+
...defaultAnnotations,
|
|
12
|
+
destructiveHint: true,
|
|
13
|
+
};
|
|
14
|
+
function objectSchema(properties, required = []) {
|
|
15
|
+
return {
|
|
16
|
+
type: "object",
|
|
17
|
+
properties,
|
|
18
|
+
...(required.length ? { required } : {}),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function buildIndividualInfoBody(fields) {
|
|
22
|
+
return { individualInfo: fields };
|
|
23
|
+
}
|
|
24
|
+
function buildFamilyFloaterBody(fields) {
|
|
25
|
+
return { familyFloaterInfo: fields };
|
|
26
|
+
}
|
|
27
|
+
function buildBuyerInfoBody(coreFields, questionnaire) {
|
|
28
|
+
return { buyerInfo: { ...coreFields, ...questionnaire } };
|
|
29
|
+
}
|
|
30
|
+
function buildNomineeBody(fields) {
|
|
31
|
+
return { nomineeDetails: fields };
|
|
32
|
+
}
|
|
33
|
+
const memberFieldProperties = {
|
|
34
|
+
firstName: { type: "string", description: "First name of the member" },
|
|
35
|
+
lastName: { type: "string", description: "Last name of the member" },
|
|
36
|
+
email: { type: "string", description: "Email address" },
|
|
37
|
+
phone: {
|
|
38
|
+
type: "string",
|
|
39
|
+
description: "10-digit Indian mobile number (no country code)",
|
|
40
|
+
},
|
|
41
|
+
address: { type: "string", description: "Full residential address" },
|
|
42
|
+
gender: { type: "string", description: "M, F, or O" },
|
|
43
|
+
dob: { type: "string", description: "Date of birth as YYYY-MM-DD" },
|
|
44
|
+
amount: { type: "string", description: "Coverage amount requested" },
|
|
45
|
+
pincode: { type: "string", description: "6-digit Indian PIN code" },
|
|
46
|
+
heightfoot: { type: "string", description: "Height in feet (0-8)" },
|
|
47
|
+
heightinch: { type: "string", description: "Height in inches (0-11)" },
|
|
48
|
+
weight: { type: "string", description: "Weight in kg" },
|
|
49
|
+
relation: {
|
|
50
|
+
type: "string",
|
|
51
|
+
default: "self",
|
|
52
|
+
description: "Relation: self, spouse, son, daughter, mother, father",
|
|
53
|
+
},
|
|
54
|
+
PED: {
|
|
55
|
+
type: "string",
|
|
56
|
+
default: "No",
|
|
57
|
+
description: "Pre-existing disease: Yes or No",
|
|
58
|
+
},
|
|
59
|
+
diabetes: {
|
|
60
|
+
type: "string",
|
|
61
|
+
default: "false",
|
|
62
|
+
description: "Has diabetes: true or false as string",
|
|
63
|
+
},
|
|
64
|
+
bloodPressure: {
|
|
65
|
+
type: "string",
|
|
66
|
+
default: "false",
|
|
67
|
+
description: "Has blood pressure: true or false as string",
|
|
68
|
+
},
|
|
69
|
+
heartAilments: {
|
|
70
|
+
type: "string",
|
|
71
|
+
default: "false",
|
|
72
|
+
description: "Has heart ailments: true or false as string",
|
|
73
|
+
},
|
|
74
|
+
other: {
|
|
75
|
+
type: "string",
|
|
76
|
+
default: "false",
|
|
77
|
+
description: "Has other PED: true or false as string",
|
|
78
|
+
},
|
|
79
|
+
panIndia: {
|
|
80
|
+
type: "string",
|
|
81
|
+
default: "true",
|
|
82
|
+
description: "Pan-India coverage: true or false as string",
|
|
83
|
+
},
|
|
84
|
+
politicallyExposedPerson: {
|
|
85
|
+
type: "string",
|
|
86
|
+
default: "false",
|
|
87
|
+
description: "Is a politically exposed person: true or false as string",
|
|
88
|
+
},
|
|
89
|
+
gstin: {
|
|
90
|
+
type: "string",
|
|
91
|
+
default: "",
|
|
92
|
+
description: "GSTIN if applicable, otherwise empty string",
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
const toolDefinitions = [
|
|
96
|
+
{
|
|
97
|
+
name: "start-insurance-journey",
|
|
98
|
+
title: "Start Insurance Journey",
|
|
99
|
+
description: "Create a new ONDC insurance transaction or resume an existing one with a known txn_id.",
|
|
100
|
+
inputSchema: objectSchema({
|
|
101
|
+
txn_id: {
|
|
102
|
+
type: "string",
|
|
103
|
+
description: "Existing transaction ID for resume or refresh",
|
|
104
|
+
},
|
|
105
|
+
}),
|
|
106
|
+
annotations: defaultAnnotations,
|
|
107
|
+
execute: (client, args) => client.post("/v1/insurance/search", {
|
|
108
|
+
environment: "PROD",
|
|
109
|
+
user_id: "1",
|
|
110
|
+
txn_id: args.txn_id,
|
|
111
|
+
}),
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "trigger-insurance-search",
|
|
115
|
+
title: "Trigger Insurance Search",
|
|
116
|
+
description: "Trigger offer discovery after applicant submission and verify acknowledgement before listing offers.",
|
|
117
|
+
inputSchema: objectSchema({
|
|
118
|
+
txn_id: {
|
|
119
|
+
type: "string",
|
|
120
|
+
description: "Insurance transaction ID from start-insurance-journey",
|
|
121
|
+
},
|
|
122
|
+
}, ["txn_id"]),
|
|
123
|
+
annotations: defaultAnnotations,
|
|
124
|
+
execute: (client, args) => client.post("/v1/insurance/search", {
|
|
125
|
+
environment: "PROD",
|
|
126
|
+
txn_id: args.txn_id,
|
|
127
|
+
}),
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "submit-applicant-form",
|
|
131
|
+
title: "Submit Applicant Form",
|
|
132
|
+
description: "Submit applicant details for a single insured member.",
|
|
133
|
+
inputSchema: objectSchema({
|
|
134
|
+
txn_id: { type: "string", description: "Insurance transaction ID" },
|
|
135
|
+
...memberFieldProperties,
|
|
136
|
+
}, [
|
|
137
|
+
"txn_id",
|
|
138
|
+
"firstName",
|
|
139
|
+
"lastName",
|
|
140
|
+
"email",
|
|
141
|
+
"phone",
|
|
142
|
+
"address",
|
|
143
|
+
"gender",
|
|
144
|
+
"dob",
|
|
145
|
+
"amount",
|
|
146
|
+
"pincode",
|
|
147
|
+
"heightfoot",
|
|
148
|
+
"heightinch",
|
|
149
|
+
"weight",
|
|
150
|
+
]),
|
|
151
|
+
annotations: defaultAnnotations,
|
|
152
|
+
execute: (client, args) => {
|
|
153
|
+
const { txn_id, ...fields } = args;
|
|
154
|
+
return client.post("/v1/insurance/submitForm", { txn_id }, buildIndividualInfoBody(fields));
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: "submit-family-floater-form",
|
|
159
|
+
title: "Submit Family Floater Form",
|
|
160
|
+
description: "Submit applicant details for two or more insured members.",
|
|
161
|
+
inputSchema: objectSchema({
|
|
162
|
+
txn_id: { type: "string", description: "Insurance transaction ID" },
|
|
163
|
+
id: {
|
|
164
|
+
type: "array",
|
|
165
|
+
items: { type: "number" },
|
|
166
|
+
description: "Sequential member indices, e.g. [0, 1, 2]",
|
|
167
|
+
},
|
|
168
|
+
firstName: {
|
|
169
|
+
type: "array",
|
|
170
|
+
items: { type: "string" },
|
|
171
|
+
description: "First names array, one per member",
|
|
172
|
+
},
|
|
173
|
+
lastName: {
|
|
174
|
+
type: "array",
|
|
175
|
+
items: { type: "string" },
|
|
176
|
+
description: "Last names array",
|
|
177
|
+
},
|
|
178
|
+
email: {
|
|
179
|
+
type: "array",
|
|
180
|
+
items: { type: "string" },
|
|
181
|
+
description: "Emails array",
|
|
182
|
+
},
|
|
183
|
+
phone: {
|
|
184
|
+
type: "array",
|
|
185
|
+
items: { type: "string" },
|
|
186
|
+
description: "10-digit phone numbers array",
|
|
187
|
+
},
|
|
188
|
+
address: {
|
|
189
|
+
type: "array",
|
|
190
|
+
items: { type: "string" },
|
|
191
|
+
description: "Addresses array",
|
|
192
|
+
},
|
|
193
|
+
gender: {
|
|
194
|
+
type: "array",
|
|
195
|
+
items: { type: "string" },
|
|
196
|
+
description: "Genders array (M/F/O)",
|
|
197
|
+
},
|
|
198
|
+
dob: {
|
|
199
|
+
type: "array",
|
|
200
|
+
items: { type: "string" },
|
|
201
|
+
description: "Dates of birth array (YYYY-MM-DD)",
|
|
202
|
+
},
|
|
203
|
+
amount: {
|
|
204
|
+
type: "array",
|
|
205
|
+
items: { type: "string" },
|
|
206
|
+
description: "Coverage amounts array",
|
|
207
|
+
},
|
|
208
|
+
pincode: {
|
|
209
|
+
type: "array",
|
|
210
|
+
items: { type: "string" },
|
|
211
|
+
description: "PIN codes array",
|
|
212
|
+
},
|
|
213
|
+
heightfoot: {
|
|
214
|
+
type: "array",
|
|
215
|
+
items: { type: "string" },
|
|
216
|
+
description: "Heights in feet array",
|
|
217
|
+
},
|
|
218
|
+
heightinch: {
|
|
219
|
+
type: "array",
|
|
220
|
+
items: { type: "string" },
|
|
221
|
+
description: "Heights in inches array",
|
|
222
|
+
},
|
|
223
|
+
weight: {
|
|
224
|
+
type: "array",
|
|
225
|
+
items: { type: "string" },
|
|
226
|
+
description: "Weights array",
|
|
227
|
+
},
|
|
228
|
+
relation: {
|
|
229
|
+
type: "array",
|
|
230
|
+
items: { type: "string" },
|
|
231
|
+
description: "Relations array",
|
|
232
|
+
},
|
|
233
|
+
PED: {
|
|
234
|
+
type: "array",
|
|
235
|
+
items: { type: "string" },
|
|
236
|
+
description: "Pre-existing disease array (Yes/No)",
|
|
237
|
+
},
|
|
238
|
+
diabetes: {
|
|
239
|
+
type: "array",
|
|
240
|
+
items: { type: "string" },
|
|
241
|
+
description: "Diabetes flags array",
|
|
242
|
+
},
|
|
243
|
+
bloodPressure: {
|
|
244
|
+
type: "array",
|
|
245
|
+
items: { type: "string" },
|
|
246
|
+
description: "Blood pressure flags array",
|
|
247
|
+
},
|
|
248
|
+
heartAilments: {
|
|
249
|
+
type: "array",
|
|
250
|
+
items: { type: "string" },
|
|
251
|
+
description: "Heart ailments flags array",
|
|
252
|
+
},
|
|
253
|
+
other: {
|
|
254
|
+
type: "array",
|
|
255
|
+
items: { type: "string" },
|
|
256
|
+
description: "Other PED flags array",
|
|
257
|
+
},
|
|
258
|
+
panIndia: {
|
|
259
|
+
type: "array",
|
|
260
|
+
items: { type: "string" },
|
|
261
|
+
description: "Pan-India flags array",
|
|
262
|
+
},
|
|
263
|
+
politicallyExposedPerson: {
|
|
264
|
+
type: "array",
|
|
265
|
+
items: { type: "string" },
|
|
266
|
+
description: "Politically exposed flags array",
|
|
267
|
+
},
|
|
268
|
+
gstin: {
|
|
269
|
+
type: "array",
|
|
270
|
+
items: { type: "string" },
|
|
271
|
+
description: "GSTIN values array",
|
|
272
|
+
},
|
|
273
|
+
}, [
|
|
274
|
+
"txn_id",
|
|
275
|
+
"id",
|
|
276
|
+
"firstName",
|
|
277
|
+
"lastName",
|
|
278
|
+
"email",
|
|
279
|
+
"phone",
|
|
280
|
+
"address",
|
|
281
|
+
"gender",
|
|
282
|
+
"dob",
|
|
283
|
+
"amount",
|
|
284
|
+
"pincode",
|
|
285
|
+
"heightfoot",
|
|
286
|
+
"heightinch",
|
|
287
|
+
"weight",
|
|
288
|
+
]),
|
|
289
|
+
annotations: defaultAnnotations,
|
|
290
|
+
execute: (client, args) => {
|
|
291
|
+
const { txn_id, ...fields } = args;
|
|
292
|
+
return client.post("/v1/insurance/submitForm", { txn_id: txn_id }, buildFamilyFloaterBody(fields));
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: "submit-buyer-form",
|
|
297
|
+
title: "Submit Buyer Form",
|
|
298
|
+
description: "Submit buyer details after the order enters the buyer phase.",
|
|
299
|
+
inputSchema: objectSchema({
|
|
300
|
+
txn_id: { type: "string", description: "Insurance transaction ID" },
|
|
301
|
+
offer_item_id: {
|
|
302
|
+
type: "string",
|
|
303
|
+
description: "Selected insurance offer item ID",
|
|
304
|
+
},
|
|
305
|
+
firstName: { type: "string", description: "Buyer first name" },
|
|
306
|
+
lastName: { type: "string", description: "Buyer last name" },
|
|
307
|
+
address: { type: "string", description: "Buyer full address" },
|
|
308
|
+
dob: { type: "string", description: "Date of birth YYYY-MM-DD" },
|
|
309
|
+
gender: { type: "string", description: "M, F, or O" },
|
|
310
|
+
email: { type: "string", description: "Email address" },
|
|
311
|
+
phone: { type: "string", description: "10-digit phone number" },
|
|
312
|
+
politicallyExposedPerson: {
|
|
313
|
+
type: "string",
|
|
314
|
+
default: "false",
|
|
315
|
+
description: "true or false as string",
|
|
316
|
+
},
|
|
317
|
+
gstin: {
|
|
318
|
+
type: "string",
|
|
319
|
+
default: "",
|
|
320
|
+
description: "GSTIN if applicable",
|
|
321
|
+
},
|
|
322
|
+
relation: {
|
|
323
|
+
type: "string",
|
|
324
|
+
default: "self",
|
|
325
|
+
description: "Relation to primary member",
|
|
326
|
+
},
|
|
327
|
+
questionnaire: {
|
|
328
|
+
type: "object",
|
|
329
|
+
description: "Insurer questionnaire answers as key-value pairs",
|
|
330
|
+
},
|
|
331
|
+
}, [
|
|
332
|
+
"txn_id",
|
|
333
|
+
"offer_item_id",
|
|
334
|
+
"firstName",
|
|
335
|
+
"lastName",
|
|
336
|
+
"address",
|
|
337
|
+
"dob",
|
|
338
|
+
"gender",
|
|
339
|
+
"email",
|
|
340
|
+
"phone",
|
|
341
|
+
]),
|
|
342
|
+
annotations: defaultAnnotations,
|
|
343
|
+
execute: (client, args) => {
|
|
344
|
+
const { txn_id, offer_item_id, questionnaire, ...coreFields } = args;
|
|
345
|
+
return client.post("/v1/insurance/submitForm", { txn_id: txn_id, offer_item_id: offer_item_id }, buildBuyerInfoBody(coreFields, questionnaire));
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
name: "submit-nominee-form",
|
|
350
|
+
title: "Submit Nominee Form",
|
|
351
|
+
description: "Submit nominee details after the order enters the nominee phase.",
|
|
352
|
+
inputSchema: objectSchema({
|
|
353
|
+
txn_id: { type: "string", description: "Insurance transaction ID" },
|
|
354
|
+
offer_item_id: {
|
|
355
|
+
type: "string",
|
|
356
|
+
description: "Selected insurance offer item ID",
|
|
357
|
+
},
|
|
358
|
+
firstName: { type: "string", description: "Nominee first name" },
|
|
359
|
+
lastName: { type: "string", description: "Nominee last name" },
|
|
360
|
+
phone: { type: "string", description: "Nominee 10-digit phone number" },
|
|
361
|
+
relation: {
|
|
362
|
+
type: "string",
|
|
363
|
+
description: "Nominee relation to the buyer",
|
|
364
|
+
},
|
|
365
|
+
}, ["txn_id", "offer_item_id", "firstName", "lastName", "phone", "relation"]),
|
|
366
|
+
annotations: defaultAnnotations,
|
|
367
|
+
execute: (client, args) => {
|
|
368
|
+
const { txn_id, offer_item_id, ...nomineeFields } = args;
|
|
369
|
+
return client.post("/v1/insurance/submitForm", { txn_id, offer_item_id }, buildNomineeBody(nomineeFields));
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
name: "list-insurance-offers",
|
|
374
|
+
title: "List Insurance Offers",
|
|
375
|
+
description: "Fetch available insurance offers for a transaction.",
|
|
376
|
+
inputSchema: objectSchema({
|
|
377
|
+
txn_id: { type: "string", description: "Insurance transaction ID" },
|
|
378
|
+
}, ["txn_id"]),
|
|
379
|
+
annotations: readOnlyAnnotations,
|
|
380
|
+
execute: (client, args) => client.get("/v1/insurance/getOfferDetails", {
|
|
381
|
+
txn_id: args.txn_id,
|
|
382
|
+
}),
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
name: "select-insurance-offer",
|
|
386
|
+
title: "Select Insurance Offer",
|
|
387
|
+
description: "Lock in the selected insurance offer and optional add-ons.",
|
|
388
|
+
inputSchema: objectSchema({
|
|
389
|
+
txn_id: { type: "string", description: "Insurance transaction ID" },
|
|
390
|
+
offer_item_id: {
|
|
391
|
+
type: "string",
|
|
392
|
+
description: "Selected insurance offer item ID",
|
|
393
|
+
},
|
|
394
|
+
add_ons_payload: {
|
|
395
|
+
type: "object",
|
|
396
|
+
description: 'JSON body like { "add_on_obj": [{ "add_on_id": "...", "add_on_count": 1 }] }',
|
|
397
|
+
},
|
|
398
|
+
}, ["txn_id", "offer_item_id", "add_ons_payload"]),
|
|
399
|
+
annotations: defaultAnnotations,
|
|
400
|
+
execute: (client, args) => client.post("/v1/insurance/select", {
|
|
401
|
+
txn_id: args.txn_id,
|
|
402
|
+
offer_item_id: args.offer_item_id,
|
|
403
|
+
}, args.add_ons_payload),
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
name: "get-insurance-form-url",
|
|
407
|
+
title: "Get Insurance Form URL",
|
|
408
|
+
description: "Fetch an insurer-hosted URL for KYC, payment, renewal, or claim flows.",
|
|
409
|
+
inputSchema: objectSchema({
|
|
410
|
+
txn_id: { type: "string", description: "Insurance transaction ID" },
|
|
411
|
+
form_type: {
|
|
412
|
+
type: "string",
|
|
413
|
+
description: "KYC, PAYMENT, RENEWAL, or CLAIM",
|
|
414
|
+
},
|
|
415
|
+
offer_item_id: {
|
|
416
|
+
type: "string",
|
|
417
|
+
description: "Offer item ID when required",
|
|
418
|
+
},
|
|
419
|
+
}, ["txn_id", "form_type"]),
|
|
420
|
+
annotations: readOnlyAnnotations,
|
|
421
|
+
execute: (client, args) => client.get("/v1/insurance/getFormUrl", {
|
|
422
|
+
txn_id: args.txn_id,
|
|
423
|
+
form_type: args.form_type,
|
|
424
|
+
offer_item_id: args.offer_item_id,
|
|
425
|
+
}),
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
name: "init-insurance-order",
|
|
429
|
+
title: "Init Insurance Order",
|
|
430
|
+
description: "Initialize or advance the insurance order lifecycle.",
|
|
431
|
+
inputSchema: objectSchema({
|
|
432
|
+
txn_id: { type: "string", description: "Insurance transaction ID" },
|
|
433
|
+
offer_item_id: {
|
|
434
|
+
type: "string",
|
|
435
|
+
description: "Selected insurance offer item ID",
|
|
436
|
+
},
|
|
437
|
+
}, ["txn_id", "offer_item_id"]),
|
|
438
|
+
annotations: defaultAnnotations,
|
|
439
|
+
execute: (client, args) => client.post("/v1/insurance/init", {
|
|
440
|
+
txn_id: args.txn_id,
|
|
441
|
+
offer_item_id: args.offer_item_id,
|
|
442
|
+
}),
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
name: "confirm-insurance-order",
|
|
446
|
+
title: "Confirm Insurance Order",
|
|
447
|
+
description: "Finalize an insurance order after payment is complete.",
|
|
448
|
+
inputSchema: objectSchema({
|
|
449
|
+
txn_id: { type: "string", description: "Insurance transaction ID" },
|
|
450
|
+
offer_item_id: {
|
|
451
|
+
type: "string",
|
|
452
|
+
description: "Selected insurance offer item ID",
|
|
453
|
+
},
|
|
454
|
+
}, ["txn_id", "offer_item_id"]),
|
|
455
|
+
annotations: defaultAnnotations,
|
|
456
|
+
execute: (client, args) => client.post("/v1/insurance/confirm", {
|
|
457
|
+
txn_id: args.txn_id,
|
|
458
|
+
offer_item_id: args.offer_item_id,
|
|
459
|
+
}),
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
name: "fetch-insurance-order-status",
|
|
463
|
+
title: "Fetch Insurance Order Status",
|
|
464
|
+
description: "Fetch the latest policy or order status for an issued insurance journey.",
|
|
465
|
+
inputSchema: objectSchema({
|
|
466
|
+
txn_id: { type: "string", description: "Insurance transaction ID" },
|
|
467
|
+
offer_item_id: {
|
|
468
|
+
type: "string",
|
|
469
|
+
description: "Selected insurance offer item ID",
|
|
470
|
+
},
|
|
471
|
+
}, ["txn_id", "offer_item_id"]),
|
|
472
|
+
annotations: defaultAnnotations,
|
|
473
|
+
execute: (client, args) => client.post("/v1/insurance/status", {
|
|
474
|
+
txn_id: args.txn_id,
|
|
475
|
+
offer_item_id: args.offer_item_id,
|
|
476
|
+
}),
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
name: "get-insurance-cancellation-terms",
|
|
480
|
+
title: "Get Insurance Cancellation Terms",
|
|
481
|
+
description: "Fetch cancellation reasons, refund terms, and penalties for an issued policy.",
|
|
482
|
+
inputSchema: objectSchema({
|
|
483
|
+
order_id: { type: "string", description: "Issued insurance order ID" },
|
|
484
|
+
}, ["order_id"]),
|
|
485
|
+
annotations: readOnlyAnnotations,
|
|
486
|
+
execute: (client, args) => client.get("/v1/insurance/getCancelTerms", {
|
|
487
|
+
order_id: args.order_id,
|
|
488
|
+
}),
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
name: "cancel-insurance-order",
|
|
492
|
+
title: "Cancel Insurance Order",
|
|
493
|
+
description: "Cancel an issued insurance policy.",
|
|
494
|
+
inputSchema: objectSchema({
|
|
495
|
+
txn_id: { type: "string", description: "Insurance transaction ID" },
|
|
496
|
+
offer_item_id: {
|
|
497
|
+
type: "string",
|
|
498
|
+
description: "Selected insurance offer item ID",
|
|
499
|
+
},
|
|
500
|
+
cancellation_reason_id: {
|
|
501
|
+
type: "string",
|
|
502
|
+
description: "Cancellation reason ID",
|
|
503
|
+
},
|
|
504
|
+
cancellation_notes: {
|
|
505
|
+
type: "string",
|
|
506
|
+
description: "Short cancellation note",
|
|
507
|
+
},
|
|
508
|
+
}, [
|
|
509
|
+
"txn_id",
|
|
510
|
+
"offer_item_id",
|
|
511
|
+
"cancellation_reason_id",
|
|
512
|
+
"cancellation_notes",
|
|
513
|
+
]),
|
|
514
|
+
annotations: destructiveAnnotations,
|
|
515
|
+
execute: (client, args) => client.post("/v1/insurance/cancel", {
|
|
516
|
+
txn_id: args.txn_id,
|
|
517
|
+
offer_item_id: args.offer_item_id,
|
|
518
|
+
cancellation_reason_id: args.cancellation_reason_id,
|
|
519
|
+
cancellation_notes: args.cancellation_notes,
|
|
520
|
+
}),
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
name: "check-insurance-transaction-status",
|
|
524
|
+
title: "Check Insurance Transaction Status",
|
|
525
|
+
description: "Read the current transaction phase and redirection status for a journey.",
|
|
526
|
+
inputSchema: objectSchema({
|
|
527
|
+
txn_id: { type: "string", description: "Insurance transaction ID" },
|
|
528
|
+
}, ["txn_id"]),
|
|
529
|
+
annotations: readOnlyAnnotations,
|
|
530
|
+
execute: (client, args) => client.get("/v1/txn_details", {
|
|
531
|
+
txn_id: args.txn_id,
|
|
532
|
+
}),
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
name: "send-insurance-notification",
|
|
536
|
+
title: "Send Insurance Notification",
|
|
537
|
+
description: "Send the policy document or order summary via WhatsApp or SMS.",
|
|
538
|
+
inputSchema: objectSchema({
|
|
539
|
+
order_id: { type: "string", description: "Insurance order ID" },
|
|
540
|
+
channel: {
|
|
541
|
+
type: "string",
|
|
542
|
+
description: "Notification channel, such as WHATSAPP or SMS",
|
|
543
|
+
},
|
|
544
|
+
mobile_number: {
|
|
545
|
+
type: "string",
|
|
546
|
+
description: "Destination mobile number",
|
|
547
|
+
},
|
|
548
|
+
}, ["order_id", "channel", "mobile_number"]),
|
|
549
|
+
annotations: defaultAnnotations,
|
|
550
|
+
execute: (client, args) => client.post("/v1/send_notification", undefined, {
|
|
551
|
+
order_id: args.order_id,
|
|
552
|
+
channel: args.channel,
|
|
553
|
+
mobile_number: args.mobile_number,
|
|
554
|
+
}),
|
|
555
|
+
},
|
|
556
|
+
];
|
|
557
|
+
export function listToolDefinitions() {
|
|
558
|
+
return toolDefinitions.map(({ execute, ...definition }) => definition);
|
|
559
|
+
}
|
|
560
|
+
export function getToolDefinition(name) {
|
|
561
|
+
return listToolDefinitions().find((tool) => tool.name === name);
|
|
562
|
+
}
|
|
563
|
+
export function getRegisteredTool(name) {
|
|
564
|
+
return toolDefinitions.find((tool) => tool.name === name);
|
|
565
|
+
}
|
|
566
|
+
//# sourceMappingURL=tool-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-registry.js","sourceRoot":"","sources":["../src/tool-registry.ts"],"names":[],"mappings":"AAgDA,MAAM,kBAAkB,GAAoB;IAC1C,YAAY,EAAE,KAAK;IACnB,eAAe,EAAE,KAAK;IACtB,aAAa,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,mBAAmB,GAAoB;IAC3C,GAAG,kBAAkB;IACrB,YAAY,EAAE,IAAI;CACnB,CAAC;AAEF,MAAM,sBAAsB,GAAoB;IAC9C,GAAG,kBAAkB;IACrB,eAAe,EAAE,IAAI;CACtB,CAAC;AAEF,SAAS,YAAY,CACnB,UAA8C,EAC9C,WAAqB,EAAE;IAEvB,OAAO;QACL,IAAI,EAAE,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ED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cliniq360/ondc-cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Official CLI for the ONDC insurance
|
|
3
|
+
"version": "2.0.2",
|
|
4
|
+
"description": "Official CLI for the ONDC insurance API workflow.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"ondc": "dist/main.js"
|
|
@@ -18,14 +18,13 @@
|
|
|
18
18
|
"keywords": [
|
|
19
19
|
"ondc",
|
|
20
20
|
"insurance",
|
|
21
|
-
"
|
|
21
|
+
"api",
|
|
22
22
|
"cli",
|
|
23
23
|
"cliniq360"
|
|
24
24
|
],
|
|
25
25
|
"author": "eigi.ai",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
29
28
|
"chalk": "^5.4.1",
|
|
30
29
|
"cli-table3": "^0.6.5",
|
|
31
30
|
"commander": "^13.1.0",
|
package/dist/mcp-client.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
2
|
-
import type { CallToolResult, Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
3
|
-
export declare function withClient<T>(handler: (client: Client) => Promise<T>): Promise<T>;
|
|
4
|
-
export declare function listTools(): Promise<Tool[]>;
|
|
5
|
-
export declare function getTool(name: string): Promise<Tool | undefined>;
|
|
6
|
-
export declare function callTool(name: string, args: Record<string, unknown>): Promise<CallToolResult>;
|
|
7
|
-
//# sourceMappingURL=mcp-client.d.ts.map
|
package/dist/mcp-client.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-client.d.ts","sourceRoot":"","sources":["../src/mcp-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AA0C/E,wBAAsB,UAAU,CAAC,CAAC,EAChC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GACtC,OAAO,CAAC,CAAC,CAAC,CAWZ;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,CAKjD;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC,CAGrE;AAED,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,cAAc,CAAC,CAKzB"}
|