@epilot/email-settings-client 0.10.0 → 0.11.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={390:function(e,s,t){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s,"__esModule",{value:!0});var o=n(t(466));s.default=o.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":{"content":{"application/json":{}}},"responses":{}}},"/v2/email-settings/email-addresses/primary":{"post":{"operationId":"setEmailAddressPrimary","requestBody":{"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":{"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":{"content":{"application/json":{}}},"responses":{}}},"/v2/email-settings/inbox-buckets":{"get":{"operationId":"listInboxBuckets","responses":{}}},"/v1/email-settings":{"get":{"operationId":"getSettings","parameters":[{"name":"type","in":"query","required":true},{"name":"id","in":"query"}],"responses":{}},"post":{"operationId":"addSetting","requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteSetting","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/{id}":{"post":{"operationId":"updateSetting","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/domain":{"post":{"operationId":"addDomain","requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteDomain","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/domain/name-servers:verify":{"post":{"operationId":"verifyNameServers","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/domain:verify":{"post":{"operationId":"verifyDomain","requestBody":{"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":{}}}},"parameters":{"EmailAddressId":{"name":"id","in":"path","required":true},"SharedInboxId":{"name":"id","in":"path","required":true}}},"servers":[{"url":"https://email-settings.sls.epilot.io"}]}')}},s={},t=function t(n){var o=s[n];if(void 0!==o)return o.exports;var a=s[n]={exports:{}};return e[n].call(a.exports,a,a.exports,t),a.exports}(390),n=exports;for(var o in t)n[o]=t[o];t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={330:function(e,s,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s,"__esModule",{value:!0});var t=n(o(466));s.default=t.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":{"content":{"application/json":{}}},"responses":{}}},"/v2/email-settings/email-addresses/primary":{"post":{"operationId":"setEmailAddressPrimary","requestBody":{"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":{"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":{"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/shared-mailboxes/connect":{"post":{"operationId":"connectSharedMailbox","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v2/outlook/shared-mailboxes/mappings":{"get":{"operationId":"getSharedMailboxMappings","responses":{}}},"/v2/outlook/shared-mailboxes/mappings/{shared_inbox_id}":{"get":{"operationId":"getSharedMailboxMappingById","parameters":[{"name":"shared_inbox_id","in":"path","required":true}],"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":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteSetting","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/{id}":{"post":{"operationId":"updateSetting","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/domain":{"post":{"operationId":"addDomain","requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteDomain","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/domain/name-servers:verify":{"post":{"operationId":"verifyNameServers","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/domain:verify":{"post":{"operationId":"verifyDomain","requestBody":{"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":{}}}},"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(n){var t=s[n];if(void 0!==t)return t.exports;var r=s[n]={exports:{}};return e[n].call(r.exports,r,r.exports,o),r.exports}(330),n=exports;for(var t in o)n[t]=o[t];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
package/dist/openapi.d.ts CHANGED
@@ -164,6 +164,41 @@ declare namespace Components {
164
164
  description?: string;
165
165
  bucket_id: string;
166
166
  }
167
+ /**
168
+ * Mapping between a shared inbox and its Outlook shared mailbox.
169
+ * This tracks which provider/tenant provisions each shared mailbox.
170
+ *
171
+ */
172
+ export interface SharedMailboxMapping {
173
+ /**
174
+ * The email-settings shared inbox entity ID
175
+ */
176
+ shared_inbox_id: string;
177
+ /**
178
+ * The Outlook shared mailbox email address
179
+ */
180
+ outlook_email: string; // email
181
+ /**
182
+ * Azure AD Tenant ID that provisions this mailbox
183
+ */
184
+ tenant_id: string;
185
+ /**
186
+ * Provider type (for future extensibility)
187
+ */
188
+ provider: "outlook";
189
+ /**
190
+ * Display name from Outlook
191
+ */
192
+ display_name?: string;
193
+ /**
194
+ * When the mailbox was connected
195
+ */
196
+ connected_at: string; // date-time
197
+ /**
198
+ * User who connected this mailbox
199
+ */
200
+ connected_by_user_id?: string;
201
+ }
167
202
  /**
168
203
  * Setting that allows to add a signature.
169
204
  */
@@ -231,6 +266,75 @@ declare namespace Paths {
231
266
  export type $500 = Components.Responses.InternalServerError;
232
267
  }
233
268
  }
