@epilot/message-client 1.24.0 → 1.24.1
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/definition.js +1 -1
- package/dist/openapi-runtime.json +0 -113
- package/dist/openapi.d.ts +0 -463
- package/dist/openapi.json +1 -580
- package/package.json +1 -1
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={330:function(e,s,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s,"__esModule",{value:!0});var t=a(r(466));s.default=t.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.2","info":{"title":"","version":""},"paths":{"/v1/message/messages":{"post":{"operationId":"sendMessage","parameters":[{"in":"query","name":"do_not_create_entities"}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"put":{"operationId":"updateMessage","responses":{}}},"/
|
|
1
|
+
(()=>{"use strict";var e={330:function(e,s,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s,"__esModule",{value:!0});var t=a(r(466));s.default=t.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.2","info":{"title":"","version":""},"paths":{"/v1/message/messages":{"post":{"operationId":"sendMessage","parameters":[{"in":"query","name":"do_not_create_entities"}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"put":{"operationId":"updateMessage","responses":{}}},"/v1/message/messages/{id}":{"get":{"operationId":"getMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}},"delete":{"operationId":"deleteMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages:search":{"post":{"operationId":"searchMessages","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/messages/{id}/trash":{"post":{"operationId":"trashMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages/{id}/untrash":{"post":{"operationId":"untrashMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages/{id}/read":{"post":{"operationId":"markReadMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v2/message/messages/{id}/read":{"post":{"operationId":"markReadMessageV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/messages/{id}/unread":{"post":{"operationId":"markUnreadMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages/unread/{actor}":{"get":{"operationId":"getUnread","parameters":[{"name":"actor","in":"path","required":true},{"in":"query","name":"email_filter"}],"responses":{}}},"/v2/message/messages/{id}/unread":{"post":{"operationId":"markUnreadMessageV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads:search":{"post":{"operationId":"searchThreads","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/message/threads:search":{"post":{"operationId":"searchThreadsV2","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads:searchIds":{"post":{"operationId":"searchIds","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads":{"put":{"operationId":"updateThread","responses":{}}},"/v1/message/threads/{id}":{"delete":{"operationId":"deleteThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}:move":{"post":{"operationId":"moveThread","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}:markAsDone":{"post":{"operationId":"markThreadAsDone","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}:markAsOpen":{"post":{"operationId":"markThreadAsOpen","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}/timeline":{"get":{"operationId":"getThreadTimeline","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}/trash":{"post":{"operationId":"trashThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}/untrash":{"post":{"operationId":"untrashThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/bulk:read":{"post":{"operationId":"threadBulkActionsRead","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:unread":{"post":{"operationId":"threadBulkActionsUnread","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:favorite":{"post":{"operationId":"threadBulkActionsFavorite","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:unfavorite":{"post":{"operationId":"threadBulkActionsUnfavorite","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:trash":{"post":{"operationId":"threadBulkActionsTrash","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:untrash":{"post":{"operationId":"threadBulkActionsUntrash","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:delete":{"post":{"operationId":"threadBulkActionsDelete","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:done":{"post":{"operationId":"threadBulkActionsDone","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:open":{"post":{"operationId":"threadBulkActionsOpen","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/read":{"post":{"operationId":"markReadThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v2/message/threads/{id}/read":{"post":{"operationId":"markReadThreadV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/unread":{"post":{"operationId":"markUnreadThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v2/message/threads/{id}/unread":{"post":{"operationId":"markUnreadThreadV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/assign":{"post":{"operationId":"assignThread","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/unassign":{"post":{"operationId":"unassignThread","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/assign:users":{"post":{"operationId":"assignUsers","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}:pin":{"post":{"operationId":"pinThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}},"delete":{"operationId":"unpinThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/drafts":{"post":{"operationId":"createDraft","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/drafts:send":{"post":{"operationId":"sendDraft","responses":{}}},"/v2/message/messages/{id}":{"get":{"operationId":"getMessageV2","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}}},"components":{"responses":{"NotFound":{"content":{"application/json":{}}},"Conflict":{"content":{"application/json":{}}},"InternalServerError":{"content":{"application/json":{}}},"BadRequest":{"content":{"application/json":{}}},"Forbidden":{"content":{"application/json":{}}}}},"servers":[{"url":"https://message.sls.epilot.io"}]}')}},s={},r=function r(a){var t=s[a];if(void 0!==t)return t.exports;var n=s[a]={exports:{}};return e[a].call(n.exports,n,n.exports,r),n.exports}(330),a=exports;for(var t in r)a[t]=r[t];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
|
|
@@ -26,119 +26,6 @@
|
|
|
26
26
|
"responses": {}
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
-
"/outlook/connect": {
|
|
30
|
-
"get": {
|
|
31
|
-
"operationId": "connectOutlook",
|
|
32
|
-
"responses": {}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"/outlook/connection/status": {
|
|
36
|
-
"get": {
|
|
37
|
-
"operationId": "getOutlookConnectionStatus",
|
|
38
|
-
"responses": {}
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"/outlook/connection/disconnect": {
|
|
42
|
-
"post": {
|
|
43
|
-
"operationId": "disconnectOutlook",
|
|
44
|
-
"requestBody": {
|
|
45
|
-
"required": true,
|
|
46
|
-
"content": {
|
|
47
|
-
"application/json": {}
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"responses": {}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"/outlook/shared-mailboxes/connect": {
|
|
54
|
-
"post": {
|
|
55
|
-
"operationId": "connectSharedMailbox",
|
|
56
|
-
"requestBody": {
|
|
57
|
-
"required": true,
|
|
58
|
-
"content": {
|
|
59
|
-
"application/json": {}
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"responses": {}
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"/outlook/shared-mailboxes/mappings": {
|
|
66
|
-
"get": {
|
|
67
|
-
"operationId": "getSharedMailboxMappings",
|
|
68
|
-
"responses": {}
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
"/outlook/shared-mailboxes/mappings/{shared_inbox_id}": {
|
|
72
|
-
"get": {
|
|
73
|
-
"operationId": "getSharedMailboxMappingById",
|
|
74
|
-
"parameters": [
|
|
75
|
-
{
|
|
76
|
-
"name": "shared_inbox_id",
|
|
77
|
-
"in": "path",
|
|
78
|
-
"required": true
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
"responses": {}
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
"/outlook/oauth/callback": {
|
|
85
|
-
"get": {
|
|
86
|
-
"operationId": "outlookOAuthCallback",
|
|
87
|
-
"parameters": [
|
|
88
|
-
{
|
|
89
|
-
"name": "code",
|
|
90
|
-
"in": "query",
|
|
91
|
-
"required": false
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"name": "state",
|
|
95
|
-
"in": "query",
|
|
96
|
-
"required": true
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"name": "session_state",
|
|
100
|
-
"in": "query",
|
|
101
|
-
"required": false
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"name": "error",
|
|
105
|
-
"in": "query",
|
|
106
|
-
"required": false
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"name": "error_description",
|
|
110
|
-
"in": "query",
|
|
111
|
-
"required": false
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"name": "error_subcode",
|
|
115
|
-
"in": "query",
|
|
116
|
-
"required": false
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"name": "client_info",
|
|
120
|
-
"in": "query",
|
|
121
|
-
"required": false
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"name": "error_uri",
|
|
125
|
-
"in": "query",
|
|
126
|
-
"required": false
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"name": "admin_consent",
|
|
130
|
-
"in": "query",
|
|
131
|
-
"required": false
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"name": "tenant",
|
|
135
|
-
"in": "query",
|
|
136
|
-
"required": false
|
|
137
|
-
}
|
|
138
|
-
],
|
|
139
|
-
"responses": {}
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
29
|
"/v1/message/messages/{id}": {
|
|
143
30
|
"get": {
|
|
144
31
|
"operationId": "getMessage",
|
package/dist/openapi.d.ts
CHANGED
|
@@ -583,41 +583,6 @@ declare namespace Components {
|
|
|
583
583
|
sort?: string;
|
|
584
584
|
highlight?: any;
|
|
585
585
|
}
|
|
586
|
-
/**
|
|
587
|
-
* Mapping between a shared inbox and its Outlook shared mailbox.
|
|
588
|
-
* This tracks which provider/tenant provisions each shared mailbox.
|
|
589
|
-
*
|
|
590
|
-
*/
|
|
591
|
-
export interface SharedMailboxMapping {
|
|
592
|
-
/**
|
|
593
|
-
* The email-settings shared inbox entity ID
|
|
594
|
-
*/
|
|
595
|
-
shared_inbox_id: string;
|
|
596
|
-
/**
|
|
597
|
-
* The Outlook shared mailbox email address
|
|
598
|
-
*/
|
|
599
|
-
outlook_email: string; // email
|
|
600
|
-
/**
|
|
601
|
-
* Azure AD Tenant ID that provisions this mailbox
|
|
602
|
-
*/
|
|
603
|
-
tenant_id: string;
|
|
604
|
-
/**
|
|
605
|
-
* Provider type (for future extensibility)
|
|
606
|
-
*/
|
|
607
|
-
provider: "outlook";
|
|
608
|
-
/**
|
|
609
|
-
* Display name from Outlook
|
|
610
|
-
*/
|
|
611
|
-
display_name?: string;
|
|
612
|
-
/**
|
|
613
|
-
* When the mailbox was connected
|
|
614
|
-
*/
|
|
615
|
-
connected_at: string; // date-time
|
|
616
|
-
/**
|
|
617
|
-
* User who connected this mailbox
|
|
618
|
-
*/
|
|
619
|
-
connected_by_user_id?: string;
|
|
620
|
-
}
|
|
621
586
|
/**
|
|
622
587
|
* Thread properties depend on API caller as it's not pre-defined. We do recommend having at least `topic` property for categorizing.
|
|
623
588
|
*/
|
|
@@ -773,75 +738,6 @@ declare namespace Paths {
|
|
|
773
738
|
}
|
|
774
739
|
}
|
|
775
740
|
}
|
|
776
|
-
namespace ConnectOutlook {
|
|
777
|
-
namespace Responses {
|
|
778
|
-
export interface $200 {
|
|
779
|
-
authorization_url?: string;
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
namespace ConnectSharedMailbox {
|
|
784
|
-
export interface RequestBody {
|
|
785
|
-
/**
|
|
786
|
-
* Email address of the Outlook shared mailbox to connect
|
|
787
|
-
*/
|
|
788
|
-
email: string; // email
|
|
789
|
-
/**
|
|
790
|
-
* Display name for the shared inbox (defaults to mailbox display name)
|
|
791
|
-
*/
|
|
792
|
-
name?: string;
|
|
793
|
-
/**
|
|
794
|
-
* Color for the shared inbox (hex code, defaults to green)
|
|
795
|
-
*/
|
|
796
|
-
color?: string;
|
|
797
|
-
/**
|
|
798
|
-
* User IDs to assign to this shared inbox
|
|
799
|
-
*/
|
|
800
|
-
assignees?: string[];
|
|
801
|
-
/**
|
|
802
|
-
* Description for the shared inbox
|
|
803
|
-
*/
|
|
804
|
-
description?: string;
|
|
805
|
-
}
|
|
806
|
-
namespace Responses {
|
|
807
|
-
export interface $201 {
|
|
808
|
-
/**
|
|
809
|
-
* The created shared inbox from email-settings
|
|
810
|
-
*/
|
|
811
|
-
shared_inbox?: {
|
|
812
|
-
id?: string;
|
|
813
|
-
name?: string;
|
|
814
|
-
color?: string;
|
|
815
|
-
assignees?: string[];
|
|
816
|
-
description?: string;
|
|
817
|
-
};
|
|
818
|
-
/**
|
|
819
|
-
* The Outlook shared mailbox email address
|
|
820
|
-
*/
|
|
821
|
-
outlook_email?: string; // email
|
|
822
|
-
/**
|
|
823
|
-
* Azure AD Tenant ID that provisions this mailbox
|
|
824
|
-
*/
|
|
825
|
-
tenant_id?: string;
|
|
826
|
-
/**
|
|
827
|
-
* The provider type
|
|
828
|
-
*/
|
|
829
|
-
provider?: "outlook";
|
|
830
|
-
/**
|
|
831
|
-
* Display name of the shared mailbox
|
|
832
|
-
*/
|
|
833
|
-
display_name?: string;
|
|
834
|
-
}
|
|
835
|
-
export interface $400 {
|
|
836
|
-
}
|
|
837
|
-
export interface $401 {
|
|
838
|
-
}
|
|
839
|
-
export interface $403 {
|
|
840
|
-
}
|
|
841
|
-
export interface $500 {
|
|
842
|
-
}
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
741
|
namespace CreateDraft {
|
|
846
742
|
export type RequestBody = Components.Schemas.MessageRequestParams;
|
|
847
743
|
namespace Responses {
|
|
@@ -1014,33 +910,6 @@ declare namespace Paths {
|
|
|
1014
910
|
}
|
|
1015
911
|
}
|
|
1016
912
|
}
|
|
1017
|
-
namespace DisconnectOutlook {
|
|
1018
|
-
export interface RequestBody {
|
|
1019
|
-
/**
|
|
1020
|
-
* Azure AD Tenant ID of the connection to disconnect
|
|
1021
|
-
*/
|
|
1022
|
-
tenant_id: string;
|
|
1023
|
-
}
|
|
1024
|
-
namespace Responses {
|
|
1025
|
-
export interface $200 {
|
|
1026
|
-
success?: boolean;
|
|
1027
|
-
/**
|
|
1028
|
-
* The tenant ID that was disconnected
|
|
1029
|
-
*/
|
|
1030
|
-
tenant_id?: string;
|
|
1031
|
-
/**
|
|
1032
|
-
* List of shared inbox IDs that were affected by the disconnection
|
|
1033
|
-
*/
|
|
1034
|
-
affected_shared_inboxes?: string[];
|
|
1035
|
-
}
|
|
1036
|
-
export interface $400 {
|
|
1037
|
-
}
|
|
1038
|
-
export interface $404 {
|
|
1039
|
-
}
|
|
1040
|
-
export interface $500 {
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
}
|
|
1044
913
|
namespace GetMessage {
|
|
1045
914
|
namespace Parameters {
|
|
1046
915
|
/**
|
|
@@ -1367,120 +1236,6 @@ declare namespace Paths {
|
|
|
1367
1236
|
}
|
|
1368
1237
|
}
|
|
1369
1238
|
}
|
|
1370
|
-
namespace GetOutlookConnectionStatus {
|
|
1371
|
-
namespace Responses {
|
|
1372
|
-
export interface $200 {
|
|
1373
|
-
/**
|
|
1374
|
-
* List of Outlook connections (one per tenant)
|
|
1375
|
-
*/
|
|
1376
|
-
connections: {
|
|
1377
|
-
/**
|
|
1378
|
-
* Current connection status:
|
|
1379
|
-
* - pending_auth: Admin consent granted, waiting for user OAuth
|
|
1380
|
-
* - connected: Fully connected with valid tokens
|
|
1381
|
-
* - expired: Tokens expired, need to re-authenticate
|
|
1382
|
-
*
|
|
1383
|
-
*/
|
|
1384
|
-
status: "connected" | "expired" | "pending_auth";
|
|
1385
|
-
/**
|
|
1386
|
-
* Action for UI to take (all call GET /outlook/connect):
|
|
1387
|
-
* - connect: No connection, initiate OAuth
|
|
1388
|
-
* - authorize: Admin consent done, complete OAuth
|
|
1389
|
-
* - reconnect: Re-authenticate expired session
|
|
1390
|
-
* - none: Fully connected, no action needed
|
|
1391
|
-
*
|
|
1392
|
-
*/
|
|
1393
|
-
action: "connect" | "authorize" | "reconnect" | "none";
|
|
1394
|
-
/**
|
|
1395
|
-
* Display name of user who connected
|
|
1396
|
-
*/
|
|
1397
|
-
connected_by_display_name?: string;
|
|
1398
|
-
/**
|
|
1399
|
-
* Email of the user who connected
|
|
1400
|
-
*/
|
|
1401
|
-
connected_by_email?: string; // email
|
|
1402
|
-
/**
|
|
1403
|
-
* Azure AD Object ID of user who connected
|
|
1404
|
-
*/
|
|
1405
|
-
connected_by_user_id?: string;
|
|
1406
|
-
/**
|
|
1407
|
-
* When the connection was established
|
|
1408
|
-
*/
|
|
1409
|
-
connected_at?: string; // date-time
|
|
1410
|
-
/**
|
|
1411
|
-
* When the connection was last updated
|
|
1412
|
-
*/
|
|
1413
|
-
updated_at?: string; // date-time
|
|
1414
|
-
/**
|
|
1415
|
-
* Microsoft Azure AD tenant ID
|
|
1416
|
-
*/
|
|
1417
|
-
tenant_id: string;
|
|
1418
|
-
/**
|
|
1419
|
-
* Granted permission scopes
|
|
1420
|
-
*/
|
|
1421
|
-
scopes?: string[];
|
|
1422
|
-
/**
|
|
1423
|
-
* When the current access token expires
|
|
1424
|
-
*/
|
|
1425
|
-
expires_at?: string; // date-time
|
|
1426
|
-
/**
|
|
1427
|
-
* Whether the current token is still valid
|
|
1428
|
-
*/
|
|
1429
|
-
is_token_valid?: boolean;
|
|
1430
|
-
}[];
|
|
1431
|
-
/**
|
|
1432
|
-
* Whether any connections exist
|
|
1433
|
-
*/
|
|
1434
|
-
has_connections: boolean;
|
|
1435
|
-
}
|
|
1436
|
-
export interface $400 {
|
|
1437
|
-
}
|
|
1438
|
-
export interface $500 {
|
|
1439
|
-
}
|
|
1440
|
-
}
|
|
1441
|
-
}
|
|
1442
|
-
namespace GetSharedMailboxMappingById {
|
|
1443
|
-
namespace Parameters {
|
|
1444
|
-
export type SharedInboxId = string;
|
|
1445
|
-
}
|
|
1446
|
-
export interface PathParameters {
|
|
1447
|
-
shared_inbox_id: Parameters.SharedInboxId;
|
|
1448
|
-
}
|
|
1449
|
-
namespace Responses {
|
|
1450
|
-
export type $200 = /**
|
|
1451
|
-
* Mapping between a shared inbox and its Outlook shared mailbox.
|
|
1452
|
-
* This tracks which provider/tenant provisions each shared mailbox.
|
|
1453
|
-
*
|
|
1454
|
-
*/
|
|
1455
|
-
Components.Schemas.SharedMailboxMapping;
|
|
1456
|
-
export interface $400 {
|
|
1457
|
-
}
|
|
1458
|
-
export interface $404 {
|
|
1459
|
-
}
|
|
1460
|
-
export interface $500 {
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
namespace GetSharedMailboxMappings {
|
|
1465
|
-
namespace Responses {
|
|
1466
|
-
export interface $200 {
|
|
1467
|
-
mappings: /**
|
|
1468
|
-
* Mapping between a shared inbox and its Outlook shared mailbox.
|
|
1469
|
-
* This tracks which provider/tenant provisions each shared mailbox.
|
|
1470
|
-
*
|
|
1471
|
-
*/
|
|
1472
|
-
Components.Schemas.SharedMailboxMapping[];
|
|
1473
|
-
/**
|
|
1474
|
-
* Number of mappings
|
|
1475
|
-
*/
|
|
1476
|
-
count: number;
|
|
1477
|
-
}
|
|
1478
|
-
export interface $400 {
|
|
1479
|
-
}
|
|
1480
|
-
export interface $500 {
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
}
|
|
1484
1239
|
namespace GetThreadTimeline {
|
|
1485
1240
|
namespace Parameters {
|
|
1486
1241
|
export type Id = string;
|
|
@@ -1698,39 +1453,6 @@ declare namespace Paths {
|
|
|
1698
1453
|
export type $500 = Components.Responses.InternalServerError;
|
|
1699
1454
|
}
|
|
1700
1455
|
}
|
|
1701
|
-
namespace OutlookOAuthCallback {
|
|
1702
|
-
namespace Parameters {
|
|
1703
|
-
export type AdminConsent = string;
|
|
1704
|
-
export type ClientInfo = string;
|
|
1705
|
-
export type Code = string;
|
|
1706
|
-
export type Error = string;
|
|
1707
|
-
export type ErrorDescription = string;
|
|
1708
|
-
export type ErrorSubcode = string;
|
|
1709
|
-
export type ErrorUri = string;
|
|
1710
|
-
export type SessionState = string;
|
|
1711
|
-
export type State = string;
|
|
1712
|
-
export type Tenant = string;
|
|
1713
|
-
}
|
|
1714
|
-
export interface QueryParameters {
|
|
1715
|
-
code?: Parameters.Code;
|
|
1716
|
-
state: Parameters.State;
|
|
1717
|
-
session_state?: Parameters.SessionState;
|
|
1718
|
-
error?: Parameters.Error;
|
|
1719
|
-
error_description?: Parameters.ErrorDescription;
|
|
1720
|
-
error_subcode?: Parameters.ErrorSubcode;
|
|
1721
|
-
client_info?: Parameters.ClientInfo;
|
|
1722
|
-
error_uri?: Parameters.ErrorUri;
|
|
1723
|
-
admin_consent?: Parameters.AdminConsent;
|
|
1724
|
-
tenant?: Parameters.Tenant;
|
|
1725
|
-
}
|
|
1726
|
-
namespace Responses {
|
|
1727
|
-
export interface $200 {
|
|
1728
|
-
connected?: boolean;
|
|
1729
|
-
expires_at?: string; // date-time
|
|
1730
|
-
scope?: string;
|
|
1731
|
-
}
|
|
1732
|
-
}
|
|
1733
|
-
}
|
|
1734
1456
|
namespace PinThread {
|
|
1735
1457
|
namespace Parameters {
|
|
1736
1458
|
export type Id = string;
|
|
@@ -2731,91 +2453,6 @@ export interface OperationMethods {
|
|
|
2731
2453
|
data?: Paths.SendMessage.RequestBody,
|
|
2732
2454
|
config?: AxiosRequestConfig
|
|
2733
2455
|
): OperationResponse<Paths.SendMessage.Responses.$201>
|
|
2734
|
-
/**
|
|
2735
|
-
* connectOutlook - Connect Outlook
|
|
2736
|
-
*
|
|
2737
|
-
* Returns Microsoft authorization URL for Outlook OAuth.
|
|
2738
|
-
*/
|
|
2739
|
-
'connectOutlook'(
|
|
2740
|
-
parameters?: Parameters<UnknownParamsObject> | null,
|
|
2741
|
-
data?: any,
|
|
2742
|
-
config?: AxiosRequestConfig
|
|
2743
|
-
): OperationResponse<Paths.ConnectOutlook.Responses.$200>
|
|
2744
|
-
/**
|
|
2745
|
-
* getOutlookConnectionStatus - Get Outlook Connection Status
|
|
2746
|
-
*
|
|
2747
|
-
* Returns all Microsoft 365 / Outlook connections for the organization.
|
|
2748
|
-
* Supports multiple connections (one per Azure AD tenant).
|
|
2749
|
-
*
|
|
2750
|
-
* Each connection includes an `action` field that tells the UI what button to show
|
|
2751
|
-
* and what endpoint to call. All actions use GET /outlook/connect.
|
|
2752
|
-
*
|
|
2753
|
-
*/
|
|
2754
|
-
'getOutlookConnectionStatus'(
|
|
2755
|
-
parameters?: Parameters<UnknownParamsObject> | null,
|
|
2756
|
-
data?: any,
|
|
2757
|
-
config?: AxiosRequestConfig
|
|
2758
|
-
): OperationResponse<Paths.GetOutlookConnectionStatus.Responses.$200>
|
|
2759
|
-
/**
|
|
2760
|
-
* disconnectOutlook - Disconnect Outlook
|
|
2761
|
-
*
|
|
2762
|
-
* Removes the Microsoft 365 / Outlook connection for a specific tenant.
|
|
2763
|
-
* This deletes the stored tokens and disconnects the integration.
|
|
2764
|
-
*
|
|
2765
|
-
*/
|
|
2766
|
-
'disconnectOutlook'(
|
|
2767
|
-
parameters?: Parameters<UnknownParamsObject> | null,
|
|
2768
|
-
data?: Paths.DisconnectOutlook.RequestBody,
|
|
2769
|
-
config?: AxiosRequestConfig
|
|
2770
|
-
): OperationResponse<Paths.DisconnectOutlook.Responses.$200>
|
|
2771
|
-
/**
|
|
2772
|
-
* connectSharedMailbox - Connect Outlook Shared Mailbox
|
|
2773
|
-
*
|
|
2774
|
-
* Connects an Outlook shared mailbox as a shared inbox.
|
|
2775
|
-
* 1. Validates the user has access to the shared mailbox via Microsoft Graph API
|
|
2776
|
-
* 2. Creates a shared inbox entry in email-settings with the Outlook provider info
|
|
2777
|
-
*
|
|
2778
|
-
*/
|
|
2779
|
-
'connectSharedMailbox'(
|
|
2780
|
-
parameters?: Parameters<UnknownParamsObject> | null,
|
|
2781
|
-
data?: Paths.ConnectSharedMailbox.RequestBody,
|
|
2782
|
-
config?: AxiosRequestConfig
|
|
2783
|
-
): OperationResponse<Paths.ConnectSharedMailbox.Responses.$201>
|
|
2784
|
-
/**
|
|
2785
|
-
* getSharedMailboxMappings - Get Shared Mailbox Mappings
|
|
2786
|
-
*
|
|
2787
|
-
* Returns all shared mailbox mappings for the organization.
|
|
2788
|
-
* Useful to determine which shared inboxes are connected to Outlook
|
|
2789
|
-
* and which tenant provisions each one.
|
|
2790
|
-
*
|
|
2791
|
-
*/
|
|
2792
|
-
'getSharedMailboxMappings'(
|
|
2793
|
-
parameters?: Parameters<UnknownParamsObject> | null,
|
|
2794
|
-
data?: any,
|
|
2795
|
-
config?: AxiosRequestConfig
|
|
2796
|
-
): OperationResponse<Paths.GetSharedMailboxMappings.Responses.$200>
|
|
2797
|
-
/**
|
|
2798
|
-
* getSharedMailboxMappingById - Get Shared Mailbox Mapping by ID
|
|
2799
|
-
*
|
|
2800
|
-
* Returns the mapping for a specific shared inbox.
|
|
2801
|
-
* Useful to check if a specific inbox is connected to Outlook.
|
|
2802
|
-
*
|
|
2803
|
-
*/
|
|
2804
|
-
'getSharedMailboxMappingById'(
|
|
2805
|
-
parameters?: Parameters<Paths.GetSharedMailboxMappingById.PathParameters> | null,
|
|
2806
|
-
data?: any,
|
|
2807
|
-
config?: AxiosRequestConfig
|
|
2808
|
-
): OperationResponse<Paths.GetSharedMailboxMappingById.Responses.$200>
|
|
2809
|
-
/**
|
|
2810
|
-
* outlookOAuthCallback - Outlook OAuth callback
|
|
2811
|
-
*
|
|
2812
|
-
* Exchanges authorization code for tokens and stores them.
|
|
2813
|
-
*/
|
|
2814
|
-
'outlookOAuthCallback'(
|
|
2815
|
-
parameters?: Parameters<Paths.OutlookOAuthCallback.QueryParameters> | null,
|
|
2816
|
-
data?: any,
|
|
2817
|
-
config?: AxiosRequestConfig
|
|
2818
|
-
): OperationResponse<Paths.OutlookOAuthCallback.Responses.$200>
|
|
2819
2456
|
/**
|
|
2820
2457
|
* getMessage - getMessage
|
|
2821
2458
|
*
|
|
@@ -3286,105 +2923,6 @@ export interface PathsDictionary {
|
|
|
3286
2923
|
config?: AxiosRequestConfig
|
|
3287
2924
|
): OperationResponse<Paths.UpdateMessage.Responses.$201>
|
|
3288
2925
|
}
|
|
3289
|
-
['/outlook/connect']: {
|
|
3290
|
-
/**
|
|
3291
|
-
* connectOutlook - Connect Outlook
|
|
3292
|
-
*
|
|
3293
|
-
* Returns Microsoft authorization URL for Outlook OAuth.
|
|
3294
|
-
*/
|
|
3295
|
-
'get'(
|
|
3296
|
-
parameters?: Parameters<UnknownParamsObject> | null,
|
|
3297
|
-
data?: any,
|
|
3298
|
-
config?: AxiosRequestConfig
|
|
3299
|
-
): OperationResponse<Paths.ConnectOutlook.Responses.$200>
|
|
3300
|
-
}
|
|
3301
|
-
['/outlook/connection/status']: {
|
|
3302
|
-
/**
|
|
3303
|
-
* getOutlookConnectionStatus - Get Outlook Connection Status
|
|
3304
|
-
*
|
|
3305
|
-
* Returns all Microsoft 365 / Outlook connections for the organization.
|
|
3306
|
-
* Supports multiple connections (one per Azure AD tenant).
|
|
3307
|
-
*
|
|
3308
|
-
* Each connection includes an `action` field that tells the UI what button to show
|
|
3309
|
-
* and what endpoint to call. All actions use GET /outlook/connect.
|
|
3310
|
-
*
|
|
3311
|
-
*/
|
|
3312
|
-
'get'(
|
|
3313
|
-
parameters?: Parameters<UnknownParamsObject> | null,
|
|
3314
|
-
data?: any,
|
|
3315
|
-
config?: AxiosRequestConfig
|
|
3316
|
-
): OperationResponse<Paths.GetOutlookConnectionStatus.Responses.$200>
|
|
3317
|
-
}
|
|
3318
|
-
['/outlook/connection/disconnect']: {
|
|
3319
|
-
/**
|
|
3320
|
-
* disconnectOutlook - Disconnect Outlook
|
|
3321
|
-
*
|
|
3322
|
-
* Removes the Microsoft 365 / Outlook connection for a specific tenant.
|
|
3323
|
-
* This deletes the stored tokens and disconnects the integration.
|
|
3324
|
-
*
|
|
3325
|
-
*/
|
|
3326
|
-
'post'(
|
|
3327
|
-
parameters?: Parameters<UnknownParamsObject> | null,
|
|
3328
|
-
data?: Paths.DisconnectOutlook.RequestBody,
|
|
3329
|
-
config?: AxiosRequestConfig
|
|
3330
|
-
): OperationResponse<Paths.DisconnectOutlook.Responses.$200>
|
|
3331
|
-
}
|
|
3332
|
-
['/outlook/shared-mailboxes/connect']: {
|
|
3333
|
-
/**
|
|
3334
|
-
* connectSharedMailbox - Connect Outlook Shared Mailbox
|
|
3335
|
-
*
|
|
3336
|
-
* Connects an Outlook shared mailbox as a shared inbox.
|
|
3337
|
-
* 1. Validates the user has access to the shared mailbox via Microsoft Graph API
|
|
3338
|
-
* 2. Creates a shared inbox entry in email-settings with the Outlook provider info
|
|
3339
|
-
*
|
|
3340
|
-
*/
|
|
3341
|
-
'post'(
|
|
3342
|
-
parameters?: Parameters<UnknownParamsObject> | null,
|
|
3343
|
-
data?: Paths.ConnectSharedMailbox.RequestBody,
|
|
3344
|
-
config?: AxiosRequestConfig
|
|
3345
|
-
): OperationResponse<Paths.ConnectSharedMailbox.Responses.$201>
|
|
3346
|
-
}
|
|
3347
|
-
['/outlook/shared-mailboxes/mappings']: {
|
|
3348
|
-
/**
|
|
3349
|
-
* getSharedMailboxMappings - Get Shared Mailbox Mappings
|
|
3350
|
-
*
|
|
3351
|
-
* Returns all shared mailbox mappings for the organization.
|
|
3352
|
-
* Useful to determine which shared inboxes are connected to Outlook
|
|
3353
|
-
* and which tenant provisions each one.
|
|
3354
|
-
*
|
|
3355
|
-
*/
|
|
3356
|
-
'get'(
|
|
3357
|
-
parameters?: Parameters<UnknownParamsObject> | null,
|
|
3358
|
-
data?: any,
|
|
3359
|
-
config?: AxiosRequestConfig
|
|
3360
|
-
): OperationResponse<Paths.GetSharedMailboxMappings.Responses.$200>
|
|
3361
|
-
}
|
|
3362
|
-
['/outlook/shared-mailboxes/mappings/{shared_inbox_id}']: {
|
|
3363
|
-
/**
|
|
3364
|
-
* getSharedMailboxMappingById - Get Shared Mailbox Mapping by ID
|
|
3365
|
-
*
|
|
3366
|
-
* Returns the mapping for a specific shared inbox.
|
|
3367
|
-
* Useful to check if a specific inbox is connected to Outlook.
|
|
3368
|
-
*
|
|
3369
|
-
*/
|
|
3370
|
-
'get'(
|
|
3371
|
-
parameters?: Parameters<Paths.GetSharedMailboxMappingById.PathParameters> | null,
|
|
3372
|
-
data?: any,
|
|
3373
|
-
config?: AxiosRequestConfig
|
|
3374
|
-
): OperationResponse<Paths.GetSharedMailboxMappingById.Responses.$200>
|
|
3375
|
-
}
|
|
3376
|
-
['/outlook/oauth/callback']: {
|
|
3377
|
-
/**
|
|
3378
|
-
* outlookOAuthCallback - Outlook OAuth callback
|
|
3379
|
-
*
|
|
3380
|
-
* Exchanges authorization code for tokens and stores them.
|
|
3381
|
-
*/
|
|
3382
|
-
'get'(
|
|
3383
|
-
parameters?: Parameters<Paths.OutlookOAuthCallback.QueryParameters> | null,
|
|
3384
|
-
data?: any,
|
|
3385
|
-
config?: AxiosRequestConfig
|
|
3386
|
-
): OperationResponse<Paths.OutlookOAuthCallback.Responses.$200>
|
|
3387
|
-
}
|
|
3388
2926
|
['/v1/message/messages/{id}']: {
|
|
3389
2927
|
/**
|
|
3390
2928
|
* getMessage - getMessage
|
|
@@ -3932,7 +3470,6 @@ export type ReadingScope = Components.Schemas.ReadingScope;
|
|
|
3932
3470
|
export type SearchIDParams = Components.Schemas.SearchIDParams;
|
|
3933
3471
|
export type SearchParams = Components.Schemas.SearchParams;
|
|
3934
3472
|
export type SearchParamsV2 = Components.Schemas.SearchParamsV2;
|
|
3935
|
-
export type SharedMailboxMapping = Components.Schemas.SharedMailboxMapping;
|
|
3936
3473
|
export type Thread = Components.Schemas.Thread;
|
|
3937
3474
|
export type ThreadDoneEvent = Components.Schemas.ThreadDoneEvent;
|
|
3938
3475
|
export type ThreadOpenEvent = Components.Schemas.ThreadOpenEvent;
|
package/dist/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.0.2",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Message API",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.3.0",
|
|
6
6
|
"description": "Send and receive email messages via your epilot organization\n"
|
|
7
7
|
},
|
|
8
8
|
"security": [
|
|
@@ -23,9 +23,6 @@
|
|
|
23
23
|
{
|
|
24
24
|
"name": "Drafts"
|
|
25
25
|
},
|
|
26
|
-
{
|
|
27
|
-
"name": "M365 Integration"
|
|
28
|
-
},
|
|
29
26
|
{
|
|
30
27
|
"name": "message_schema",
|
|
31
28
|
"x-displayName": "Message",
|
|
@@ -130,536 +127,6 @@
|
|
|
130
127
|
}
|
|
131
128
|
}
|
|
132
129
|
},
|
|
133
|
-
"/outlook/connect": {
|
|
134
|
-
"get": {
|
|
135
|
-
"operationId": "connectOutlook",
|
|
136
|
-
"summary": "Connect Outlook",
|
|
137
|
-
"description": "Returns Microsoft authorization URL for Outlook OAuth.",
|
|
138
|
-
"tags": [
|
|
139
|
-
"M365 Integration"
|
|
140
|
-
],
|
|
141
|
-
"responses": {
|
|
142
|
-
"200": {
|
|
143
|
-
"description": "Authorization URL",
|
|
144
|
-
"content": {
|
|
145
|
-
"application/json": {
|
|
146
|
-
"schema": {
|
|
147
|
-
"type": "object",
|
|
148
|
-
"properties": {
|
|
149
|
-
"authorization_url": {
|
|
150
|
-
"type": "string"
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
"/outlook/connection/status": {
|
|
161
|
-
"get": {
|
|
162
|
-
"operationId": "getOutlookConnectionStatus",
|
|
163
|
-
"summary": "Get Outlook Connection Status",
|
|
164
|
-
"description": "Returns all Microsoft 365 / Outlook connections for the organization.\nSupports multiple connections (one per Azure AD tenant).\n\nEach connection includes an `action` field that tells the UI what button to show\nand what endpoint to call. All actions use GET /outlook/connect.\n",
|
|
165
|
-
"tags": [
|
|
166
|
-
"M365 Integration"
|
|
167
|
-
],
|
|
168
|
-
"responses": {
|
|
169
|
-
"200": {
|
|
170
|
-
"description": "Connection status retrieved successfully",
|
|
171
|
-
"content": {
|
|
172
|
-
"application/json": {
|
|
173
|
-
"schema": {
|
|
174
|
-
"type": "object",
|
|
175
|
-
"required": [
|
|
176
|
-
"connections",
|
|
177
|
-
"has_connections"
|
|
178
|
-
],
|
|
179
|
-
"properties": {
|
|
180
|
-
"connections": {
|
|
181
|
-
"type": "array",
|
|
182
|
-
"description": "List of Outlook connections (one per tenant)",
|
|
183
|
-
"items": {
|
|
184
|
-
"type": "object",
|
|
185
|
-
"required": [
|
|
186
|
-
"status",
|
|
187
|
-
"action",
|
|
188
|
-
"action_label",
|
|
189
|
-
"tenant_id"
|
|
190
|
-
],
|
|
191
|
-
"properties": {
|
|
192
|
-
"status": {
|
|
193
|
-
"type": "string",
|
|
194
|
-
"enum": [
|
|
195
|
-
"connected",
|
|
196
|
-
"expired",
|
|
197
|
-
"pending_auth"
|
|
198
|
-
],
|
|
199
|
-
"description": "Current connection status:\n- pending_auth: Admin consent granted, waiting for user OAuth\n- connected: Fully connected with valid tokens\n- expired: Tokens expired, need to re-authenticate\n"
|
|
200
|
-
},
|
|
201
|
-
"action": {
|
|
202
|
-
"type": "string",
|
|
203
|
-
"enum": [
|
|
204
|
-
"connect",
|
|
205
|
-
"authorize",
|
|
206
|
-
"reconnect",
|
|
207
|
-
"none"
|
|
208
|
-
],
|
|
209
|
-
"description": "Action for UI to take (all call GET /outlook/connect):\n- connect: No connection, initiate OAuth\n- authorize: Admin consent done, complete OAuth\n- reconnect: Re-authenticate expired session\n- none: Fully connected, no action needed\n"
|
|
210
|
-
},
|
|
211
|
-
"connected_by_display_name": {
|
|
212
|
-
"type": "string",
|
|
213
|
-
"description": "Display name of user who connected"
|
|
214
|
-
},
|
|
215
|
-
"connected_by_email": {
|
|
216
|
-
"type": "string",
|
|
217
|
-
"format": "email",
|
|
218
|
-
"description": "Email of the user who connected"
|
|
219
|
-
},
|
|
220
|
-
"connected_by_user_id": {
|
|
221
|
-
"type": "string",
|
|
222
|
-
"description": "Azure AD Object ID of user who connected"
|
|
223
|
-
},
|
|
224
|
-
"connected_at": {
|
|
225
|
-
"type": "string",
|
|
226
|
-
"format": "date-time",
|
|
227
|
-
"description": "When the connection was established"
|
|
228
|
-
},
|
|
229
|
-
"updated_at": {
|
|
230
|
-
"type": "string",
|
|
231
|
-
"format": "date-time",
|
|
232
|
-
"description": "When the connection was last updated"
|
|
233
|
-
},
|
|
234
|
-
"tenant_id": {
|
|
235
|
-
"type": "string",
|
|
236
|
-
"description": "Microsoft Azure AD tenant ID"
|
|
237
|
-
},
|
|
238
|
-
"scopes": {
|
|
239
|
-
"type": "array",
|
|
240
|
-
"items": {
|
|
241
|
-
"type": "string"
|
|
242
|
-
},
|
|
243
|
-
"description": "Granted permission scopes"
|
|
244
|
-
},
|
|
245
|
-
"expires_at": {
|
|
246
|
-
"type": "string",
|
|
247
|
-
"format": "date-time",
|
|
248
|
-
"description": "When the current access token expires"
|
|
249
|
-
},
|
|
250
|
-
"is_token_valid": {
|
|
251
|
-
"type": "boolean",
|
|
252
|
-
"description": "Whether the current token is still valid"
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
"has_connections": {
|
|
258
|
-
"type": "boolean",
|
|
259
|
-
"description": "Whether any connections exist"
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
"400": {
|
|
267
|
-
"description": "Bad request - missing organization ID"
|
|
268
|
-
},
|
|
269
|
-
"500": {
|
|
270
|
-
"description": "Internal server error"
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
},
|
|
275
|
-
"/outlook/connection/disconnect": {
|
|
276
|
-
"post": {
|
|
277
|
-
"operationId": "disconnectOutlook",
|
|
278
|
-
"summary": "Disconnect Outlook",
|
|
279
|
-
"description": "Removes the Microsoft 365 / Outlook connection for a specific tenant.\nThis deletes the stored tokens and disconnects the integration.\n",
|
|
280
|
-
"tags": [
|
|
281
|
-
"M365 Integration"
|
|
282
|
-
],
|
|
283
|
-
"requestBody": {
|
|
284
|
-
"required": true,
|
|
285
|
-
"content": {
|
|
286
|
-
"application/json": {
|
|
287
|
-
"schema": {
|
|
288
|
-
"type": "object",
|
|
289
|
-
"required": [
|
|
290
|
-
"tenant_id"
|
|
291
|
-
],
|
|
292
|
-
"properties": {
|
|
293
|
-
"tenant_id": {
|
|
294
|
-
"type": "string",
|
|
295
|
-
"description": "Azure AD Tenant ID of the connection to disconnect"
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
},
|
|
302
|
-
"responses": {
|
|
303
|
-
"200": {
|
|
304
|
-
"description": "Successfully disconnected",
|
|
305
|
-
"content": {
|
|
306
|
-
"application/json": {
|
|
307
|
-
"schema": {
|
|
308
|
-
"type": "object",
|
|
309
|
-
"properties": {
|
|
310
|
-
"success": {
|
|
311
|
-
"type": "boolean"
|
|
312
|
-
},
|
|
313
|
-
"tenant_id": {
|
|
314
|
-
"type": "string",
|
|
315
|
-
"description": "The tenant ID that was disconnected"
|
|
316
|
-
},
|
|
317
|
-
"affected_shared_inboxes": {
|
|
318
|
-
"type": "array",
|
|
319
|
-
"items": {
|
|
320
|
-
"type": "string"
|
|
321
|
-
},
|
|
322
|
-
"description": "List of shared inbox IDs that were affected by the disconnection"
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
},
|
|
329
|
-
"400": {
|
|
330
|
-
"description": "Bad request - missing tenant_id or organization ID"
|
|
331
|
-
},
|
|
332
|
-
"404": {
|
|
333
|
-
"description": "Connection not found"
|
|
334
|
-
},
|
|
335
|
-
"500": {
|
|
336
|
-
"description": "Internal server error"
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
},
|
|
341
|
-
"/outlook/shared-mailboxes/connect": {
|
|
342
|
-
"post": {
|
|
343
|
-
"operationId": "connectSharedMailbox",
|
|
344
|
-
"summary": "Connect Outlook Shared Mailbox",
|
|
345
|
-
"description": "Connects an Outlook shared mailbox as a shared inbox.\n1. Validates the user has access to the shared mailbox via Microsoft Graph API\n2. Creates a shared inbox entry in email-settings with the Outlook provider info\n",
|
|
346
|
-
"tags": [
|
|
347
|
-
"M365 Integration"
|
|
348
|
-
],
|
|
349
|
-
"requestBody": {
|
|
350
|
-
"required": true,
|
|
351
|
-
"content": {
|
|
352
|
-
"application/json": {
|
|
353
|
-
"schema": {
|
|
354
|
-
"type": "object",
|
|
355
|
-
"required": [
|
|
356
|
-
"email"
|
|
357
|
-
],
|
|
358
|
-
"properties": {
|
|
359
|
-
"email": {
|
|
360
|
-
"type": "string",
|
|
361
|
-
"format": "email",
|
|
362
|
-
"description": "Email address of the Outlook shared mailbox to connect"
|
|
363
|
-
},
|
|
364
|
-
"name": {
|
|
365
|
-
"type": "string",
|
|
366
|
-
"description": "Display name for the shared inbox (defaults to mailbox display name)"
|
|
367
|
-
},
|
|
368
|
-
"color": {
|
|
369
|
-
"type": "string",
|
|
370
|
-
"description": "Color for the shared inbox (hex code, defaults to green)"
|
|
371
|
-
},
|
|
372
|
-
"assignees": {
|
|
373
|
-
"type": "array",
|
|
374
|
-
"items": {
|
|
375
|
-
"type": "string"
|
|
376
|
-
},
|
|
377
|
-
"description": "User IDs to assign to this shared inbox"
|
|
378
|
-
},
|
|
379
|
-
"description": {
|
|
380
|
-
"type": "string",
|
|
381
|
-
"description": "Description for the shared inbox"
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
},
|
|
388
|
-
"responses": {
|
|
389
|
-
"201": {
|
|
390
|
-
"description": "Shared mailbox connected successfully",
|
|
391
|
-
"content": {
|
|
392
|
-
"application/json": {
|
|
393
|
-
"schema": {
|
|
394
|
-
"type": "object",
|
|
395
|
-
"properties": {
|
|
396
|
-
"shared_inbox": {
|
|
397
|
-
"type": "object",
|
|
398
|
-
"description": "The created shared inbox from email-settings",
|
|
399
|
-
"properties": {
|
|
400
|
-
"id": {
|
|
401
|
-
"type": "string"
|
|
402
|
-
},
|
|
403
|
-
"name": {
|
|
404
|
-
"type": "string"
|
|
405
|
-
},
|
|
406
|
-
"color": {
|
|
407
|
-
"type": "string"
|
|
408
|
-
},
|
|
409
|
-
"assignees": {
|
|
410
|
-
"type": "array",
|
|
411
|
-
"items": {
|
|
412
|
-
"type": "string"
|
|
413
|
-
}
|
|
414
|
-
},
|
|
415
|
-
"description": {
|
|
416
|
-
"type": "string"
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
},
|
|
420
|
-
"outlook_email": {
|
|
421
|
-
"type": "string",
|
|
422
|
-
"format": "email",
|
|
423
|
-
"description": "The Outlook shared mailbox email address"
|
|
424
|
-
},
|
|
425
|
-
"tenant_id": {
|
|
426
|
-
"type": "string",
|
|
427
|
-
"description": "Azure AD Tenant ID that provisions this mailbox"
|
|
428
|
-
},
|
|
429
|
-
"provider": {
|
|
430
|
-
"type": "string",
|
|
431
|
-
"enum": [
|
|
432
|
-
"outlook"
|
|
433
|
-
],
|
|
434
|
-
"description": "The provider type"
|
|
435
|
-
},
|
|
436
|
-
"display_name": {
|
|
437
|
-
"type": "string",
|
|
438
|
-
"description": "Display name of the shared mailbox"
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
},
|
|
445
|
-
"400": {
|
|
446
|
-
"description": "Bad request - missing email parameter"
|
|
447
|
-
},
|
|
448
|
-
"401": {
|
|
449
|
-
"description": "Not connected to Microsoft 365"
|
|
450
|
-
},
|
|
451
|
-
"403": {
|
|
452
|
-
"description": "Access denied - user does not have access to the shared mailbox"
|
|
453
|
-
},
|
|
454
|
-
"500": {
|
|
455
|
-
"description": "Internal server error"
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
},
|
|
460
|
-
"/outlook/shared-mailboxes/mappings": {
|
|
461
|
-
"get": {
|
|
462
|
-
"operationId": "getSharedMailboxMappings",
|
|
463
|
-
"summary": "Get Shared Mailbox Mappings",
|
|
464
|
-
"description": "Returns all shared mailbox mappings for the organization.\nUseful to determine which shared inboxes are connected to Outlook\nand which tenant provisions each one.\n",
|
|
465
|
-
"tags": [
|
|
466
|
-
"M365 Integration"
|
|
467
|
-
],
|
|
468
|
-
"responses": {
|
|
469
|
-
"200": {
|
|
470
|
-
"description": "Mappings retrieved successfully",
|
|
471
|
-
"content": {
|
|
472
|
-
"application/json": {
|
|
473
|
-
"schema": {
|
|
474
|
-
"type": "object",
|
|
475
|
-
"required": [
|
|
476
|
-
"mappings",
|
|
477
|
-
"count"
|
|
478
|
-
],
|
|
479
|
-
"properties": {
|
|
480
|
-
"mappings": {
|
|
481
|
-
"type": "array",
|
|
482
|
-
"items": {
|
|
483
|
-
"$ref": "#/components/schemas/SharedMailboxMapping"
|
|
484
|
-
}
|
|
485
|
-
},
|
|
486
|
-
"count": {
|
|
487
|
-
"type": "integer",
|
|
488
|
-
"description": "Number of mappings"
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
},
|
|
495
|
-
"400": {
|
|
496
|
-
"description": "Bad request - missing organization ID"
|
|
497
|
-
},
|
|
498
|
-
"500": {
|
|
499
|
-
"description": "Internal server error"
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
},
|
|
504
|
-
"/outlook/shared-mailboxes/mappings/{shared_inbox_id}": {
|
|
505
|
-
"get": {
|
|
506
|
-
"operationId": "getSharedMailboxMappingById",
|
|
507
|
-
"summary": "Get Shared Mailbox Mapping by ID",
|
|
508
|
-
"description": "Returns the mapping for a specific shared inbox.\nUseful to check if a specific inbox is connected to Outlook.\n",
|
|
509
|
-
"tags": [
|
|
510
|
-
"M365 Integration"
|
|
511
|
-
],
|
|
512
|
-
"parameters": [
|
|
513
|
-
{
|
|
514
|
-
"name": "shared_inbox_id",
|
|
515
|
-
"in": "path",
|
|
516
|
-
"required": true,
|
|
517
|
-
"schema": {
|
|
518
|
-
"type": "string"
|
|
519
|
-
},
|
|
520
|
-
"description": "The shared inbox entity ID"
|
|
521
|
-
}
|
|
522
|
-
],
|
|
523
|
-
"responses": {
|
|
524
|
-
"200": {
|
|
525
|
-
"description": "Mapping retrieved successfully",
|
|
526
|
-
"content": {
|
|
527
|
-
"application/json": {
|
|
528
|
-
"schema": {
|
|
529
|
-
"$ref": "#/components/schemas/SharedMailboxMapping"
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
},
|
|
534
|
-
"400": {
|
|
535
|
-
"description": "Bad request - missing organization ID or shared_inbox_id"
|
|
536
|
-
},
|
|
537
|
-
"404": {
|
|
538
|
-
"description": "Mapping not found"
|
|
539
|
-
},
|
|
540
|
-
"500": {
|
|
541
|
-
"description": "Internal server error"
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
},
|
|
546
|
-
"/outlook/oauth/callback": {
|
|
547
|
-
"get": {
|
|
548
|
-
"operationId": "outlookOAuthCallback",
|
|
549
|
-
"summary": "Outlook OAuth callback",
|
|
550
|
-
"description": "Exchanges authorization code for tokens and stores them.",
|
|
551
|
-
"tags": [
|
|
552
|
-
"M365 Integration"
|
|
553
|
-
],
|
|
554
|
-
"security": [],
|
|
555
|
-
"parameters": [
|
|
556
|
-
{
|
|
557
|
-
"name": "code",
|
|
558
|
-
"in": "query",
|
|
559
|
-
"required": false,
|
|
560
|
-
"schema": {
|
|
561
|
-
"type": "string"
|
|
562
|
-
}
|
|
563
|
-
},
|
|
564
|
-
{
|
|
565
|
-
"name": "state",
|
|
566
|
-
"in": "query",
|
|
567
|
-
"required": true,
|
|
568
|
-
"schema": {
|
|
569
|
-
"type": "string"
|
|
570
|
-
}
|
|
571
|
-
},
|
|
572
|
-
{
|
|
573
|
-
"name": "session_state",
|
|
574
|
-
"in": "query",
|
|
575
|
-
"required": false,
|
|
576
|
-
"schema": {
|
|
577
|
-
"type": "string"
|
|
578
|
-
}
|
|
579
|
-
},
|
|
580
|
-
{
|
|
581
|
-
"name": "error",
|
|
582
|
-
"in": "query",
|
|
583
|
-
"required": false,
|
|
584
|
-
"schema": {
|
|
585
|
-
"type": "string"
|
|
586
|
-
}
|
|
587
|
-
},
|
|
588
|
-
{
|
|
589
|
-
"name": "error_description",
|
|
590
|
-
"in": "query",
|
|
591
|
-
"required": false,
|
|
592
|
-
"schema": {
|
|
593
|
-
"type": "string"
|
|
594
|
-
}
|
|
595
|
-
},
|
|
596
|
-
{
|
|
597
|
-
"name": "error_subcode",
|
|
598
|
-
"in": "query",
|
|
599
|
-
"required": false,
|
|
600
|
-
"schema": {
|
|
601
|
-
"type": "string"
|
|
602
|
-
}
|
|
603
|
-
},
|
|
604
|
-
{
|
|
605
|
-
"name": "client_info",
|
|
606
|
-
"in": "query",
|
|
607
|
-
"required": false,
|
|
608
|
-
"schema": {
|
|
609
|
-
"type": "string"
|
|
610
|
-
}
|
|
611
|
-
},
|
|
612
|
-
{
|
|
613
|
-
"name": "error_uri",
|
|
614
|
-
"in": "query",
|
|
615
|
-
"required": false,
|
|
616
|
-
"schema": {
|
|
617
|
-
"type": "string"
|
|
618
|
-
}
|
|
619
|
-
},
|
|
620
|
-
{
|
|
621
|
-
"name": "admin_consent",
|
|
622
|
-
"in": "query",
|
|
623
|
-
"required": false,
|
|
624
|
-
"schema": {
|
|
625
|
-
"type": "string"
|
|
626
|
-
}
|
|
627
|
-
},
|
|
628
|
-
{
|
|
629
|
-
"name": "tenant",
|
|
630
|
-
"in": "query",
|
|
631
|
-
"required": false,
|
|
632
|
-
"schema": {
|
|
633
|
-
"type": "string"
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
],
|
|
637
|
-
"responses": {
|
|
638
|
-
"200": {
|
|
639
|
-
"description": "Stored",
|
|
640
|
-
"content": {
|
|
641
|
-
"application/json": {
|
|
642
|
-
"schema": {
|
|
643
|
-
"type": "object",
|
|
644
|
-
"properties": {
|
|
645
|
-
"connected": {
|
|
646
|
-
"type": "boolean"
|
|
647
|
-
},
|
|
648
|
-
"expires_at": {
|
|
649
|
-
"type": "string",
|
|
650
|
-
"format": "date-time"
|
|
651
|
-
},
|
|
652
|
-
"scope": {
|
|
653
|
-
"type": "string"
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
},
|
|
663
130
|
"/v1/message/messages/{id}": {
|
|
664
131
|
"get": {
|
|
665
132
|
"operationId": "getMessage",
|
|
@@ -3075,52 +2542,6 @@
|
|
|
3075
2542
|
"!account.*._files",
|
|
3076
2543
|
"**._product"
|
|
3077
2544
|
]
|
|
3078
|
-
},
|
|
3079
|
-
"SharedMailboxMapping": {
|
|
3080
|
-
"type": "object",
|
|
3081
|
-
"description": "Mapping between a shared inbox and its Outlook shared mailbox.\nThis tracks which provider/tenant provisions each shared mailbox.\n",
|
|
3082
|
-
"required": [
|
|
3083
|
-
"shared_inbox_id",
|
|
3084
|
-
"outlook_email",
|
|
3085
|
-
"tenant_id",
|
|
3086
|
-
"provider",
|
|
3087
|
-
"connected_at"
|
|
3088
|
-
],
|
|
3089
|
-
"properties": {
|
|
3090
|
-
"shared_inbox_id": {
|
|
3091
|
-
"type": "string",
|
|
3092
|
-
"description": "The email-settings shared inbox entity ID"
|
|
3093
|
-
},
|
|
3094
|
-
"outlook_email": {
|
|
3095
|
-
"type": "string",
|
|
3096
|
-
"format": "email",
|
|
3097
|
-
"description": "The Outlook shared mailbox email address"
|
|
3098
|
-
},
|
|
3099
|
-
"tenant_id": {
|
|
3100
|
-
"type": "string",
|
|
3101
|
-
"description": "Azure AD Tenant ID that provisions this mailbox"
|
|
3102
|
-
},
|
|
3103
|
-
"provider": {
|
|
3104
|
-
"type": "string",
|
|
3105
|
-
"enum": [
|
|
3106
|
-
"outlook"
|
|
3107
|
-
],
|
|
3108
|
-
"description": "Provider type (for future extensibility)"
|
|
3109
|
-
},
|
|
3110
|
-
"display_name": {
|
|
3111
|
-
"type": "string",
|
|
3112
|
-
"description": "Display name from Outlook"
|
|
3113
|
-
},
|
|
3114
|
-
"connected_at": {
|
|
3115
|
-
"type": "string",
|
|
3116
|
-
"format": "date-time",
|
|
3117
|
-
"description": "When the mailbox was connected"
|
|
3118
|
-
},
|
|
3119
|
-
"connected_by_user_id": {
|
|
3120
|
-
"type": "string",
|
|
3121
|
-
"description": "User who connected this mailbox"
|
|
3122
|
-
}
|
|
3123
|
-
}
|
|
3124
2545
|
}
|
|
3125
2546
|
}
|
|
3126
2547
|
},
|