@epilot/message-client 1.10.0 → 1.10.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/dist/openapi.d.ts CHANGED
@@ -123,6 +123,20 @@ declare namespace Components {
123
123
  */
124
124
  send_as_link?: boolean;
125
125
  }
126
+ export interface GenAIFeedbackPayload {
127
+ /**
128
+ * Rating of the suggested reply
129
+ * example:
130
+ * positive
131
+ */
132
+ rating?: string | null;
133
+ /**
134
+ * Feedback of the suggested reply
135
+ * example:
136
+ * Good summary
137
+ */
138
+ feedback?: string | null;
139
+ }
126
140
  export interface GenAIInfoJobOutputPayload {
127
141
  /**
128
142
  * Generated summary
@@ -139,11 +153,13 @@ declare namespace Components {
139
153
  */
140
154
  topic?: string | null;
141
155
  /**
142
- * Next steps
156
+ * Recommended next steps
143
157
  * example:
144
- * Send a quote
158
+ * [
159
+ * "The agent should approve the refund"
160
+ * ]
145
161
  */
146
- next_steps?: string | null;
162
+ next_steps?: string[] | null;
147
163
  /**
148
164
  * Tags
149
165
  * example:
@@ -179,6 +195,18 @@ declare namespace Components {
179
195
  type?: "INFO" | "REPLY";
180
196
  }
181
197
  export interface GenAIJobOutputPayload {
198
+ /**
199
+ * Rating of the suggested reply
200
+ * example:
201
+ * positive
202
+ */
203
+ rating?: string | null;
204
+ /**
205
+ * Feedback of the suggested reply
206
+ * example:
207
+ * Good summary
208
+ */
209
+ feedback?: string | null;
182
210
  /**
183
211
  * Status of the GenAI job
184
212
  * example:
@@ -210,6 +238,14 @@ declare namespace Components {
210
238
  */
211
239
  updated_at?: number;
212
240
  }
241
+ export interface GenAIReplyJobOutputPayload {
242
+ /**
243
+ * Suggested reply
244
+ * example:
245
+ * Thank you for your inquiry. We will get back to you shortly.
246
+ */
247
+ suggested_reply?: string | null;
248
+ }
213
249
  export interface Message {
214
250
  /**
215
251
  * Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.
@@ -759,6 +795,80 @@ declare namespace Paths {
759
795
  threadId: Parameters.ThreadId /* UUID */;
760
796
  }