269
+ namespace ConnectOutlook {
270
+ namespace Responses {
271
+ export interface $200 {
272
+ authorization_url?: string;
273
+ }
274
+ }
275
+ }
276
+ namespace ConnectSharedMailbox {
277
+ export interface RequestBody {
278
+ /**
279
+ * Email address of the Outlook shared mailbox to connect
280
+ */
281
+ email: string; // email
282
+ /**
283
+ * Display name for the shared inbox (defaults to mailbox display name)
284
+ */
285
+ name?: string;
286
+ /**
287
+ * Color for the shared inbox (hex code, defaults to green)
288
+ */
289
+ color?: string;
290
+ /**
291
+ * User IDs to assign to this shared inbox
292
+ */
293
+ assignees?: string[];
294
+ /**
295
+ * Description for the shared inbox
296
+ */
297
+ description?: string;
298
+ }
299
+ namespace Responses {
300
+ export interface $201 {
301
+ /**
302
+ * The created shared inbox from email-settings
303
+ */
304
+ shared_inbox?: {
305
+ id?: string;
306
+ name?: string;
307
+ color?: string;
308
+ assignees?: string[];
309
+ description?: string;
310
+ };
311
+ /**
312
+ * The Outlook shared mailbox email address
313
+ */
314
+ outlook_email?: string; // email
315
+ /**
316
+ * Azure AD Tenant ID that provisions this mailbox
317
+ */
318
+ tenant_id?: string;
319
+ /**
320
+ * The provider type
321
+ */
322
+ provider?: "outlook";
323
+ /**
324
+ * Display name of the shared mailbox
325
+ */
326
+ display_name?: string;
327
+ }
328
+ export interface $400 {
329
+ }
330
+ export interface $401 {
331
+ }
332
+ export interface $403 {
333
+ }
334
+ export interface $500 {
335
+ }
336
+ }
337
+ }
234
338
  namespace DeleteDomain {
235
339
  export type RequestBody = Components.Schemas.Domain;
236
340
  namespace Responses {
@@ -293,6 +397,33 @@ declare namespace Paths {
293
397
  export type $500 = Components.Responses.InternalServerError;
294
398
  }
295
399
  }
400
+ namespace DisconnectOutlook {
401
+ export interface RequestBody {
402
+ /**
403
+ * Azure AD Tenant ID of the connection to disconnect
404
+ */
405
+ tenant_id: string;
406
+ }
407
+ namespace Responses {
408
+ export interface $200 {
409
+ success?: boolean;
410
+ /**
411
+ * The tenant ID that was disconnected
412
+ */
413
+ tenant_id?: string;
414
+ /**
415
+ * List of shared inbox IDs that were affected by the disconnection
416
+ */
417
+ affected_shared_inboxes?: string[];
418
+ }
419
+ export interface $400 {
420
+ }
421
+ export interface $404 {
422
+ }
423
+ export interface $500 {
424
+ }
425
+ }
426
+ }
296
427
  namespace GetEmailAddress {
297
428
  namespace Parameters {
298
429
  export type Id = string;
@@ -307,6 +438,78 @@ declare namespace Paths {
307
438
  export type $500 = Components.Responses.InternalServerError;
308
439
  }
309
440
  }
441
+ namespace GetOutlookConnectionStatus {
442
+ namespace Responses {
443
+ export interface $200 {
444
+ /**
445
+ * List of Outlook connections (one per tenant)
446
+ */
447
+ connections: {
448
+ /**
449
+ * Current connection status:
450
+ * - pending_auth: Admin consent granted, waiting for user OAuth
451
+ * - connected: Fully connected with valid tokens
452
+ * - expired: Tokens expired, need to re-authenticate
453
+ *
454
+ */
455
+ status: "connected" | "expired" | "pending_auth";
456
+ /**
457
+ * Action for UI to take (all call GET /outlook/connect):
458
+ * - connect: No connection, initiate OAuth
459
+ * - authorize: Admin consent done, complete OAuth
460
+ * - reconnect: Re-authenticate expired session
461
+ * - none: Fully connected, no action needed
462
+ *
463
+ */
464
+ action: "connect" | "authorize" | "reconnect" | "none";
465
+ /**
466
+ * Display name of user who connected
467
+ */
468
+ connected_by_display_name?: string;
469
+ /**
470
+ * Email of the user who connected
471
+ */
472
+ connected_by_email?: string; // email
473
+ /**
474
+ * Azure AD Object ID of user who connected
475
+ */
476
+ connected_by_user_id?: string;
477
+ /**
478
+ * When the connection was established
479
+ */
480
+ connected_at?: string; // date-time
481
+ /**
482
+ * When the connection was last updated
483
+ */
484
+ updated_at?: string; // date-time
485
+ /**
486
+ * Microsoft Azure AD tenant ID
487
+ */
488
+ tenant_id: string;
489
+ /**
490
+ * Granted permission scopes
491
+ */
492
+ scopes?: string[];
493
+ /**
494
+ * When the current access token expires
495
+ */
496
+ expires_at?: string; // date-time
497
+ /**
498
+ * Whether the current token is still valid
499
+ */
500
+ is_token_valid?: boolean;
501
+ }[];
502
+ /**
503
+ * Whether any connections exist
504
+ */
505
+ has_connections: boolean;
506
+ }
507
+ export interface $400 {
508
+ }
509
+ export interface $500 {
510
+ }
511
+ }
512
+ }
310
513
  namespace GetSettings {
311
514
  namespace Parameters {
312
515
  export type Id = string;
@@ -338,6 +541,48 @@ declare namespace Paths {
338
541
  export type $500 = Components.Responses.InternalServerError;
339
542
  }
340
543
  }
544
+ namespace GetSharedMailboxMappingById {
545
+ namespace Parameters {
546
+ export type SharedInboxId = string;
547
+ }
548
+ export interface PathParameters {
549
+ shared_inbox_id: Parameters.SharedInboxId;
550
+ }
551
+ namespace Responses {
552
+ export type $200 = /**
553
+ * Mapping between a shared inbox and its Outlook shared mailbox.
554
+ * This tracks which provider/tenant provisions each shared mailbox.
555
+ *
556
+ */
557
+ Components.Schemas.SharedMailboxMapping;
558
+ export interface $400 {
559
+ }
560
+ export interface $404 {
561
+ }
562
+ export interface $500 {
563
+ }
564
+ }
565
+ }
566
+ namespace GetSharedMailboxMappings {
567
+ namespace Responses {
568
+ export interface $200 {
569
+ mappings: /**
570
+ * Mapping between a shared inbox and its Outlook shared mailbox.
571
+ * This tracks which provider/tenant provisions each shared mailbox.
572
+ *
573
+ */
574
+ Components.Schemas.SharedMailboxMapping[];
575
+ /**
576
+ * Number of mappings
577
+ */
578
+ count: number;
579
+ }
580
+ export interface $400 {
581
+ }
582
+ export interface $500 {
583
+ }
584
+ }
585
+ }
341
586
  namespace ListEmailAddresses {
342
587
  namespace Responses {
343
588
  export type $200 = Components.Responses.ListEmailAddressesSuccessResponse;
@@ -359,6 +604,39 @@ declare namespace Paths {
359
604
  export type $500 = Components.Responses.InternalServerError;
360
605
  }
361
606
  }
607
+ namespace OutlookOAuthCallback {
608
+ namespace Parameters {
609
+ export type AdminConsent = string;
610
+ export type ClientInfo = string;
611
+ export type Code = string;
612
+ export type Error = string;
613
+ export type ErrorDescription = string;
614
+ export type ErrorSubcode = string;
615
+ export type ErrorUri = string;
616
+ export type SessionState = string;
617
+ export type State = string;
618
+ export type Tenant = string;
619
+ }
620
+ export interface QueryParameters {
621
+ code?: Parameters.Code;
622
+ state: Parameters.State;
623
+ session_state?: Parameters.SessionState;
624
+ error?: Parameters.Error;
625
+ error_description?: Parameters.ErrorDescription;
626
+ error_subcode?: Parameters.ErrorSubcode;
627
+ client_info?: Parameters.ClientInfo;
628
+ error_uri?: Parameters.ErrorUri;
629
+ admin_consent?: Parameters.AdminConsent;
630
+ tenant?: Parameters.Tenant;
631
+ }
632
+ namespace Responses {
633
+ export interface $200 {
634
+ connected?: boolean;
635
+ expires_at?: string; // date-time
636
+ scope?: string;
637
+ }
638
+ }
639
+ }
362
640
  namespace ProvisionEpilotEmailAddress {
363
641
  export type RequestBody = Components.Schemas.ProvisionEpilotEmailAddressPayload;
364
642
  namespace Responses {
@@ -582,6 +860,91 @@ export interface OperationMethods {
582
860
  data?: any,
583
861
  config?: AxiosRequestConfig
584
862
  ): OperationResponse<Paths.ListInboxBuckets.Responses.$200>
863
+ /**
864
+ * connectOutlook - Connect Outlook
865
+ *
866
+ * Returns Microsoft authorization URL for Outlook OAuth.
867
+ */
868
+ 'connectOutlook'(
869
+ parameters?: Parameters<UnknownParamsObject> | null,
870
+ data?: any,
871
+ config?: AxiosRequestConfig
872
+ ): OperationResponse<Paths.ConnectOutlook.Responses.$200>
873
+ /**
874
+ * getOutlookConnectionStatus - Get Outlook Connection Status
875
+ *
876
+ * Returns all Microsoft 365 / Outlook connections for the organization.
877
+ * Supports multiple connections (one per Azure AD tenant).
878
+ *
879
+ * Each connection includes an `action` field that tells the UI what button to show
880
+ * and what endpoint to call. All actions use GET /outlook/connect.
881
+ *
882
+ */
883
+ 'getOutlookConnectionStatus'(
884
+ parameters?: Parameters<UnknownParamsObject> | null,
885
+ data?: any,
886
+ config?: AxiosRequestConfig
887
+ ): OperationResponse<Paths.GetOutlookConnectionStatus.Responses.$200>
888
+ /**
889
+ * disconnectOutlook - Disconnect Outlook
890
+ *
891
+ * Removes the Microsoft 365 / Outlook connection for a specific tenant.
892
+ * This deletes the stored tokens and disconnects the integration.
893
+ *
894
+ */
895
+ 'disconnectOutlook'(
896
+ parameters?: Parameters<UnknownParamsObject> | null,
897
+ data?: Paths.DisconnectOutlook.RequestBody,
898
+ config?: AxiosRequestConfig
899
+ ): OperationResponse<Paths.DisconnectOutlook.Responses.$200>
900
+ /**
901
+ * connectSharedMailbox - Connect Outlook Shared Mailbox
902
+ *
903
+ * Connects an Outlook shared mailbox as a shared inbox.
904
+ * 1. Validates the user has access to the shared mailbox via Microsoft Graph API
905
+ * 2. Creates a shared inbox entry in email-settings with the Outlook provider info
906
+ *
907
+ */
908
+ 'connectSharedMailbox'(
909
+ parameters?: Parameters<UnknownParamsObject> | null,
910
+ data?: Paths.ConnectSharedMailbox.RequestBody,
911
+ config?: AxiosRequestConfig
912
+ ): OperationResponse<Paths.ConnectSharedMailbox.Responses.$201>
913
+ /**
914
+ * getSharedMailboxMappings - Get Shared Mailbox Mappings
915
+ *
916
+ * Returns all shared mailbox mappings for the organization.
917
+ * Useful to determine which shared inboxes are connected to Outlook
918
+ * and which tenant provisions each one.
919
+ *
920
+ */
921
+ 'getSharedMailboxMappings'(
922
+ parameters?: Parameters<UnknownParamsObject> | null,
923
+ data?: any,
924
+ config?: AxiosRequestConfig
925
+ ): OperationResponse<Paths.GetSharedMailboxMappings.Responses.$200>
926
+ /**
927
+ * getSharedMailboxMappingById - Get Shared Mailbox Mapping by ID
928
+ *
929
+ * Returns the mapping for a specific shared inbox.
930
+ * Useful to check if a specific inbox is connected to Outlook.
931
+ *
932
+ */
933
+ 'getSharedMailboxMappingById'(
934
+ parameters?: Parameters<Paths.GetSharedMailboxMappingById.PathParameters> | null,
935
+ data?: any,
936
+ config?: AxiosRequestConfig
937
+ ): OperationResponse<Paths.GetSharedMailboxMappingById.Responses.$200>
938
+ /**
939
+ * outlookOAuthCallback - Outlook OAuth callback
940
+ *
941
+ * Exchanges authorization code for tokens and stores them.
942
+ */
943
+ 'outlookOAuthCallback'(
944
+ parameters?: Parameters<Paths.OutlookOAuthCallback.QueryParameters> | null,
945
+ data?: any,
946
+ config?: AxiosRequestConfig
947
+ ): OperationResponse<Paths.OutlookOAuthCallback.Responses.$200>
585
948
  /**
586
949
  * getSettings - getSettings
587
950
  *
@@ -809,6 +1172,105 @@ export interface PathsDictionary {
809
1172
  config?: AxiosRequestConfig
810
1173
  ): OperationResponse<Paths.ListInboxBuckets.Responses.$200>
811
1174
  }
1175
+ ['/v2/outlook/connect']: {
1176
+ /**
1177
+ * connectOutlook - Connect Outlook
1178
+ *
1179
+ * Returns Microsoft authorization URL for Outlook OAuth.
1180
+ */
1181
+ 'get'(
1182
+ parameters?: Parameters<UnknownParamsObject> | null,
1183
+ data?: any,
1184
+ config?: AxiosRequestConfig
1185
+ ): OperationResponse<Paths.ConnectOutlook.Responses.$200>
1186
+ }
1187
+ ['/v2/outlook/connection/status']: {
1188
+ /**
1189
+ * getOutlookConnectionStatus - Get Outlook Connection Status
1190
+ *
1191
+ * Returns all Microsoft 365 / Outlook connections for the organization.
1192
+ * Supports multiple connections (one per Azure AD tenant).
1193
+ *
1194
+ * Each connection includes an `action` field that tells the UI what button to show
1195
+ * and what endpoint to call. All actions use GET /outlook/connect.
1196
+ *
1197
+ */
1198
+ 'get'(
1199
+ parameters?: Parameters<UnknownParamsObject> | null,
1200
+ data?: any,
1201
+ config?: AxiosRequestConfig
1202
+ ): OperationResponse<Paths.GetOutlookConnectionStatus.Responses.$200>
1203
+ }
1204
+ ['/v2/outlook/connection/disconnect']: {
1205
+ /**
1206
+ * disconnectOutlook - Disconnect Outlook
1207
+ *
1208
+ * Removes the Microsoft 365 / Outlook connection for a specific tenant.
1209
+ * This deletes the stored tokens and disconnects the integration.
1210
+ *
1211
+ */
1212
+ 'post'(
1213
+ parameters?: Parameters<UnknownParamsObject> | null,
1214
+ data?: Paths.DisconnectOutlook.RequestBody,
1215
+ config?: AxiosRequestConfig
1216
+ ): OperationResponse<Paths.DisconnectOutlook.Responses.$200>
1217
+ }
1218
+ ['/v2/outlook/shared-mailboxes/connect']: {
1219
+ /**
1220
+ * connectSharedMailbox - Connect Outlook Shared Mailbox
1221
+ *
1222
+ * Connects an Outlook shared mailbox as a shared inbox.
1223
+ * 1. Validates the user has access to the shared mailbox via Microsoft Graph API
1224
+ * 2. Creates a shared inbox entry in email-settings with the Outlook provider info
1225
+ *
1226
+ */
1227
+ 'post'(
1228
+ parameters?: Parameters<UnknownParamsObject> | null,
1229
+ data?: Paths.ConnectSharedMailbox.RequestBody,
1230
+ config?: AxiosRequestConfig
1231
+ ): OperationResponse<Paths.ConnectSharedMailbox.Responses.$201>
1232
+ }
1233
+ ['/v2/outlook/shared-mailboxes/mappings']: {
1234
+ /**
1235
+ * getSharedMailboxMappings - Get Shared Mailbox Mappings
1236
+ *
1237
+ * Returns all shared mailbox mappings for the organization.
1238
+ * Useful to determine which shared inboxes are connected to Outlook
1239
+ * and which tenant provisions each one.
1240
+ *
1241
+ */
1242
+ 'get'(
1243
+ parameters?: Parameters<UnknownParamsObject> | null,
1244
+ data?: any,
1245
+ config?: AxiosRequestConfig
1246
+ ): OperationResponse<Paths.GetSharedMailboxMappings.Responses.$200>
1247
+ }
1248
+ ['/v2/outlook/shared-mailboxes/mappings/{shared_inbox_id}']: {
1249
+ /**
1250
+ * getSharedMailboxMappingById - Get Shared Mailbox Mapping by ID
1251
+ *
1252
+ * Returns the mapping for a specific shared inbox.
1253
+ * Useful to check if a specific inbox is connected to Outlook.
1254
+ *
1255
+ */
1256
+ 'get'(
1257
+ parameters?: Parameters<Paths.GetSharedMailboxMappingById.PathParameters> | null,
1258
+ data?: any,
1259
+ config?: AxiosRequestConfig
1260
+ ): OperationResponse<Paths.GetSharedMailboxMappingById.Responses.$200>
1261
+ }
1262
+ ['/v2/outlook/oauth/callback']: {
1263
+ /**
1264
+ * outlookOAuthCallback - Outlook OAuth callback
1265
+ *
1266
+ * Exchanges authorization code for tokens and stores them.
1267
+ */
1268
+ 'get'(
1269
+ parameters?: Parameters<Paths.OutlookOAuthCallback.QueryParameters> | null,
1270
+ data?: any,
1271
+ config?: AxiosRequestConfig
1272
+ ): OperationResponse<Paths.OutlookOAuthCallback.Responses.$200>
1273
+ }
812
1274
  ['/v1/email-settings']: {
813
1275
  /**
814
1276
  * getSettings - getSettings
@@ -920,6 +1382,7 @@ export type SettingMeta = Components.Schemas.SettingMeta;
920
1382
  export type SettingType = Components.Schemas.SettingType;
921
1383
  export type SettingsResponse = Components.Schemas.SettingsResponse;
922
1384
  export type SharedInboxResponse = Components.Schemas.SharedInboxResponse;
1385
+ export type SharedMailboxMapping = Components.Schemas.SharedMailboxMapping;
923
1386
  export type SignatureSetting = Components.Schemas.SignatureSetting;
924
1387
  export type UpdateEmailAddressPayload = Components.Schemas.UpdateEmailAddressPayload;
925
1388
  export type UpdateSharedInboxPayload = Components.Schemas.UpdateSharedInboxPayload;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/email-settings-client",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "API Client for epilot Email Settings API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",