@epilot/email-settings-client 1.5.1 → 2.0.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/definition.js +1 -1
- package/dist/openapi.d.ts +107 -8
- package/package.json +2 -2
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={
|
|
1
|
+
(()=>{"use strict";var e={438(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":{"post":{"operationId":"connectOutlook","requestBody":{"required":true,"content":{"application/json":{}}},"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":{}},"get":{"operationId":"getDomains","responses":{}}},"/v1/email-settings/domain/name-servers:verify":{"post":{"operationId":"verifyNameServers","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/email-settings/domain/dns-records:verify":{"post":{"operationId":"verifyDnsRecords","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}(438),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
|
@@ -37,6 +37,22 @@ declare namespace Components {
|
|
|
37
37
|
export type UpdateSharedInboxSuccessResponse = /* Shared inbox configuration with all associated metadata. */ Schemas.SharedInboxResponse;
|
|
38
38
|
}
|
|
39
39
|
namespace Schemas {
|
|
40
|
+
/**
|
|
41
|
+
* Feature flags selecting which Microsoft Graph scopes to request.
|
|
42
|
+
* At least one flag must be true. Passing a superset of previously
|
|
43
|
+
* granted features triggers incremental consent for the delta only.
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
export interface ConnectOutlookRequest {
|
|
47
|
+
/**
|
|
48
|
+
* Request 'mail' specific scopes.
|
|
49
|
+
*/
|
|
50
|
+
mail?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Request 'calendar' specific scopes.
|
|
53
|
+
*/
|
|
54
|
+
calendar?: boolean;
|
|
55
|
+
}
|
|
40
56
|
/**
|
|
41
57
|
* Mapping between an Outlook email and its Outlook Connection.
|
|
42
58
|
* This tracks which provider/tenant provisions each Outlook email.
|
|
@@ -343,14 +359,24 @@ declare namespace Components {
|
|
|
343
359
|
*/
|
|
344
360
|
status: "connected" | "expired" | "pending_auth" | "not_connected";
|
|
345
361
|
/**
|
|
346
|
-
* Action for UI to take (all call
|
|
362
|
+
* Action for UI to take (all call POST /outlook/connect):
|
|
347
363
|
* - connect: No connection, initiate OAuth
|
|
348
364
|
* - authorize: Admin consent done, complete OAuth
|
|
349
|
-
* - reconnect: Re-authenticate expired session
|
|
365
|
+
* - reconnect: Re-authenticate expired session or approve updated permissions
|
|
350
366
|
* - none: Fully connected, no action needed
|
|
351
367
|
*
|
|
352
368
|
*/
|
|
353
369
|
action: "connect" | "authorize" | "reconnect" | "none";
|
|
370
|
+
/**
|
|
371
|
+
* Discriminates the cause when `action` is `reconnect`:
|
|
372
|
+
* - expired: Stored tokens are no longer valid; user must re-authenticate
|
|
373
|
+
* - permission_update: Token is valid, but the granted scopes do not cover the
|
|
374
|
+
* scopes required by the configured Outlook integrations (currently `mail`).
|
|
375
|
+
* The user must reconnect to grant the additional permissions; Microsoft's
|
|
376
|
+
* incremental-consent flow will only prompt for the delta.
|
|
377
|
+
*
|
|
378
|
+
*/
|
|
379
|
+
action_reason?: "expired" | "permission_update";
|
|
354
380
|
/**
|
|
355
381
|
* Display name of user who connected
|
|
356
382
|
*/
|
|
@@ -790,10 +816,18 @@ declare namespace Paths {
|
|
|
790
816
|
}
|
|
791
817
|
}
|
|
792
818
|
namespace ConnectOutlook {
|
|
819
|
+
export type RequestBody = /**
|
|
820
|
+
* Feature flags selecting which Microsoft Graph scopes to request.
|
|
821
|
+
* At least one flag must be true. Passing a superset of previously
|
|
822
|
+
* granted features triggers incremental consent for the delta only.
|
|
823
|
+
*
|
|
824
|
+
*/
|
|
825
|
+
Components.Schemas.ConnectOutlookRequest;
|
|
793
826
|
namespace Responses {
|
|
794
827
|
export interface $200 {
|
|
795
|
-
authorization_url
|
|
828
|
+
authorization_url: string;
|
|
796
829
|
}
|
|
830
|
+
export type $400 = Components.Responses.OutlookErrorResponse;
|
|
797
831
|
export type $403 = Components.Responses.OutlookErrorResponse;
|
|
798
832
|
}
|
|
799
833
|
}
|
|
@@ -1315,6 +1349,14 @@ declare namespace Paths {
|
|
|
1315
1349
|
export type $500 = Components.Responses.InternalServerError;
|
|
1316
1350
|
}
|
|
1317
1351
|
}
|
|
1352
|
+
namespace VerifyDnsRecords {
|
|
1353
|
+
export type RequestBody = /* Custom email domain configuration. */ Components.Schemas.Domain;
|
|
1354
|
+
namespace Responses {
|
|
1355
|
+
export type $200 = Components.Schemas.SettingsResponse;
|
|
1356
|
+
export type $403 = Components.Responses.Forbidden;
|
|
1357
|
+
export type $404 = Components.Responses.NotFound;
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1318
1360
|
namespace VerifyDomain {
|
|
1319
1361
|
export type RequestBody = /* Custom email domain configuration. */ Components.Schemas.Domain;
|
|
1320
1362
|
namespace Responses {
|
|
@@ -1333,6 +1375,7 @@ declare namespace Paths {
|
|
|
1333
1375
|
}
|
|
1334
1376
|
}
|
|
1335
1377
|
|
|
1378
|
+
|
|
1336
1379
|
export interface OperationMethods {
|
|
1337
1380
|
/**
|
|
1338
1381
|
* provisionEpilotEmailAddress - provisionEpilotEmailAddress
|
|
@@ -1532,11 +1575,18 @@ export interface OperationMethods {
|
|
|
1532
1575
|
/**
|
|
1533
1576
|
* connectOutlook - connectOutlook
|
|
1534
1577
|
*
|
|
1535
|
-
* Returns Microsoft authorization URL for Outlook OAuth.
|
|
1578
|
+
* Returns the Microsoft authorization URL for Outlook OAuth.
|
|
1579
|
+
*
|
|
1580
|
+
* The request body selects which features to request scopes for. Feature
|
|
1581
|
+
* flags are additive; Microsoft OAuth scopes are cumulative. Calling this
|
|
1582
|
+
* endpoint again with a superset of features (e.g. `mail` already connected,
|
|
1583
|
+
* and `calendar` added) triggers Microsoft's incremental-consent flow —
|
|
1584
|
+
* the user only sees a consent prompt for the new scopes.
|
|
1585
|
+
*
|
|
1536
1586
|
*/
|
|
1537
1587
|
'connectOutlook'(
|
|
1538
1588
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1539
|
-
data?:
|
|
1589
|
+
data?: Paths.ConnectOutlook.RequestBody,
|
|
1540
1590
|
config?: AxiosRequestConfig
|
|
1541
1591
|
): OperationResponse<Paths.ConnectOutlook.Responses.$200>
|
|
1542
1592
|
/**
|
|
@@ -1808,12 +1858,31 @@ export interface OperationMethods {
|
|
|
1808
1858
|
*
|
|
1809
1859
|
* Run this verification after configuring NS records in your DNS provider.
|
|
1810
1860
|
*
|
|
1861
|
+
* **Deprecated**: Use `/domain/dns-records:verify` for new integrations.
|
|
1862
|
+
*
|
|
1811
1863
|
*/
|
|
1812
1864
|
'verifyNameServers'(
|
|
1813
1865
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1814
1866
|
data?: Paths.VerifyNameServers.RequestBody,
|
|
1815
1867
|
config?: AxiosRequestConfig
|
|
1816
1868
|
): OperationResponse<Paths.VerifyNameServers.Responses.$200>
|
|
1869
|
+
/**
|
|
1870
|
+
* verifyDnsRecords - verifyDnsRecords
|
|
1871
|
+
*
|
|
1872
|
+
* Verifies that the domain's DNS records (MX, TXT, CNAME) are correctly configured
|
|
1873
|
+
* in the customer's DNS provider.
|
|
1874
|
+
*
|
|
1875
|
+
* This check performs DNS lookups to confirm each required record is present
|
|
1876
|
+
* before proceeding with full domain identity verification.
|
|
1877
|
+
*
|
|
1878
|
+
* Run this verification after configuring all DNS records in your DNS provider.
|
|
1879
|
+
*
|
|
1880
|
+
*/
|
|
1881
|
+
'verifyDnsRecords'(
|
|
1882
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1883
|
+
data?: Paths.VerifyDnsRecords.RequestBody,
|
|
1884
|
+
config?: AxiosRequestConfig
|
|
1885
|
+
): OperationResponse<Paths.VerifyDnsRecords.Responses.$200>
|
|
1817
1886
|
/**
|
|
1818
1887
|
* verifyDomain - verifyDomain
|
|
1819
1888
|
*
|
|
@@ -2049,11 +2118,18 @@ export interface PathsDictionary {
|
|
|
2049
2118
|
/**
|
|
2050
2119
|
* connectOutlook - connectOutlook
|
|
2051
2120
|
*
|
|
2052
|
-
* Returns Microsoft authorization URL for Outlook OAuth.
|
|
2121
|
+
* Returns the Microsoft authorization URL for Outlook OAuth.
|
|
2122
|
+
*
|
|
2123
|
+
* The request body selects which features to request scopes for. Feature
|
|
2124
|
+
* flags are additive; Microsoft OAuth scopes are cumulative. Calling this
|
|
2125
|
+
* endpoint again with a superset of features (e.g. `mail` already connected,
|
|
2126
|
+
* and `calendar` added) triggers Microsoft's incremental-consent flow —
|
|
2127
|
+
* the user only sees a consent prompt for the new scopes.
|
|
2128
|
+
*
|
|
2053
2129
|
*/
|
|
2054
|
-
'
|
|
2130
|
+
'post'(
|
|
2055
2131
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
2056
|
-
data?:
|
|
2132
|
+
data?: Paths.ConnectOutlook.RequestBody,
|
|
2057
2133
|
config?: AxiosRequestConfig
|
|
2058
2134
|
): OperationResponse<Paths.ConnectOutlook.Responses.$200>
|
|
2059
2135
|
}
|
|
@@ -2357,6 +2433,8 @@ export interface PathsDictionary {
|
|
|
2357
2433
|
*
|
|
2358
2434
|
* Run this verification after configuring NS records in your DNS provider.
|
|
2359
2435
|
*
|
|
2436
|
+
* **Deprecated**: Use `/domain/dns-records:verify` for new integrations.
|
|
2437
|
+
*
|
|
2360
2438
|
*/
|
|
2361
2439
|
'post'(
|
|
2362
2440
|
parameters?: Parameters<UnknownParamsObject> | null,
|
|
@@ -2364,6 +2442,25 @@ export interface PathsDictionary {
|
|
|
2364
2442
|
config?: AxiosRequestConfig
|
|
2365
2443
|
): OperationResponse<Paths.VerifyNameServers.Responses.$200>
|
|
2366
2444
|
}
|
|
2445
|
+
['/v1/email-settings/domain/dns-records:verify']: {
|
|
2446
|
+
/**
|
|
2447
|
+
* verifyDnsRecords - verifyDnsRecords
|
|
2448
|
+
*
|
|
2449
|
+
* Verifies that the domain's DNS records (MX, TXT, CNAME) are correctly configured
|
|
2450
|
+
* in the customer's DNS provider.
|
|
2451
|
+
*
|
|
2452
|
+
* This check performs DNS lookups to confirm each required record is present
|
|
2453
|
+
* before proceeding with full domain identity verification.
|
|
2454
|
+
*
|
|
2455
|
+
* Run this verification after configuring all DNS records in your DNS provider.
|
|
2456
|
+
*
|
|
2457
|
+
*/
|
|
2458
|
+
'post'(
|
|
2459
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
2460
|
+
data?: Paths.VerifyDnsRecords.RequestBody,
|
|
2461
|
+
config?: AxiosRequestConfig
|
|
2462
|
+
): OperationResponse<Paths.VerifyDnsRecords.Responses.$200>
|
|
2463
|
+
}
|
|
2367
2464
|
['/v1/email-settings/domain:verify']: {
|
|
2368
2465
|
/**
|
|
2369
2466
|
* verifyDomain - verifyDomain
|
|
@@ -2389,6 +2486,8 @@ export interface PathsDictionary {
|
|
|
2389
2486
|
|
|
2390
2487
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
|
2391
2488
|
|
|
2489
|
+
|
|
2490
|
+
export type ConnectOutlookRequest = Components.Schemas.ConnectOutlookRequest;
|
|
2392
2491
|
export type ConnectedOutlookEmail = Components.Schemas.ConnectedOutlookEmail;
|
|
2393
2492
|
export type CreateEmailAddressPayload = Components.Schemas.CreateEmailAddressPayload;
|
|
2394
2493
|
export type CreateSharedInboxPayload = Components.Schemas.CreateSharedInboxPayload;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/email-settings-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "API Client for epilot Email Settings API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"axios": "^1.11.0",
|
|
62
62
|
"copy-webpack-plugin": "^7.0.0",
|
|
63
63
|
"json-loader": "^0.5.7",
|
|
64
|
-
"openapicmd": "^2.
|
|
64
|
+
"openapicmd": "^2.9.2",
|
|
65
65
|
"ts-loader": "^8.0.14",
|
|
66
66
|
"ts-node": "^10.9.1",
|
|
67
67
|
"typescript": "^4.1.3",
|