761
797
  namespace Responses {
798
+ export interface $200 {
799
+ /**
800
+ * Organization ID
801
+ * example:
802
+ * 739224
803
+ */
804
+ org_id?: string;
805
+ /**
806
+ * Thread ID
807
+ * example:
808
+ * 07b8b522-a993-4021-8fae-fd19f330ee60
809
+ */
810
+ thread_id?: string;
811
+ /**
812
+ * Message ID
813
+ * example:
814
+ * c03eb411-9f75-4ff0-9404-5a61c5b8798d
815
+ */
816
+ message_id?: string;
817
+ /**
818
+ * Job type
819
+ */
820
+ type?: "INFO" | "REPLY";
821
+ payload?: {
822
+ /**
823
+ * Suggested reply
824
+ * example:
825
+ * Thank you for your inquiry. We will get back to you shortly.
826
+ */
827
+ suggested_reply?: string | null;
828
+ /**
829
+ * Rating of the suggested reply
830
+ * example:
831
+ * positive
832
+ */
833
+ rating?: string | null;
834
+ /**
835
+ * Feedback of the suggested reply
836
+ * example:
837
+ * Good summary
838
+ */
839
+ feedback?: string | null;
840
+ /**
841
+ * Status of the GenAI job
842
+ * example:
843
+ * COMPLETED
844
+ */
845
+ status?: "IN_PROGRESS" | "COMPLETED" | "FAILED";
846
+ /**
847
+ * Progress of the GenAI job in percentage
848
+ * example:
849
+ * 100
850
+ */
851
+ progress?: number;
852
+ /**
853
+ * Error message if the job failed
854
+ * example:
855
+ * Failed to generate summary
856
+ */
857
+ error?: string | null;
858
+ /**
859
+ * Job created date
860
+ * example:
861
+ * 1612900000000
862
+ */
863
+ created_at?: number;
864
+ /**
865
+ * Job last updated date
866
+ * example:
867
+ * 1612900000000
868
+ */
869
+ updated_at?: number;
870
+ };
871
+ }
762
872
  export interface $202 {
763
873
  }
764
874
  export interface $403 {
@@ -816,11 +926,13 @@ declare namespace Paths {
816
926
  */
817
927
  topic?: string | null;
818
928
  /**
819
- * Next steps
929
+ * Recommended next steps
820
930
  * example:
821
- * Send a quote
931
+ * [
932
+ * "The agent should approve the refund"
933
+ * ]
822
934
  */
823
- next_steps?: string | null;
935
+ next_steps?: string[] | null;
824
936
  /**
825
937
  * Tags
826
938
  * example:
@@ -830,6 +942,18 @@ declare namespace Paths {
830
942
  * ]
831
943
  */
832
944
  tags?: string[] | null;
945
+ /**
946
+ * Rating of the suggested reply
947
+ * example:
948
+ * positive
949
+ */
950
+ rating?: string | null;
951
+ /**
952
+ * Feedback of the suggested reply
953
+ * example:
954
+ * Good summary
955
+ */
956
+ feedback?: string | null;
833
957
  /**
834
958
  * Status of the GenAI job
835
959
  * example:
@@ -1226,12 +1350,79 @@ declare namespace Paths {
1226
1350
  messageId: Parameters.MessageId /* UUID */;
1227
1351
  }
1228
1352
  export interface RequestBody {
1229
- [name: string]: any;
1230
1353
  /**
1354
+ * Generated summary
1355
+ * example:
1356
+ * [
1357
+ * "Customer is interested in solar panels"
1358
+ * ]
1359
+ */
1360
+ summary?: string[] | null;
1361
+ /**
1362
+ * Topic of the GenAI Summary
1363
+ * example:
1364
+ * Product enquiry
1365
+ */
1366
+ topic?: string | null;
1367
+ /**
1368
+ * Recommended next steps
1369
+ * example:
1370
+ * [
1371
+ * "The agent should approve the refund"
1372
+ * ]
1373
+ */
1374
+ next_steps?: string[] | null;
1375
+ /**
1376
+ * Tags
1377
+ * example:
1378
+ * [
1379
+ * "solar",
1380
+ * "quote"
1381
+ * ]
1382
+ */
1383
+ tags?: string[] | null;
1384
+ /**
1385
+ * Rating of the suggested reply
1231
1386
  * example:
1232
1387
  * positive
1233
1388
  */
1234
1389
  rating?: string | null;
1390
+ /**
1391
+ * Feedback of the suggested reply
1392
+ * example:
1393
+ * Good summary
1394
+ */
1395
+ feedback?: string | null;
1396
+ /**
1397
+ * Status of the GenAI job
1398
+ * example:
1399
+ * COMPLETED
1400
+ */
1401
+ status?: "IN_PROGRESS" | "COMPLETED" | "FAILED";
1402
+ /**
1403
+ * Progress of the GenAI job in percentage
1404
+ * example:
1405
+ * 100
1406
+ */
1407
+ progress?: number;
1408
+ /**
1409
+ * Error message if the job failed
1410
+ * example:
1411
+ * Failed to generate summary
1412
+ */
1413
+ error?: string | null;
1414
+ /**
1415
+ * Job created date
1416
+ * example:
1417
+ * 1612900000000
1418
+ */
1419
+ created_at?: number;
1420
+ /**
1421
+ * Job last updated date
1422
+ * example:
1423
+ * 1612900000000
1424
+ */
1425
+ updated_at?: number;
1235
1426
  }
1236
1427
  namespace Responses {
1237
1428
  export interface $200 {
@@ -1273,11 +1464,13 @@ declare namespace Paths {
1273
1464
  */
1274
1465
  topic?: string | null;
1275
1466
  /**
1276
- * Next steps
1467
+ * Recommended next steps
1277
1468
  * example:
1278
- * Send a quote
1469
+ * [
1470
+ * "The agent should approve the refund"
1471
+ * ]
1279
1472
  */
1280
- next_steps?: string | null;
1473
+ next_steps?: string[] | null;
1281
1474
  /**
1282
1475
  * Tags
1283
1476
  * example:
@@ -1287,6 +1480,18 @@ declare namespace Paths {
1287
1480
  * ]
1288
1481
  */
1289
1482
  tags?: string[] | null;
1483
+ /**
1484
+ * Rating of the suggested reply
1485
+ * example:
1486
+ * positive
1487
+ */
1488
+ rating?: string | null;
1489
+ /**
1490
+ * Feedback of the suggested reply
1491
+ * example:
1492
+ * Good summary
1493
+ */
1494
+ feedback?: string | null;
1290
1495
  /**
1291
1496
  * Status of the GenAI job
1292
1497
  * example:
@@ -2046,7 +2251,7 @@ export interface OperationMethods {
2046
2251
  parameters?: Parameters<Paths.GenerateSuggestedReply.PathParameters & Paths.GenerateSuggestedReply.QueryParameters> | null,
2047
2252
  data?: any,
2048
2253
  config?: AxiosRequestConfig
2049
- ): OperationResponse<Paths.GenerateSuggestedReply.Responses.$202>
2254
+ ): OperationResponse<Paths.GenerateSuggestedReply.Responses.$200 | Paths.GenerateSuggestedReply.Responses.$202>
2050
2255
  /**
2051
2256
  * getInfo - getInfo
2052
2257
  *
@@ -2333,7 +2538,7 @@ export interface PathsDictionary {
2333
2538
  parameters?: Parameters<Paths.GenerateSuggestedReply.PathParameters & Paths.GenerateSuggestedReply.QueryParameters> | null,
2334
2539
  data?: any,
2335
2540
  config?: AxiosRequestConfig
2336
- ): OperationResponse<Paths.GenerateSuggestedReply.Responses.$202>
2541
+ ): OperationResponse<Paths.GenerateSuggestedReply.Responses.$200 | Paths.GenerateSuggestedReply.Responses.$202>
2337
2542
  }
2338
2543
  ['/v1/message/threads/{threadId}/genai:info']: {
2339
2544
  /**
package/dist/openapi.json CHANGED
@@ -793,8 +793,37 @@
793
793
  }
794
794
  ],
795
795
  "responses": {
796
+ "200": {
797
+ "description": "Success",
798
+ "content": {
799
+ "application/json": {
800
+ "schema": {
801
+ "allOf": [
802
+ {
803
+ "$ref": "#/components/schemas/GenAIJobOutput"
804
+ },
805
+ {
806
+ "type": "object",
807
+ "properties": {
808
+ "payload": {
809
+ "allOf": [
810
+ {
811
+ "$ref": "#/components/schemas/GenAIReplyJobOutputPayload"
812
+ },
813
+ {
814
+ "$ref": "#/components/schemas/GenAIJobOutputPayload"
815
+ }
816
+ ]
817
+ }
818
+ }
819
+ }
820
+ ]
821
+ }
822
+ }
823
+ }
824
+ },
796
825
  "202": {
797
- "description": "Success"
826
+ "description": "Accepted"
798
827
  },
799
828
  "403": {
800
829
  "description": "Forbidden"
@@ -903,15 +932,14 @@
903
932
  "content": {
904
933
  "application/json": {
905
934
  "schema": {
906
- "type": "object",
907
- "properties": {
908
- "rating": {
909
- "type": "string",
910
- "nullable": true,
911
- "example": "positive"
935
+ "allOf": [
936
+ {
937
+ "$ref": "#/components/schemas/GenAIInfoJobOutputPayload"
938
+ },
939
+ {
940
+ "$ref": "#/components/schemas/GenAIJobOutputPayload"
912
941
  }
913
- },
914
- "additionalProperties": true
942
+ ]
915
943
  }
916
944
  }
917
945
  }
@@ -1429,7 +1457,6 @@
1429
1457
  }
1430
1458
  },
1431
1459
  "GenAIJobOutput": {
1432
- "type": "object",
1433
1460
  "properties": {
1434
1461
  "org_id": {
1435
1462
  "type": "string",
@@ -1457,7 +1484,11 @@
1457
1484
  }
1458
1485
  },
1459
1486
  "GenAIJobOutputPayload": {
1460
- "type": "object",
1487
+ "allOf": [
1488
+ {
1489
+ "$ref": "#/components/schemas/GenAIFeedbackPayload"
1490
+ }
1491
+ ],
1461
1492
  "properties": {
1462
1493
  "status": {
1463
1494
  "type": "string",
@@ -1493,7 +1524,6 @@
1493
1524
  }
1494
1525
  },
1495
1526
  "GenAIInfoJobOutputPayload": {
1496
- "type": "object",
1497
1527
  "properties": {
1498
1528
  "summary": {
1499
1529
  "type": "array",
@@ -1513,9 +1543,14 @@
1513
1543
  "nullable": true
1514
1544
  },
1515
1545
  "next_steps": {
1516
- "type": "string",
1517
- "description": "Next steps",
1518
- "example": "Send a quote",
1546
+ "type": "array",
1547
+ "description": "Recommended next steps",
1548
+ "items": {
1549
+ "type": "string"
1550
+ },
1551
+ "example": [
1552
+ "The agent should approve the refund"
1553
+ ],
1519
1554
  "nullable": true
1520
1555
  },
1521
1556
  "tags": {
@@ -1531,6 +1566,34 @@
1531
1566
  "nullable": true
1532
1567
  }
1533
1568
  }
1569
+ },
1570
+ "GenAIReplyJobOutputPayload": {
1571
+ "type": "object",
1572
+ "properties": {
1573
+ "suggested_reply": {
1574
+ "type": "string",
1575
+ "description": "Suggested reply",
1576
+ "example": "Thank you for your inquiry. We will get back to you shortly.",
1577
+ "nullable": true
1578
+ }
1579
+ }
1580
+ },
1581
+ "GenAIFeedbackPayload": {
1582
+ "type": "object",
1583
+ "properties": {
1584
+ "rating": {
1585
+ "type": "string",
1586
+ "description": "Rating of the suggested reply",
1587
+ "example": "positive",
1588
+ "nullable": true
1589
+ },
1590
+ "feedback": {
1591
+ "type": "string",
1592
+ "description": "Feedback of the suggested reply",
1593
+ "example": "Good summary",
1594
+ "nullable": true
1595
+ }
1596
+ }
1534
1597
  }
1535
1598
  }
1536
1599
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/message-client",
3
- "version": "1.10.0",
3
+ "version": "1.10.2",
4
4
  "description": "API Client for epilot Message API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",