@epilot/message-client 1.10.1 → 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
@@ -181,6 +195,18 @@ declare namespace Components {
181
195
  type?: "INFO" | "REPLY";
182
196
  }
183
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;
184
210
  /**
185
211
  * Status of the GenAI job
186
212
  * example:
@@ -212,6 +238,14 @@ declare namespace Components {
212
238
  */
213
239
  updated_at?: number;
214
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
+ }
215
249
  export interface Message {
216
250
  /**
217
251
  * Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.
@@ -761,6 +795,80 @@ declare namespace Paths {
761
795
  threadId: Parameters.ThreadId /* UUID */;
762
796
  }
763
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
+ }
764
872
  export interface $202 {
765
873
  }
766
874
  export interface $403 {
@@ -834,6 +942,18 @@ declare namespace Paths {
834
942
  * ]
835
943
  */
836
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;
837
957
  /**
838
958
  * Status of the GenAI job
839
959
  * example:
@@ -1230,17 +1350,79 @@ declare namespace Paths {
1230
1350
  messageId: Parameters.MessageId /* UUID */;
1231
1351
  }
1232
1352
  export interface RequestBody {
1233
- [name: string]: any;
1234
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
1235
1386
  * example:
1236
1387
  * positive
1237
1388
  */
1238
1389
  rating?: string | null;
1239
1390
  /**
1391
+ * Feedback of the suggested reply
1240
1392
  * example:
1241
1393
  * Good summary
1242
1394
  */
1243
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;
1244
1426
  }
1245
1427
  namespace Responses {
1246
1428
  export interface $200 {
@@ -1298,6 +1480,18 @@ declare namespace Paths {
1298
1480
  * ]
1299
1481
  */
1300
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;
1301
1495
  /**
1302
1496
  * Status of the GenAI job
1303
1497
  * example:
@@ -2057,7 +2251,7 @@ export interface OperationMethods {
2057
2251
  parameters?: Parameters<Paths.GenerateSuggestedReply.PathParameters & Paths.GenerateSuggestedReply.QueryParameters> | null,
2058
2252
  data?: any,
2059
2253
  config?: AxiosRequestConfig
2060
- ): OperationResponse<Paths.GenerateSuggestedReply.Responses.$202>
2254
+ ): OperationResponse<Paths.GenerateSuggestedReply.Responses.$200 | Paths.GenerateSuggestedReply.Responses.$202>
2061
2255
  /**
2062
2256
  * getInfo - getInfo
2063
2257
  *
@@ -2344,7 +2538,7 @@ export interface PathsDictionary {
2344
2538
  parameters?: Parameters<Paths.GenerateSuggestedReply.PathParameters & Paths.GenerateSuggestedReply.QueryParameters> | null,
2345
2539
  data?: any,
2346
2540
  config?: AxiosRequestConfig
2347
- ): OperationResponse<Paths.GenerateSuggestedReply.Responses.$202>
2541
+ ): OperationResponse<Paths.GenerateSuggestedReply.Responses.$200 | Paths.GenerateSuggestedReply.Responses.$202>
2348
2542
  }
2349
2543
  ['/v1/message/threads/{threadId}/genai:info']: {
2350
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,20 +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"
912
938
  },
913
- "feedback": {
914
- "type": "string",
915
- "nullable": true,
916
- "example": "Good summary"
939
+ {
940
+ "$ref": "#/components/schemas/GenAIJobOutputPayload"
917
941
  }
918
- },
919
- "additionalProperties": true
942
+ ]
920
943
  }
921
944
  }
922
945
  }
@@ -1434,7 +1457,6 @@
1434
1457
  }
1435
1458
  },
1436
1459
  "GenAIJobOutput": {
1437
- "type": "object",
1438
1460
  "properties": {
1439
1461
  "org_id": {
1440
1462
  "type": "string",
@@ -1462,7 +1484,11 @@
1462
1484
  }
1463
1485
  },
1464
1486
  "GenAIJobOutputPayload": {
1465
- "type": "object",
1487
+ "allOf": [
1488
+ {
1489
+ "$ref": "#/components/schemas/GenAIFeedbackPayload"
1490
+ }
1491
+ ],
1466
1492
  "properties": {
1467
1493
  "status": {
1468
1494
  "type": "string",
@@ -1498,7 +1524,6 @@
1498
1524
  }
1499
1525
  },
1500
1526
  "GenAIInfoJobOutputPayload": {
1501
- "type": "object",
1502
1527
  "properties": {
1503
1528
  "summary": {
1504
1529
  "type": "array",
@@ -1541,6 +1566,34 @@
1541
1566
  "nullable": true
1542
1567
  }
1543
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
+ }
1544
1597
  }
1545
1598
  }
1546
1599
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/message-client",
3
- "version": "1.10.1",
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",