@epilot/email-settings-client 0.11.0 → 0.13.0-rc.2
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 +153 -0
- package/package.json +3 -2
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={
|
|
1
|
+
(()=>{"use strict";var e={390: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:resolve":{"get":{"operationId":"resolveOutlookConnection","parameters":[{"name":"email","in":"query","required":true}],"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/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":{"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}(390),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
|
@@ -92,9 +92,26 @@ declare namespace Components {
|
|
|
92
92
|
id: string;
|
|
93
93
|
inbox_id: string;
|
|
94
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Outlook connection config stored in DynamoDB
|
|
97
|
+
*/
|
|
98
|
+
export interface OutlookConnectionConfig {
|
|
99
|
+
connected_at?: string; // date-time
|
|
100
|
+
connected_by_user_id?: string;
|
|
101
|
+
display_name?: string;
|
|
102
|
+
email_address?: string; // email
|
|
103
|
+
outlook_email?: string; // email
|
|
104
|
+
provider?: string;
|
|
105
|
+
shared_inbox_id?: string;
|
|
106
|
+
tenant_id?: string;
|
|
107
|
+
}
|
|
95
108
|
export interface ProvisionEpilotEmailAddressPayload {
|
|
96
109
|
address: string;
|
|
97
110
|
}
|
|
111
|
+
export interface ResolveOutlookConnectionResponse {
|
|
112
|
+
resolved: boolean;
|
|
113
|
+
connection?: /* Outlook connection config stored in DynamoDB */ OutlookConnectionConfig;
|
|
114
|
+
}
|
|
98
115
|
/**
|
|
99
116
|
* - Restrict duplicates within:
|
|
100
117
|
* * 10s
|
|
@@ -331,6 +348,8 @@ declare namespace Paths {
|
|
|
331
348
|
}
|
|
332
349
|
export interface $403 {
|
|
333
350
|
}
|
|
351
|
+
export interface $409 {
|
|
352
|
+
}
|
|
334
353
|
export interface $500 {
|
|
335
354
|
}
|
|
336
355
|
}
|
|
@@ -646,6 +665,19 @@ declare namespace Paths {
|
|
|
646
665
|
export type $500 = Components.Responses.InternalServerError;
|
|
647
666
|
}
|
|
648
667
|
}
|
|
668
|
+
namespace ResolveOutlookConnection {
|
|
669
|
+
namespace Parameters {
|
|
670
|
+
export type Email = string; // email
|
|
671
|
+
}
|
|
672
|
+
export interface QueryParameters {
|
|
673
|
+
email: Parameters.Email /* email */;
|
|
674
|
+
}
|
|
675
|
+
namespace Responses {
|
|
676
|
+
export type $200 = Components.Schemas.ResolveOutlookConnectionResponse;
|
|
677
|
+
export type $400 = Components.Responses.BadRequest;
|
|
678
|
+
export type $500 = Components.Responses.InternalServerError;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
649
681
|
namespace SetEmailAddressPrimary {
|
|
650
682
|
export type RequestBody = Components.Schemas.SetEmailAddressPrimaryPayload;
|
|
651
683
|
namespace Responses {
|
|
@@ -656,6 +688,49 @@ declare namespace Paths {
|
|
|
656
688
|
export type $500 = Components.Responses.InternalServerError;
|
|
657
689
|
}
|
|
658
690
|
}
|
|
691
|
+
namespace TestWebhookGet {
|
|
692
|
+
namespace Parameters {
|
|
693
|
+
export type ValidationToken = string;
|
|
694
|
+
}
|
|
695
|
+
export interface QueryParameters {
|
|
696
|
+
validationToken?: Parameters.ValidationToken;
|
|
697
|
+
}
|
|
698
|
+
namespace Responses {
|
|
699
|
+
export type $200 = string;
|
|
700
|
+
export interface $202 {
|
|
701
|
+
message?: string;
|
|
702
|
+
timestamp?: string; // date-time
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
namespace TestWebhookPost {
|
|
707
|
+
namespace Parameters {
|
|
708
|
+
export type DebugMessages = boolean;
|
|
709
|
+
export type ValidationToken = string;
|
|
710
|
+
}
|
|
711
|
+
export interface QueryParameters {
|
|
712
|
+
validationToken?: Parameters.ValidationToken;
|
|
713
|
+
debugMessages?: Parameters.DebugMessages;
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Graph API notification payload
|
|
717
|
+
*/
|
|
718
|
+
export interface RequestBody {
|
|
719
|
+
value?: {
|
|
720
|
+
subscriptionId?: string;
|
|
721
|
+
changeType?: string;
|
|
722
|
+
resource?: string;
|
|
723
|
+
clientState?: string;
|
|
724
|
+
}[];
|
|
725
|
+
}
|
|
726
|
+
namespace Responses {
|
|
727
|
+
export type $200 = string;
|
|
728
|
+
export interface $202 {
|
|
729
|
+
message?: string;
|
|
730
|
+
timestamp?: string; // date-time
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
}
|
|
659
734
|
namespace UpdateEmailAddress {
|
|
660
735
|
namespace Parameters {
|
|
661
736
|
export type Id = string;
|
|
@@ -885,6 +960,16 @@ export interface OperationMethods {
|
|
|
885
960
|
data?: any,
|
|
886
961
|
config?: AxiosRequestConfig
|
|
887
962
|
): OperationResponse<Paths.GetOutlookConnectionStatus.Responses.$200>
|
|
963
|
+
/**
|
|
964
|
+
* resolveOutlookConnection - Resolve Outlook Connection
|
|
965
|
+
*
|
|
966
|
+
* Resolves the Outlook connection for the provided filter parameters.
|
|
967
|
+
*/
|
|
968
|
+
'resolveOutlookConnection'(
|
|
969
|
+
parameters?: Parameters<Paths.ResolveOutlookConnection.QueryParameters> | null,
|
|
970
|
+
data?: any,
|
|
971
|
+
config?: AxiosRequestConfig
|
|
972
|
+
): OperationResponse<Paths.ResolveOutlookConnection.Responses.$200>
|
|
888
973
|
/**
|
|
889
974
|
* disconnectOutlook - Disconnect Outlook
|
|
890
975
|
*
|
|
@@ -935,6 +1020,32 @@ export interface OperationMethods {
|
|
|
935
1020
|
data?: any,
|
|
936
1021
|
config?: AxiosRequestConfig
|
|
937
1022
|
): OperationResponse<Paths.GetSharedMailboxMappingById.Responses.$200>
|
|
1023
|
+
/**
|
|
1024
|
+
* testWebhookGet - Test Webhook (GET)
|
|
1025
|
+
*
|
|
1026
|
+
* Test endpoint for debugging Graph API webhook notifications via ngrok.
|
|
1027
|
+
* Handles Microsoft Graph subscription validation requests by returning the validationToken.
|
|
1028
|
+
* This is a PUBLIC endpoint with no authentication.
|
|
1029
|
+
*
|
|
1030
|
+
*/
|
|
1031
|
+
'testWebhookGet'(
|
|
1032
|
+
parameters?: Parameters<Paths.TestWebhookGet.QueryParameters> | null,
|
|
1033
|
+
data?: any,
|
|
1034
|
+
config?: AxiosRequestConfig
|
|
1035
|
+
): OperationResponse<Paths.TestWebhookGet.Responses.$200 | Paths.TestWebhookGet.Responses.$202>
|
|
1036
|
+
/**
|
|
1037
|
+
* testWebhookPost - Test Webhook (POST)
|
|
1038
|
+
*
|
|
1039
|
+
* Test endpoint for debugging Graph API webhook notifications via ngrok.
|
|
1040
|
+
* Logs all incoming webhook payloads for debugging purposes.
|
|
1041
|
+
* This is a PUBLIC endpoint with no authentication.
|
|
1042
|
+
*
|
|
1043
|
+
*/
|
|
1044
|
+
'testWebhookPost'(
|
|
1045
|
+
parameters?: Parameters<Paths.TestWebhookPost.QueryParameters> | null,
|
|
1046
|
+
data?: Paths.TestWebhookPost.RequestBody,
|
|
1047
|
+
config?: AxiosRequestConfig
|
|
1048
|
+
): OperationResponse<Paths.TestWebhookPost.Responses.$200 | Paths.TestWebhookPost.Responses.$202>
|
|
938
1049
|
/**
|
|
939
1050
|
* outlookOAuthCallback - Outlook OAuth callback
|
|
940
1051
|
*
|
|
@@ -1201,6 +1312,18 @@ export interface PathsDictionary {
|
|
|
1201
1312
|
config?: AxiosRequestConfig
|
|
1202
1313
|
): OperationResponse<Paths.GetOutlookConnectionStatus.Responses.$200>
|
|
1203
1314
|
}
|
|
1315
|
+
['/v2/outlook/connection:resolve']: {
|
|
1316
|
+
/**
|
|
1317
|
+
* resolveOutlookConnection - Resolve Outlook Connection
|
|
1318
|
+
*
|
|
1319
|
+
* Resolves the Outlook connection for the provided filter parameters.
|
|
1320
|
+
*/
|
|
1321
|
+
'get'(
|
|
1322
|
+
parameters?: Parameters<Paths.ResolveOutlookConnection.QueryParameters> | null,
|
|
1323
|
+
data?: any,
|
|
1324
|
+
config?: AxiosRequestConfig
|
|
1325
|
+
): OperationResponse<Paths.ResolveOutlookConnection.Responses.$200>
|
|
1326
|
+
}
|
|
1204
1327
|
['/v2/outlook/connection/disconnect']: {
|
|
1205
1328
|
/**
|
|
1206
1329
|
* disconnectOutlook - Disconnect Outlook
|
|
@@ -1259,6 +1382,34 @@ export interface PathsDictionary {
|
|
|
1259
1382
|
config?: AxiosRequestConfig
|
|
1260
1383
|
): OperationResponse<Paths.GetSharedMailboxMappingById.Responses.$200>
|
|
1261
1384
|
}
|
|
1385
|
+
['/v2/outlook/test-webhook']: {
|
|
1386
|
+
/**
|
|
1387
|
+
* testWebhookGet - Test Webhook (GET)
|
|
1388
|
+
*
|
|
1389
|
+
* Test endpoint for debugging Graph API webhook notifications via ngrok.
|
|
1390
|
+
* Handles Microsoft Graph subscription validation requests by returning the validationToken.
|
|
1391
|
+
* This is a PUBLIC endpoint with no authentication.
|
|
1392
|
+
*
|
|
1393
|
+
*/
|
|
1394
|
+
'get'(
|
|
1395
|
+
parameters?: Parameters<Paths.TestWebhookGet.QueryParameters> | null,
|
|
1396
|
+
data?: any,
|
|
1397
|
+
config?: AxiosRequestConfig
|
|
1398
|
+
): OperationResponse<Paths.TestWebhookGet.Responses.$200 | Paths.TestWebhookGet.Responses.$202>
|
|
1399
|
+
/**
|
|
1400
|
+
* testWebhookPost - Test Webhook (POST)
|
|
1401
|
+
*
|
|
1402
|
+
* Test endpoint for debugging Graph API webhook notifications via ngrok.
|
|
1403
|
+
* Logs all incoming webhook payloads for debugging purposes.
|
|
1404
|
+
* This is a PUBLIC endpoint with no authentication.
|
|
1405
|
+
*
|
|
1406
|
+
*/
|
|
1407
|
+
'post'(
|
|
1408
|
+
parameters?: Parameters<Paths.TestWebhookPost.QueryParameters> | null,
|
|
1409
|
+
data?: Paths.TestWebhookPost.RequestBody,
|
|
1410
|
+
config?: AxiosRequestConfig
|
|
1411
|
+
): OperationResponse<Paths.TestWebhookPost.Responses.$200 | Paths.TestWebhookPost.Responses.$202>
|
|
1412
|
+
}
|
|
1262
1413
|
['/v2/outlook/oauth/callback']: {
|
|
1263
1414
|
/**
|
|
1264
1415
|
* outlookOAuthCallback - Outlook OAuth callback
|
|
@@ -1374,7 +1525,9 @@ export type EmailAddressSetting = Components.Schemas.EmailAddressSetting;
|
|
|
1374
1525
|
export type EmailDomainSetting = Components.Schemas.EmailDomainSetting;
|
|
1375
1526
|
export type ErrorResponse = Components.Schemas.ErrorResponse;
|
|
1376
1527
|
export type InboxBucketResponse = Components.Schemas.InboxBucketResponse;
|
|
1528
|
+
export type OutlookConnectionConfig = Components.Schemas.OutlookConnectionConfig;
|
|
1377
1529
|
export type ProvisionEpilotEmailAddressPayload = Components.Schemas.ProvisionEpilotEmailAddressPayload;
|
|
1530
|
+
export type ResolveOutlookConnectionResponse = Components.Schemas.ResolveOutlookConnectionResponse;
|
|
1378
1531
|
export type RestrictDuplicatesWithinSetting = Components.Schemas.RestrictDuplicatesWithinSetting;
|
|
1379
1532
|
export type SetEmailAddressPrimaryPayload = Components.Schemas.SetEmailAddressPrimaryPayload;
|
|
1380
1533
|
export type Setting = Components.Schemas.Setting;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/email-settings-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0-rc.2",
|
|
4
4
|
"description": "API Client for epilot Email Settings API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,6 +23,7 @@
|
|
|
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
|
+
"openapi:local": "node ../../scripts/update-openapi.js /Users/manikandansubramanian/Workspace/email-settings/lambda/ApiHandlerFunction/openapi.yml",
|
|
26
27
|
"typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
|
|
27
28
|
"build": "tsc && npm run build:patch && npm run bundle-definition",
|
|
28
29
|
"build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
|
|
@@ -71,4 +72,4 @@
|
|
|
71
72
|
"webpack-cli": "^4.4.0"
|
|
72
73
|
},
|
|
73
74
|
"gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
|
|
74
|
-
}
|
|
75
|
+
}
|