@epilot/email-settings-client 1.3.0 → 1.5.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.
package/dist/client.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { Client } from './openapi';
1
+ import type { Client } from './openapi';
2
2
  export declare const getClient: () => Client;
3
3
  export declare const createClient: () => Client;
@@ -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,s,o){var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s,"__esModule",{value:!0});var n=t(o(466));s.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/channels/msteams/connect":{"post":{"operationId":"connectMsTeams","responses":{}}},"/v2/channels/msteams/disconnect":{"post":{"operationId":"disconnectMsTeams","responses":{}}},"/v2/channels/msteams/status":{"get":{"operationId":"getMsTeamsStatus","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"}]}')}},s={},o=function o(t){var n=s[t];if(void 0!==n)return n.exports;var r=s[t]={exports:{}};return e[t].call(r.exports,r,r.exports,o),r.exports}(330),t=exports;for(var n in o)t[n]=o[n];o.__esModule&&Object.defineProperty(t,"__esModule",{value:!0})})();
package/dist/openapi.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- /* eslint-disable */
2
-
3
1
  import type {
4
2
  OpenAPIClient,
5
3
  Parameters,
@@ -298,6 +296,28 @@ declare namespace Components {
298
296
  */
299
297
  inbox_id: string;
300
298
  }
299
+ export type MailboxSyncFolderStatuses = "PENDING" | "RUNNING" | "COMPLETED" | "FAILED" | "SKIPPED";
300
+ export interface MailboxSyncStatus {
301
+ execution_id: string;
302
+ status: MailboxSyncStatuses;
303
+ timeframe: MailboxSyncTimeframePeriods;
304
+ started_at: string; // date-time
305
+ completed_at?: string; // date-time
306
+ inbox?: {
307
+ status?: MailboxSyncFolderStatuses;
308
+ total_messages?: number;
309
+ processed_messages?: number;
310
+ failed_messages?: number;
311
+ };
312
+ sent_items?: {
313
+ status?: MailboxSyncFolderStatuses;
314
+ total_messages?: number;
315
+ processed_messages?: number;
316
+ failed_messages?: number;
317
+ };
318
+ }
319
+ export type MailboxSyncStatuses = "RUNNING" | "COMPLETED" | "COMPLETED_WITH_ERRORS" | "FAILED" | "CANCELLED";
320
+ export type MailboxSyncTimeframePeriods = "5m" | "1w" | "2w" | "1m";
301
321
  export interface OutlookConnectionError {
302
322
  /**
303
323
  * Error code or message from the OAuth flow.
@@ -757,6 +777,18 @@ declare namespace Paths {
757
777
  export type $500 = Components.Responses.InternalServerError;
758
778
  }
759
779
  }
780
+ namespace ConnectMsTeams {
781
+ namespace Responses {
782
+ export interface $200 {
783
+ connected?: boolean;
784
+ connected_at?: string; // date-time
785
+ }
786
+ export interface $400 {
787
+ error?: string;
788
+ message?: string;
789
+ }
790
+ }
791
+ }
760
792
  namespace ConnectOutlook {
761
793
  namespace Responses {
762
794
  export interface $200 {
@@ -775,6 +807,12 @@ declare namespace Paths {
775
807
  * Shared inbox ID to associate with the mailbox. Defaults to the default shared inbox.
776
808
  */
777
809
  shared_inbox_id?: string;
810
+ /**
811
+ * Optional timeframe for initial mailbox sync. When provided, triggers an automatic
812
+ * mailbox sync after connecting the mailbox, syncing emails from the specified period.
813
+ *
814
+ */
815
+ mailboxSyncTimeframe?: "5m" | "1w" | "2w" | "1m";
778
816
  }
779
817
  namespace Responses {
780
818
  export interface $201 {
@@ -871,6 +909,13 @@ declare namespace Paths {
871
909
  export type $500 = Components.Responses.InternalServerError;
872
910
  }
873
911
  }
912
+ namespace DisconnectMsTeams {
913
+ namespace Responses {
914
+ export interface $200 {
915
+ connected?: boolean;
916
+ }
917
+ }
918
+ }
874
919
  namespace DisconnectOutlook {
875
920
  export interface RequestBody {
876
921
  /**
@@ -953,6 +998,39 @@ declare namespace Paths {
953
998
  export type $500 = Components.Responses.InternalServerError;
954
999
  }
955
1000
  }
1001
+ namespace GetMailboxSyncStatus {
1002
+ namespace Parameters {
1003
+ export type Email = string; // email
1004
+ }
1005
+ export interface PathParameters {
1006
+ email: Parameters.Email /* email */;
1007
+ }
1008
+ namespace Responses {
1009
+ export type $200 = Components.Schemas.MailboxSyncStatus;
1010
+ export interface $404 {
1011
+ }
1012
+ export interface $500 {
1013
+ }
1014
+ }
1015
+ }
1016
+ namespace GetMsTeamsStatus {
1017
+ namespace Responses {
1018
+ export interface $200 {
1019
+ /**
1020
+ * Whether the Teams channel is connected
1021
+ */
1022
+ connected?: boolean;
1023
+ /**
1024
+ * When the Teams channel was connected
1025
+ */
1026
+ connected_at?: string; // date-time
1027
+ /**
1028
+ * User ID who connected the Teams channel
1029
+ */
1030
+ connected_by_user_id?: string;
1031
+ }
1032
+ }
1033
+ }
956
1034
  namespace GetOutlookConnectionStatus {
957
1035
  namespace Responses {
958
1036
  export interface $200 {
@@ -964,6 +1042,10 @@ declare namespace Paths {
964
1042
  * Whether any connections exist
965
1043
  */
966
1044
  has_connections: boolean;
1045
+ /**
1046
+ * Whether Microsoft Teams features are enabled for this organization
1047
+ */
1048
+ teams_enabled?: boolean;
967
1049
  }
968
1050
  export interface $400 {
969
1051
  }
@@ -1063,6 +1145,46 @@ declare namespace Paths {
1063
1145
  export type $500 = Components.Responses.InternalServerError;
1064
1146
  }
1065
1147
  }
1148
+ namespace RetryMailboxSync {
1149
+ namespace Parameters {
1150
+ export type Email = string; // email
1151
+ }
1152
+ export interface PathParameters {
1153
+ email: Parameters.Email /* email */;
1154
+ }
1155
+ export interface RequestBody {
1156
+ /**
1157
+ * Execution ID of the sync to retry
1158
+ */
1159
+ sync_id: string;
1160
+ /**
1161
+ * Retry scope. Use 'all_failed' to retry all retryable failed messages.
1162
+ */
1163
+ scope?: "all_failed";
1164
+ /**
1165
+ * Specific Graph message IDs to retry (alternative to scope)
1166
+ */
1167
+ message_ids?: string[];
1168
+ }
1169
+ namespace Responses {
1170
+ export interface $202 {
1171
+ /**
1172
+ * Execution ID for the retry sync
1173
+ */
1174
+ retry_execution_id: string;
1175
+ /**
1176
+ * Number of messages queued for retry
1177
+ */
1178
+ messages_queued: number;
1179
+ }
1180
+ export interface $404 {
1181
+ }
1182
+ export interface $409 {
1183
+ }
1184
+ export interface $500 {
1185
+ }
1186
+ }
1187
+ }
1066
1188
  namespace SetEmailAddressPrimary {
1067
1189
  export type RequestBody = /* Request payload for setting an email address as the organization's primary address. */ Components.Schemas.SetEmailAddressPrimaryPayload;
1068
1190
  namespace Responses {
@@ -1073,46 +1195,40 @@ declare namespace Paths {
1073
1195
  export type $500 = Components.Responses.InternalServerError;
1074
1196
  }
1075
1197
  }
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 {
1198
+ namespace StartMailboxSync {
1092
1199
  namespace Parameters {
1093
- export type DebugMessages = boolean;
1094
- export type ValidationToken = string;
1200
+ export type Email = string; // email
1095
1201
  }
1096
- export interface QueryParameters {
1097
- validationToken?: Parameters.ValidationToken;
1098
- debugMessages?: Parameters.DebugMessages;
1202
+ export interface PathParameters {
1203
+ email: Parameters.Email /* email */;
1099
1204
  }
1100
- /**
1101
- * Graph API notification payload
1102
- */
1103
1205
  export interface RequestBody {
1104
- value?: {
1105
- subscriptionId?: string;
1106
- changeType?: string;
1107
- resource?: string;
1108
- clientState?: string;
1109
- }[];
1206
+ /**
1207
+ * Sync period:
1208
+ * - 5m: last 5 minutes (quick sync)
1209
+ * - 1w: 1 week
1210
+ * - 2w: 2 weeks
1211
+ * - 1m: 1 month
1212
+ *
1213
+ */
1214
+ timeframe: Components.Schemas.MailboxSyncTimeframePeriods;
1110
1215
  }
1111
1216
  namespace Responses {
1112
- export type $200 = string;
1113
1217
  export interface $202 {
1114
- message?: string;
1115
- timestamp?: string; // date-time
1218
+ /**
1219
+ * The execution ID
1220
+ */
1221
+ execution_id: string;
1222
+ status: Components.Schemas.MailboxSyncStatuses;
1223
+ timeframe: Components.Schemas.MailboxSyncTimeframePeriods;
1224
+ }
1225
+ export interface $400 {
1226
+ }
1227
+ export interface $404 {
1228
+ }
1229
+ export interface $409 {
1230
+ }
1231
+ export interface $500 {
1116
1232
  }
1117
1233
  }
1118
1234
  }
@@ -1444,6 +1560,40 @@ export interface OperationMethods {
1444
1560
  data?: Paths.DisconnectOutlook.RequestBody,
1445
1561
  config?: AxiosRequestConfig
1446
1562
  ): OperationResponse<Paths.DisconnectOutlook.Responses.$200>
1563
+ /**
1564
+ * connectMsTeams - connectMsTeams
1565
+ *
1566
+ * Connects Microsoft Teams channel (click-to-call deep links, meetings) for the organization.
1567
+ * Requires an active Microsoft 365 / Outlook connection.
1568
+ *
1569
+ */
1570
+ 'connectMsTeams'(
1571
+ parameters?: Parameters<UnknownParamsObject> | null,
1572
+ data?: any,
1573
+ config?: AxiosRequestConfig
1574
+ ): OperationResponse<Paths.ConnectMsTeams.Responses.$200>
1575
+ /**
1576
+ * disconnectMsTeams - disconnectMsTeams
1577
+ *
1578
+ * Disconnects Microsoft Teams channel for the organization.
1579
+ *
1580
+ */
1581
+ 'disconnectMsTeams'(
1582
+ parameters?: Parameters<UnknownParamsObject> | null,
1583
+ data?: any,
1584
+ config?: AxiosRequestConfig
1585
+ ): OperationResponse<Paths.DisconnectMsTeams.Responses.$200>
1586
+ /**
1587
+ * getMsTeamsStatus - getMsTeamsStatus
1588
+ *
1589
+ * Returns the connection status of the Microsoft Teams channel for the organization.
1590
+ *
1591
+ */
1592
+ 'getMsTeamsStatus'(
1593
+ parameters?: Parameters<UnknownParamsObject> | null,
1594
+ data?: any,
1595
+ config?: AxiosRequestConfig
1596
+ ): OperationResponse<Paths.GetMsTeamsStatus.Responses.$200>
1447
1597
  /**
1448
1598
  * connectOutlookMailbox - connectOutlookMailbox
1449
1599
  *
@@ -1472,42 +1622,53 @@ export interface OperationMethods {
1472
1622
  config?: AxiosRequestConfig
1473
1623
  ): OperationResponse<Paths.DisconnectOutlookMailbox.Responses.$200>
1474
1624
  /**
1475
- * getConnectedOutlookEmails - getConnectedOutlookEmails
1625
+ * startMailboxSync - Start Mailbox Sync
1476
1626
  *
1477
- * Returns all Outlook email addresses connected to the organization.
1627
+ * Triggers an Outlook mailbox sync for the specified email address.
1628
+ * Syncs existing emails (inbox + sent items) for the specified timeframe.
1478
1629
  *
1479
1630
  */
1480
- 'getConnectedOutlookEmails'(
1481
- parameters?: Parameters<UnknownParamsObject> | null,
1482
- data?: any,
1631
+ 'startMailboxSync'(
1632
+ parameters?: Parameters<Paths.StartMailboxSync.PathParameters> | null,
1633
+ data?: Paths.StartMailboxSync.RequestBody,
1483
1634
  config?: AxiosRequestConfig
1484
- ): OperationResponse<Paths.GetConnectedOutlookEmails.Responses.$200>
1635
+ ): OperationResponse<Paths.StartMailboxSync.Responses.$202>
1485
1636
  /**
1486
- * testWebhookGet - testWebhookGet
1637
+ * getMailboxSyncStatus - Get Mailbox Sync Status
1487
1638
  *
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.
1639
+ * Returns the current or latest sync status for the specified mailbox.
1640
+ * Poll this endpoint to track sync progress.
1491
1641
  *
1492
1642
  */
1493
- 'testWebhookGet'(
1494
- parameters?: Parameters<Paths.TestWebhookGet.QueryParameters> | null,
1643
+ 'getMailboxSyncStatus'(
1644
+ parameters?: Parameters<Paths.GetMailboxSyncStatus.PathParameters> | null,
1495
1645
  data?: any,
1496
1646
  config?: AxiosRequestConfig
1497
- ): OperationResponse<Paths.TestWebhookGet.Responses.$200 | Paths.TestWebhookGet.Responses.$202>
1647
+ ): OperationResponse<Paths.GetMailboxSyncStatus.Responses.$200>
1498
1648
  /**
1499
- * testWebhookPost - testWebhookPost
1649
+ * retryMailboxSync - Retry Failed Messages
1500
1650
  *
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.
1651
+ * Retries failed messages from a previous sync execution.
1652
+ * Only retries messages with status FAILED (not PERMANENTLY_FAILED).
1653
+ * Messages that fail 3+ retries become PERMANENTLY_FAILED.
1504
1654
  *
1505
1655
  */
1506
- 'testWebhookPost'(
1507
- parameters?: Parameters<Paths.TestWebhookPost.QueryParameters> | null,
1508
- data?: Paths.TestWebhookPost.RequestBody,
1656
+ 'retryMailboxSync'(
1657
+ parameters?: Parameters<Paths.RetryMailboxSync.PathParameters> | null,
1658
+ data?: Paths.RetryMailboxSync.RequestBody,
1509
1659
  config?: AxiosRequestConfig
1510
- ): OperationResponse<Paths.TestWebhookPost.Responses.$200 | Paths.TestWebhookPost.Responses.$202>
1660
+ ): OperationResponse<Paths.RetryMailboxSync.Responses.$202>
1661
+ /**
1662
+ * getConnectedOutlookEmails - getConnectedOutlookEmails
1663
+ *
1664
+ * Returns all Outlook email addresses connected to the organization.
1665
+ *
1666
+ */
1667
+ 'getConnectedOutlookEmails'(
1668
+ parameters?: Parameters<UnknownParamsObject> | null,
1669
+ data?: any,
1670
+ config?: AxiosRequestConfig
1671
+ ): OperationResponse<Paths.GetConnectedOutlookEmails.Responses.$200>
1511
1672
  /**
1512
1673
  * outlookOAuthCallback - outlookOAuthCallback
1513
1674
  *
@@ -1910,6 +2071,46 @@ export interface PathsDictionary {
1910
2071
  config?: AxiosRequestConfig
1911
2072
  ): OperationResponse<Paths.DisconnectOutlook.Responses.$200>
1912
2073
  }
2074
+ ['/v2/channels/msteams/connect']: {
2075
+ /**
2076
+ * connectMsTeams - connectMsTeams
2077
+ *
2078
+ * Connects Microsoft Teams channel (click-to-call deep links, meetings) for the organization.
2079
+ * Requires an active Microsoft 365 / Outlook connection.
2080
+ *
2081
+ */
2082
+ 'post'(
2083
+ parameters?: Parameters<UnknownParamsObject> | null,
2084
+ data?: any,
2085
+ config?: AxiosRequestConfig
2086
+ ): OperationResponse<Paths.ConnectMsTeams.Responses.$200>
2087
+ }
2088
+ ['/v2/channels/msteams/disconnect']: {
2089
+ /**
2090
+ * disconnectMsTeams - disconnectMsTeams
2091
+ *
2092
+ * Disconnects Microsoft Teams channel for the organization.
2093
+ *
2094
+ */
2095
+ 'post'(
2096
+ parameters?: Parameters<UnknownParamsObject> | null,
2097
+ data?: any,
2098
+ config?: AxiosRequestConfig
2099
+ ): OperationResponse<Paths.DisconnectMsTeams.Responses.$200>
2100
+ }
2101
+ ['/v2/channels/msteams/status']: {
2102
+ /**
2103
+ * getMsTeamsStatus - getMsTeamsStatus
2104
+ *
2105
+ * Returns the connection status of the Microsoft Teams channel for the organization.
2106
+ *
2107
+ */
2108
+ 'get'(
2109
+ parameters?: Parameters<UnknownParamsObject> | null,
2110
+ data?: any,
2111
+ config?: AxiosRequestConfig
2112
+ ): OperationResponse<Paths.GetMsTeamsStatus.Responses.$200>
2113
+ }
1913
2114
  ['/v2/outlook/mailbox/connect']: {
1914
2115
  /**
1915
2116
  * connectOutlookMailbox - connectOutlookMailbox
@@ -1941,46 +2142,61 @@ export interface PathsDictionary {
1941
2142
  config?: AxiosRequestConfig
1942
2143
  ): OperationResponse<Paths.DisconnectOutlookMailbox.Responses.$200>
1943
2144
  }
1944
- ['/v2/outlook/mailbox/mappings']: {
2145
+ ['/v2/outlook/mailbox/{email}/sync']: {
1945
2146
  /**
1946
- * getConnectedOutlookEmails - getConnectedOutlookEmails
2147
+ * startMailboxSync - Start Mailbox Sync
1947
2148
  *
1948
- * Returns all Outlook email addresses connected to the organization.
2149
+ * Triggers an Outlook mailbox sync for the specified email address.
2150
+ * Syncs existing emails (inbox + sent items) for the specified timeframe.
1949
2151
  *
1950
2152
  */
1951
- 'get'(
1952
- parameters?: Parameters<UnknownParamsObject> | null,
1953
- data?: any,
2153
+ 'post'(
2154
+ parameters?: Parameters<Paths.StartMailboxSync.PathParameters> | null,
2155
+ data?: Paths.StartMailboxSync.RequestBody,
1954
2156
  config?: AxiosRequestConfig
1955
- ): OperationResponse<Paths.GetConnectedOutlookEmails.Responses.$200>
2157
+ ): OperationResponse<Paths.StartMailboxSync.Responses.$202>
1956
2158
  }
1957
- ['/v2/outlook/test-webhook']: {
2159
+ ['/v2/outlook/mailbox/{email}/sync/status']: {
1958
2160
  /**
1959
- * testWebhookGet - testWebhookGet
2161
+ * getMailboxSyncStatus - Get Mailbox Sync Status
1960
2162
  *
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.
2163
+ * Returns the current or latest sync status for the specified mailbox.
2164
+ * Poll this endpoint to track sync progress.
1964
2165
  *
1965
2166
  */
1966
2167
  'get'(
1967
- parameters?: Parameters<Paths.TestWebhookGet.QueryParameters> | null,
2168
+ parameters?: Parameters<Paths.GetMailboxSyncStatus.PathParameters> | null,
1968
2169
  data?: any,
1969
2170
  config?: AxiosRequestConfig
1970
- ): OperationResponse<Paths.TestWebhookGet.Responses.$200 | Paths.TestWebhookGet.Responses.$202>
2171
+ ): OperationResponse<Paths.GetMailboxSyncStatus.Responses.$200>
2172
+ }
2173
+ ['/v2/outlook/mailbox/{email}/sync/retry']: {
1971
2174
  /**
1972
- * testWebhookPost - testWebhookPost
2175
+ * retryMailboxSync - Retry Failed Messages
1973
2176
  *
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.
2177
+ * Retries failed messages from a previous sync execution.
2178
+ * Only retries messages with status FAILED (not PERMANENTLY_FAILED).
2179
+ * Messages that fail 3+ retries become PERMANENTLY_FAILED.
1977
2180
  *
1978
2181
  */
1979
2182
  'post'(
1980
- parameters?: Parameters<Paths.TestWebhookPost.QueryParameters> | null,
1981
- data?: Paths.TestWebhookPost.RequestBody,
2183
+ parameters?: Parameters<Paths.RetryMailboxSync.PathParameters> | null,
2184
+ data?: Paths.RetryMailboxSync.RequestBody,
2185
+ config?: AxiosRequestConfig
2186
+ ): OperationResponse<Paths.RetryMailboxSync.Responses.$202>
2187
+ }
2188
+ ['/v2/outlook/mailbox/mappings']: {
2189
+ /**
2190
+ * getConnectedOutlookEmails - getConnectedOutlookEmails
2191
+ *
2192
+ * Returns all Outlook email addresses connected to the organization.
2193
+ *
2194
+ */
2195
+ 'get'(
2196
+ parameters?: Parameters<UnknownParamsObject> | null,
2197
+ data?: any,
1982
2198
  config?: AxiosRequestConfig
1983
- ): OperationResponse<Paths.TestWebhookPost.Responses.$200 | Paths.TestWebhookPost.Responses.$202>
2199
+ ): OperationResponse<Paths.GetConnectedOutlookEmails.Responses.$200>
1984
2200
  }
1985
2201
  ['/v2/outlook/oauth/callback']: {
1986
2202
  /**
@@ -2155,6 +2371,10 @@ export type EmailAddressSetting = Components.Schemas.EmailAddressSetting;
2155
2371
  export type EmailDomainSetting = Components.Schemas.EmailDomainSetting;
2156
2372
  export type ErrorResponse = Components.Schemas.ErrorResponse;
2157
2373
  export type InboxBucketResponse = Components.Schemas.InboxBucketResponse;
2374
+ export type MailboxSyncFolderStatuses = Components.Schemas.MailboxSyncFolderStatuses;
2375
+ export type MailboxSyncStatus = Components.Schemas.MailboxSyncStatus;
2376
+ export type MailboxSyncStatuses = Components.Schemas.MailboxSyncStatuses;
2377
+ export type MailboxSyncTimeframePeriods = Components.Schemas.MailboxSyncTimeframePeriods;
2158
2378
  export type OutlookConnectionError = Components.Schemas.OutlookConnectionError;
2159
2379
  export type OutlookConnectionStatus = Components.Schemas.OutlookConnectionStatus;
2160
2380
  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.5.0",
4
4
  "description": "API Client for epilot Email Settings API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,17 +19,17 @@
19
19
  "email-settings"
20
20
  ],
21
21
  "scripts": {
22
- "test": "jest",
22
+ "test": "vitest",
23
23
  "typescript": "tsc",
24
24
  "bundle-definition": "webpack",
25
25
  "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/email-settings.yaml",
26
26
  "openapi:local": "node ../../scripts/update-openapi.js /Users/manikandansubramanian/Workspace/email-settings/lambda/ApiHandlerFunction/openapi.yml",
27
- "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
27
+ "typegen": "openapi typegen src/openapi.json --client > src/openapi.d.ts",
28
28
  "build": "tsc && npm run build:patch && npm run bundle-definition",
29
29
  "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
30
30
  "build:watch": "npm run build && tsc -w",
31
31
  "prepublishOnly": "npm run typegen && npm run build",
32
- "lint": "pnpm exec eslint src"
32
+ "lint": "biome check src"
33
33
  },
34
34
  "files": [
35
35
  "*.js",
@@ -58,13 +58,10 @@
58
58
  "util": "^0.12.3"
59
59
  },
60
60
  "devDependencies": {
61
- "@types/jest": "^26.0.20",
62
61
  "axios": "^1.11.0",
63
62
  "copy-webpack-plugin": "^7.0.0",
64
- "jest": "^29.6.2",
65
63
  "json-loader": "^0.5.7",
66
64
  "openapicmd": "^2.7.0",
67
- "ts-jest": "^29.4.1",
68
65
  "ts-loader": "^8.0.14",
69
66
  "ts-node": "^10.9.1",
70
67
  "typescript": "^4.1.3",