@epilot/email-settings-client 1.3.0 → 1.4.0

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.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={330(e,o,s){var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0});var n=t(s(466));o.default=n.default},466(e){e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v2/email-settings/email-addresses/epilot:provision":{"put":{"operationId":"provisionEpilotEmailAddress","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/email-settings/email-addresses/primary":{"post":{"operationId":"setEmailAddressPrimary","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/email-settings/email-addresses/{id}":{"get":{"operationId":"getEmailAddress","parameters":[{"$ref":"#/components/parameters/EmailAddressId"}],"responses":{}},"delete":{"operationId":"deleteEmailAddress","parameters":[{"$ref":"#/components/parameters/EmailAddressId"}],"responses":{}},"put":{"operationId":"updateEmailAddress","parameters":[{"$ref":"#/components/parameters/EmailAddressId"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/email-settings/email-addresses":{"get":{"operationId":"listEmailAddresses","responses":{}},"post":{"operationId":"addEmailAddress","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/email-settings/shared-inboxes/{id}":{"get":{"operationId":"getSharedInbox","parameters":[{"$ref":"#/components/parameters/SharedInboxId"}],"responses":{}},"delete":{"operationId":"deleteSharedInbox","parameters":[{"$ref":"#/components/parameters/SharedInboxId"},{"name":"successorInboxId","in":"query","required":false}],"responses":{}},"put":{"operationId":"updateSharedInbox","parameters":[{"$ref":"#/components/parameters/SharedInboxId"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/email-settings/shared-inboxes":{"get":{"operationId":"listSharedInboxes","responses":{}},"post":{"operationId":"addSharedInbox","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/email-settings/inbox-buckets":{"get":{"operationId":"listInboxBuckets","responses":{}}},"/v2/outlook/connect":{"get":{"operationId":"connectOutlook","responses":{}}},"/v2/outlook/connection/status":{"get":{"operationId":"getOutlookConnectionStatus","responses":{}}},"/v2/outlook/connection/disconnect":{"post":{"operationId":"disconnectOutlook","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/outlook/mailbox/connect":{"post":{"operationId":"connectOutlookMailbox","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/outlook/mailbox/{email}/disconnect":{"post":{"operationId":"disconnectOutlookMailbox","parameters":[{"name":"email","in":"path","required":true}],"responses":{}}},"/v2/outlook/mailbox/mappings":{"get":{"operationId":"getConnectedOutlookEmails","responses":{}}},"/v2/outlook/test-webhook":{"get":{"operationId":"testWebhookGet","parameters":[{"name":"validationToken","in":"query","required":false}],"responses":{}},"post":{"operationId":"testWebhookPost","parameters":[{"name":"validationToken","in":"query","required":false},{"name":"debugMessages","in":"query","required":false}],"requestBody":{"required":false,"content":{"application/json":{},"plain/text":{}}},"responses":{}}},"/v2/outlook/oauth/callback":{"get":{"operationId":"outlookOAuthCallback","parameters":[{"name":"code","in":"query","required":false},{"name":"state","in":"query","required":true},{"name":"session_state","in":"query","required":false},{"name":"error","in":"query","required":false},{"name":"error_description","in":"query","required":false},{"name":"error_subcode","in":"query","required":false},{"name":"client_info","in":"query","required":false},{"name":"error_uri","in":"query","required":false},{"name":"admin_consent","in":"query","required":false},{"name":"tenant","in":"query","required":false}],"responses":{}}},"/v1/email-settings":{"get":{"operationId":"getSettings","parameters":[{"name":"type","in":"query","required":true},{"name":"id","in":"query"}],"responses":{}},"post":{"operationId":"addSetting","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteSetting","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/{id}":{"post":{"operationId":"updateSetting","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/domain":{"post":{"operationId":"addDomain","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteDomain","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/domain/name-servers:verify":{"post":{"operationId":"verifyNameServers","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/domain:verify":{"post":{"operationId":"verifyDomain","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}}},"components":{"responses":{"ListInboxBucketsSuccessResponse":{"content":{"application/json":{}}},"ProvisionEpilotEmailAddressSuccessResponse":{"content":{"application/json":{}}},"SetEmailAddressPrimarySuccessResponse":{"content":{"application/json":{}}},"CreateEmailAddressSuccessResponse":{"content":{"application/json":{}}},"UpdateEmailAddressSuccessResponse":{"content":{"application/json":{}}},"GetEmailAddressSuccessResponse":{"content":{"application/json":{}}},"ListEmailAddressesSuccessResponse":{"content":{"application/json":{}}},"NoContent":{},"CreateSharedInboxSuccessResponse":{"content":{"application/json":{}}},"UpdateSharedInboxSuccessResponse":{"content":{"application/json":{}}},"GetSharedInboxSuccessResponse":{"content":{"application/json":{}}},"ListSharedInboxesSuccessResponse":{"content":{"application/json":{}}},"BadRequest":{"content":{"application/json":{}}},"Forbidden":{"content":{"application/json":{}}},"NotFound":{"content":{"application/json":{}}},"Conflict":{"content":{"application/json":{}}},"InternalServerError":{"content":{"application/json":{}}},"OutlookErrorResponse":{"content":{"application/json":{}}}},"parameters":{"EmailAddressId":{"name":"id","in":"path","required":true},"SharedInboxId":{"name":"id","in":"path","required":true}}},"servers":[{"url":"https://email-settings.sls.epilot.io"}]}')}},o={},s=function s(t){var n=o[t];if(void 0!==n)return n.exports;var r=o[t]={exports:{}};return e[t].call(r.exports,r,r.exports,s),r.exports}(330),t=exports;for(var n in s)t[n]=s[n];s.__esModule&&Object.defineProperty(t,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={330(e,o,t){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0});var n=s(t(466));o.default=n.default},466(e){e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v2/email-settings/email-addresses/epilot:provision":{"put":{"operationId":"provisionEpilotEmailAddress","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/email-settings/email-addresses/primary":{"post":{"operationId":"setEmailAddressPrimary","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/email-settings/email-addresses/{id}":{"get":{"operationId":"getEmailAddress","parameters":[{"$ref":"#/components/parameters/EmailAddressId"}],"responses":{}},"delete":{"operationId":"deleteEmailAddress","parameters":[{"$ref":"#/components/parameters/EmailAddressId"}],"responses":{}},"put":{"operationId":"updateEmailAddress","parameters":[{"$ref":"#/components/parameters/EmailAddressId"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/email-settings/email-addresses":{"get":{"operationId":"listEmailAddresses","responses":{}},"post":{"operationId":"addEmailAddress","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/email-settings/shared-inboxes/{id}":{"get":{"operationId":"getSharedInbox","parameters":[{"$ref":"#/components/parameters/SharedInboxId"}],"responses":{}},"delete":{"operationId":"deleteSharedInbox","parameters":[{"$ref":"#/components/parameters/SharedInboxId"},{"name":"successorInboxId","in":"query","required":false}],"responses":{}},"put":{"operationId":"updateSharedInbox","parameters":[{"$ref":"#/components/parameters/SharedInboxId"}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/email-settings/shared-inboxes":{"get":{"operationId":"listSharedInboxes","responses":{}},"post":{"operationId":"addSharedInbox","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/email-settings/inbox-buckets":{"get":{"operationId":"listInboxBuckets","responses":{}}},"/v2/outlook/connect":{"get":{"operationId":"connectOutlook","responses":{}}},"/v2/outlook/connection/status":{"get":{"operationId":"getOutlookConnectionStatus","responses":{}}},"/v2/outlook/connection/disconnect":{"post":{"operationId":"disconnectOutlook","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/outlook/mailbox/connect":{"post":{"operationId":"connectOutlookMailbox","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/outlook/mailbox/{email}/disconnect":{"post":{"operationId":"disconnectOutlookMailbox","parameters":[{"name":"email","in":"path","required":true}],"responses":{}}},"/v2/outlook/mailbox/{email}/sync":{"post":{"operationId":"startMailboxSync","parameters":[{"name":"email","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/outlook/mailbox/{email}/sync/status":{"get":{"operationId":"getMailboxSyncStatus","parameters":[{"name":"email","in":"path","required":true}],"responses":{}}},"/v2/outlook/mailbox/{email}/sync/retry":{"post":{"operationId":"retryMailboxSync","parameters":[{"name":"email","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/outlook/mailbox/mappings":{"get":{"operationId":"getConnectedOutlookEmails","responses":{}}},"/v2/outlook/oauth/callback":{"get":{"operationId":"outlookOAuthCallback","parameters":[{"name":"code","in":"query","required":false},{"name":"state","in":"query","required":true},{"name":"session_state","in":"query","required":false},{"name":"error","in":"query","required":false},{"name":"error_description","in":"query","required":false},{"name":"error_subcode","in":"query","required":false},{"name":"client_info","in":"query","required":false},{"name":"error_uri","in":"query","required":false},{"name":"admin_consent","in":"query","required":false},{"name":"tenant","in":"query","required":false}],"responses":{}}},"/v1/email-settings":{"get":{"operationId":"getSettings","parameters":[{"name":"type","in":"query","required":true},{"name":"id","in":"query"}],"responses":{}},"post":{"operationId":"addSetting","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteSetting","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/{id}":{"post":{"operationId":"updateSetting","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/domain":{"post":{"operationId":"addDomain","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteDomain","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/domain/name-servers:verify":{"post":{"operationId":"verifyNameServers","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/domain:verify":{"post":{"operationId":"verifyDomain","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}}},"components":{"responses":{"ListInboxBucketsSuccessResponse":{"content":{"application/json":{}}},"ProvisionEpilotEmailAddressSuccessResponse":{"content":{"application/json":{}}},"SetEmailAddressPrimarySuccessResponse":{"content":{"application/json":{}}},"CreateEmailAddressSuccessResponse":{"content":{"application/json":{}}},"UpdateEmailAddressSuccessResponse":{"content":{"application/json":{}}},"GetEmailAddressSuccessResponse":{"content":{"application/json":{}}},"ListEmailAddressesSuccessResponse":{"content":{"application/json":{}}},"NoContent":{},"CreateSharedInboxSuccessResponse":{"content":{"application/json":{}}},"UpdateSharedInboxSuccessResponse":{"content":{"application/json":{}}},"GetSharedInboxSuccessResponse":{"content":{"application/json":{}}},"ListSharedInboxesSuccessResponse":{"content":{"application/json":{}}},"BadRequest":{"content":{"application/json":{}}},"Forbidden":{"content":{"application/json":{}}},"NotFound":{"content":{"application/json":{}}},"Conflict":{"content":{"application/json":{}}},"InternalServerError":{"content":{"application/json":{}}},"OutlookErrorResponse":{"content":{"application/json":{}}}},"parameters":{"EmailAddressId":{"name":"id","in":"path","required":true},"SharedInboxId":{"name":"id","in":"path","required":true}}},"servers":[{"url":"https://email-settings.sls.epilot.io"}]}')}},o={},t=function t(s){var n=o[s];if(void 0!==n)return n.exports;var r=o[s]={exports:{}};return e[s].call(r.exports,r,r.exports,t),r.exports}(330),s=exports;for(var n in t)s[n]=t[n];t.__esModule&&Object.defineProperty(s,"__esModule",{value:!0})})();
package/dist/openapi.d.ts CHANGED
@@ -298,6 +298,28 @@ declare namespace Components {
298
298
  */
299
299
  inbox_id: string;
300
300
  }
301
+ export type MailboxSyncFolderStatuses = "PENDING" | "RUNNING" | "COMPLETED" | "FAILED" | "SKIPPED";
302
+ export interface MailboxSyncStatus {
303
+ execution_id: string;
304
+ status: MailboxSyncStatuses;
305
+ timeframe: MailboxSyncTimeframePeriods;
306
+ started_at: string; // date-time
307
+ completed_at?: string; // date-time
308
+ inbox?: {
309
+ status?: MailboxSyncFolderStatuses;
310
+ total_messages?: number;
311
+ processed_messages?: number;
312
+ failed_messages?: number;
313
+ };
314
+ sent_items?: {
315
+ status?: MailboxSyncFolderStatuses;
316
+ total_messages?: number;
317
+ processed_messages?: number;
318
+ failed_messages?: number;
319
+ };
320
+ }
321
+ export type MailboxSyncStatuses = "RUNNING" | "COMPLETED" | "COMPLETED_WITH_ERRORS" | "FAILED" | "CANCELLED";
322
+ export type MailboxSyncTimeframePeriods = "5m" | "1w" | "2w" | "1m";
301
323
  export interface OutlookConnectionError {
302
324
  /**
303
325
  * Error code or message from the OAuth flow.
@@ -775,6 +797,12 @@ declare namespace Paths {
775
797
  * Shared inbox ID to associate with the mailbox. Defaults to the default shared inbox.
776
798
  */
777
799
  shared_inbox_id?: string;
800
+ /**
801
+ * Optional timeframe for initial mailbox sync. When provided, triggers an automatic
802
+ * mailbox sync after connecting the mailbox, syncing emails from the specified period.
803
+ *
804
+ */
805
+ mailboxSyncTimeframe?: "5m" | "1w" | "2w" | "1m";
778
806
  }
779
807
  namespace Responses {
780
808
  export interface $201 {
@@ -953,6 +981,21 @@ declare namespace Paths {
953
981
  export type $500 = Components.Responses.InternalServerError;
954
982
  }
955
983
  }
984
+ namespace GetMailboxSyncStatus {
985
+ namespace Parameters {
986
+ export type Email = string; // email
987
+ }
988
+ export interface PathParameters {
989
+ email: Parameters.Email /* email */;
990
+ }
991
+ namespace Responses {
992
+ export type $200 = Components.Schemas.MailboxSyncStatus;
993
+ export interface $404 {
994
+ }
995
+ export interface $500 {
996
+ }
997
+ }
998
+ }
956
999
  namespace GetOutlookConnectionStatus {
957
1000
  namespace Responses {
958
1001
  export interface $200 {
@@ -1063,6 +1106,46 @@ declare namespace Paths {
1063
1106
  export type $500 = Components.Responses.InternalServerError;
1064
1107
  }
1065
1108
  }
1109
+ namespace RetryMailboxSync {
1110
+ namespace Parameters {
1111
+ export type Email = string; // email
1112
+ }
1113
+ export interface PathParameters {
1114
+ email: Parameters.Email /* email */;
1115
+ }
1116
+ export interface RequestBody {
1117
+ /**
1118
+ * Execution ID of the sync to retry
1119
+ */
1120
+ sync_id: string;
1121
+ /**
1122
+ * Retry scope. Use 'all_failed' to retry all retryable failed messages.
1123
+ */
1124
+ scope?: "all_failed";
1125
+ /**
1126
+ * Specific Graph message IDs to retry (alternative to scope)
1127
+ */
1128
+ message_ids?: string[];
1129
+ }
1130
+ namespace Responses {
1131
+ export interface $202 {
1132
+ /**
1133
+ * Execution ID for the retry sync
1134
+ */
1135
+ retry_execution_id: string;
1136
+ /**
1137
+ * Number of messages queued for retry
1138
+ */
1139
+ messages_queued: number;
1140
+ }
1141
+ export interface $404 {
1142
+ }
1143
+ export interface $409 {
1144
+ }
1145
+ export interface $500 {
1146
+ }
1147
+ }
1148
+ }
1066
1149
  namespace SetEmailAddressPrimary {
1067
1150
  export type RequestBody = /* Request payload for setting an email address as the organization's primary address. */ Components.Schemas.SetEmailAddressPrimaryPayload;
1068
1151
  namespace Responses {
@@ -1073,46 +1156,40 @@ declare namespace Paths {
1073
1156
  export type $500 = Components.Responses.InternalServerError;
1074
1157
  }
1075
1158
  }
1076
- namespace TestWebhookGet {
1077
- namespace Parameters {
1078
- export type ValidationToken = string;
1079
- }
1080
- export interface QueryParameters {
1081
- validationToken?: Parameters.ValidationToken;
1082
- }
1083
- namespace Responses {
1084
- export type $200 = string;
1085
- export interface $202 {
1086
- message?: string;
1087
- timestamp?: string; // date-time
1088
- }
1089
- }
1090
- }
1091
- namespace TestWebhookPost {
1159
+ namespace StartMailboxSync {
1092
1160
  namespace Parameters {
1093
- export type DebugMessages = boolean;
1094
- export type ValidationToken = string;
1161
+ export type Email = string; // email
1095
1162
  }
1096
- export interface QueryParameters {
1097
- validationToken?: Parameters.ValidationToken;
1098
- debugMessages?: Parameters.DebugMessages;
1163
+ export interface PathParameters {
1164
+ email: Parameters.Email /* email */;
1099
1165
  }
1100
- /**
1101
- * Graph API notification payload
1102
- */
1103
1166
  export interface RequestBody {
1104
- value?: {
1105
- subscriptionId?: string;
1106
- changeType?: string;
1107
- resource?: string;
1108
- clientState?: string;
1109
- }[];
1167
+ /**
1168
+ * Sync period:
1169
+ * - 5m: last 5 minutes (quick sync)
1170
+ * - 1w: 1 week
1171
+ * - 2w: 2 weeks
1172
+ * - 1m: 1 month
1173
+ *
1174
+ */
1175
+ timeframe: Components.Schemas.MailboxSyncTimeframePeriods;
1110
1176
  }
1111
1177
  namespace Responses {
1112
- export type $200 = string;
1113
1178
  export interface $202 {
1114
- message?: string;
1115
- timestamp?: string; // date-time
1179
+ /**
1180
+ * The execution ID
1181
+ */
1182
+ execution_id: string;
1183
+ status: Components.Schemas.MailboxSyncStatuses;
1184
+ timeframe: Components.Schemas.MailboxSyncTimeframePeriods;
1185
+ }
1186
+ export interface $400 {
1187
+ }
1188
+ export interface $404 {
1189
+ }
1190
+ export interface $409 {
1191
+ }
1192
+ export interface $500 {
1116
1193
  }
1117
1194
  }
1118
1195
  }
@@ -1472,42 +1549,53 @@ export interface OperationMethods {
1472
1549
  config?: AxiosRequestConfig
1473
1550
  ): OperationResponse<Paths.DisconnectOutlookMailbox.Responses.$200>
1474
1551
  /**
1475
- * getConnectedOutlookEmails - getConnectedOutlookEmails
1552
+ * startMailboxSync - Start Mailbox Sync
1476
1553
  *
1477
- * Returns all Outlook email addresses connected to the organization.
1554
+ * Triggers an Outlook mailbox sync for the specified email address.
1555
+ * Syncs existing emails (inbox + sent items) for the specified timeframe.
1478
1556
  *
1479
1557
  */
1480
- 'getConnectedOutlookEmails'(
1481
- parameters?: Parameters<UnknownParamsObject> | null,
1482
- data?: any,
1558
+ 'startMailboxSync'(
1559
+ parameters?: Parameters<Paths.StartMailboxSync.PathParameters> | null,
1560
+ data?: Paths.StartMailboxSync.RequestBody,
1483
1561
  config?: AxiosRequestConfig
1484
- ): OperationResponse<Paths.GetConnectedOutlookEmails.Responses.$200>
1562
+ ): OperationResponse<Paths.StartMailboxSync.Responses.$202>
1485
1563
  /**
1486
- * testWebhookGet - testWebhookGet
1564
+ * getMailboxSyncStatus - Get Mailbox Sync Status
1487
1565
  *
1488
- * Test endpoint for debugging Graph API webhook notifications via ngrok.
1489
- * Handles Microsoft Graph subscription validation requests by returning the validationToken.
1490
- * This is a PUBLIC endpoint with no authentication.
1566
+ * Returns the current or latest sync status for the specified mailbox.
1567
+ * Poll this endpoint to track sync progress.
1491
1568
  *
1492
1569
  */
1493
- 'testWebhookGet'(
1494
- parameters?: Parameters<Paths.TestWebhookGet.QueryParameters> | null,
1570
+ 'getMailboxSyncStatus'(
1571
+ parameters?: Parameters<Paths.GetMailboxSyncStatus.PathParameters> | null,
1495
1572
  data?: any,
1496
1573
  config?: AxiosRequestConfig
1497
- ): OperationResponse<Paths.TestWebhookGet.Responses.$200 | Paths.TestWebhookGet.Responses.$202>
1574
+ ): OperationResponse<Paths.GetMailboxSyncStatus.Responses.$200>
1575
+ /**
1576
+ * retryMailboxSync - Retry Failed Messages
1577
+ *
1578
+ * Retries failed messages from a previous sync execution.
1579
+ * Only retries messages with status FAILED (not PERMANENTLY_FAILED).
1580
+ * Messages that fail 3+ retries become PERMANENTLY_FAILED.
1581
+ *
1582
+ */
1583
+ 'retryMailboxSync'(
1584
+ parameters?: Parameters<Paths.RetryMailboxSync.PathParameters> | null,
1585
+ data?: Paths.RetryMailboxSync.RequestBody,
1586
+ config?: AxiosRequestConfig
1587
+ ): OperationResponse<Paths.RetryMailboxSync.Responses.$202>
1498
1588
  /**
1499
- * testWebhookPost - testWebhookPost
1589
+ * getConnectedOutlookEmails - getConnectedOutlookEmails
1500
1590
  *
1501
- * Test endpoint for debugging Graph API webhook notifications via ngrok.
1502
- * Logs all incoming webhook payloads for debugging purposes.
1503
- * This is a PUBLIC endpoint with no authentication.
1591
+ * Returns all Outlook email addresses connected to the organization.
1504
1592
  *
1505
1593
  */
1506
- 'testWebhookPost'(
1507
- parameters?: Parameters<Paths.TestWebhookPost.QueryParameters> | null,
1508
- data?: Paths.TestWebhookPost.RequestBody,
1594
+ 'getConnectedOutlookEmails'(
1595
+ parameters?: Parameters<UnknownParamsObject> | null,
1596
+ data?: any,
1509
1597
  config?: AxiosRequestConfig
1510
- ): OperationResponse<Paths.TestWebhookPost.Responses.$200 | Paths.TestWebhookPost.Responses.$202>
1598
+ ): OperationResponse<Paths.GetConnectedOutlookEmails.Responses.$200>
1511
1599
  /**
1512
1600
  * outlookOAuthCallback - outlookOAuthCallback
1513
1601
  *
@@ -1941,46 +2029,61 @@ export interface PathsDictionary {
1941
2029
  config?: AxiosRequestConfig
1942
2030
  ): OperationResponse<Paths.DisconnectOutlookMailbox.Responses.$200>
1943
2031
  }
1944
- ['/v2/outlook/mailbox/mappings']: {
2032
+ ['/v2/outlook/mailbox/{email}/sync']: {
1945
2033
  /**
1946
- * getConnectedOutlookEmails - getConnectedOutlookEmails
2034
+ * startMailboxSync - Start Mailbox Sync
1947
2035
  *
1948
- * Returns all Outlook email addresses connected to the organization.
2036
+ * Triggers an Outlook mailbox sync for the specified email address.
2037
+ * Syncs existing emails (inbox + sent items) for the specified timeframe.
1949
2038
  *
1950
2039
  */
1951
- 'get'(
1952
- parameters?: Parameters<UnknownParamsObject> | null,
1953
- data?: any,
2040
+ 'post'(
2041
+ parameters?: Parameters<Paths.StartMailboxSync.PathParameters> | null,
2042
+ data?: Paths.StartMailboxSync.RequestBody,
1954
2043
  config?: AxiosRequestConfig
1955
- ): OperationResponse<Paths.GetConnectedOutlookEmails.Responses.$200>
2044
+ ): OperationResponse<Paths.StartMailboxSync.Responses.$202>
1956
2045
  }
1957
- ['/v2/outlook/test-webhook']: {
2046
+ ['/v2/outlook/mailbox/{email}/sync/status']: {
1958
2047
  /**
1959
- * testWebhookGet - testWebhookGet
2048
+ * getMailboxSyncStatus - Get Mailbox Sync Status
1960
2049
  *
1961
- * Test endpoint for debugging Graph API webhook notifications via ngrok.
1962
- * Handles Microsoft Graph subscription validation requests by returning the validationToken.
1963
- * This is a PUBLIC endpoint with no authentication.
2050
+ * Returns the current or latest sync status for the specified mailbox.
2051
+ * Poll this endpoint to track sync progress.
1964
2052
  *
1965
2053
  */
1966
2054
  'get'(
1967
- parameters?: Parameters<Paths.TestWebhookGet.QueryParameters> | null,
2055
+ parameters?: Parameters<Paths.GetMailboxSyncStatus.PathParameters> | null,
1968
2056
  data?: any,
1969
2057
  config?: AxiosRequestConfig
1970
- ): OperationResponse<Paths.TestWebhookGet.Responses.$200 | Paths.TestWebhookGet.Responses.$202>
2058
+ ): OperationResponse<Paths.GetMailboxSyncStatus.Responses.$200>
2059
+ }
2060
+ ['/v2/outlook/mailbox/{email}/sync/retry']: {
1971
2061
  /**
1972
- * testWebhookPost - testWebhookPost
2062
+ * retryMailboxSync - Retry Failed Messages
1973
2063
  *
1974
- * Test endpoint for debugging Graph API webhook notifications via ngrok.
1975
- * Logs all incoming webhook payloads for debugging purposes.
1976
- * This is a PUBLIC endpoint with no authentication.
2064
+ * Retries failed messages from a previous sync execution.
2065
+ * Only retries messages with status FAILED (not PERMANENTLY_FAILED).
2066
+ * Messages that fail 3+ retries become PERMANENTLY_FAILED.
1977
2067
  *
1978
2068
  */
1979
2069
  'post'(
1980
- parameters?: Parameters<Paths.TestWebhookPost.QueryParameters> | null,
1981
- data?: Paths.TestWebhookPost.RequestBody,
2070
+ parameters?: Parameters<Paths.RetryMailboxSync.PathParameters> | null,
2071
+ data?: Paths.RetryMailboxSync.RequestBody,
2072
+ config?: AxiosRequestConfig
2073
+ ): OperationResponse<Paths.RetryMailboxSync.Responses.$202>
2074
+ }
2075
+ ['/v2/outlook/mailbox/mappings']: {
2076
+ /**
2077
+ * getConnectedOutlookEmails - getConnectedOutlookEmails
2078
+ *
2079
+ * Returns all Outlook email addresses connected to the organization.
2080
+ *
2081
+ */
2082
+ 'get'(
2083
+ parameters?: Parameters<UnknownParamsObject> | null,
2084
+ data?: any,
1982
2085
  config?: AxiosRequestConfig
1983
- ): OperationResponse<Paths.TestWebhookPost.Responses.$200 | Paths.TestWebhookPost.Responses.$202>
2086
+ ): OperationResponse<Paths.GetConnectedOutlookEmails.Responses.$200>
1984
2087
  }
1985
2088
  ['/v2/outlook/oauth/callback']: {
1986
2089
  /**
@@ -2155,6 +2258,10 @@ export type EmailAddressSetting = Components.Schemas.EmailAddressSetting;
2155
2258
  export type EmailDomainSetting = Components.Schemas.EmailDomainSetting;
2156
2259
  export type ErrorResponse = Components.Schemas.ErrorResponse;
2157
2260
  export type InboxBucketResponse = Components.Schemas.InboxBucketResponse;
2261
+ export type MailboxSyncFolderStatuses = Components.Schemas.MailboxSyncFolderStatuses;
2262
+ export type MailboxSyncStatus = Components.Schemas.MailboxSyncStatus;
2263
+ export type MailboxSyncStatuses = Components.Schemas.MailboxSyncStatuses;
2264
+ export type MailboxSyncTimeframePeriods = Components.Schemas.MailboxSyncTimeframePeriods;
2158
2265
  export type OutlookConnectionError = Components.Schemas.OutlookConnectionError;
2159
2266
  export type OutlookConnectionStatus = Components.Schemas.OutlookConnectionStatus;
2160
2267
  export type ProvisionEpilotEmailAddressPayload = Components.Schemas.ProvisionEpilotEmailAddressPayload;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/email-settings-client",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "API Client for epilot Email Settings API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",