@epilot/email-settings-client 1.1.0-rc1 → 1.3.0-rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={330(e,o,s){var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0});var n=t(s(466));o.default=n.default},466(e){e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v2/email-settings/email-addresses/epilot:provision":{"put":{"operationId":"provisionEpilotEmailAddress","requestBody":{"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/mailbox/connect":{"post":{"operationId":"connectOutlookMailbox","requestBody":{"required":true,"content":{"application/json":{}}},"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":{"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"}]}')}},o={},s=function s(t){var n=o[t];if(void 0!==n)return n.exports;var r=o[t]={exports:{}};return e[t].call(r.exports,r,r.exports,s),r.exports}(330),t=exports;for(var n in s)t[n]=s[n];s.__esModule&&Object.defineProperty(t,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={330(e,o,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":{"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/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":{"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":[]}')}},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})})();
package/dist/openapi.d.ts CHANGED
@@ -119,26 +119,9 @@ declare namespace Components {
119
119
  id: string;
120
120
  inbox_id: string;
121
121
  }
122
- /**
123
- * Outlook connection config stored in DynamoDB
124
- */
125
- export interface OutlookConnectionConfig {
126
- connected_at?: string; // date-time
127
- connected_by_user_id?: string;
128
- display_name?: string;
129
- email_address?: string; // email
130
- outlook_email?: string; // email
131
- provider?: string;
132
- shared_inbox_id?: string;
133
- tenant_id?: string;
134
- }
135
122
  export interface ProvisionEpilotEmailAddressPayload {
136
123
  address: string;
137
124
  }
138
- export interface ResolveOutlookConnectionResponse {
139
- resolved: boolean;
140
- connection?: /* Outlook connection config stored in DynamoDB */ OutlookConnectionConfig;
141
- }
142
125
  /**
143
126
  * - Restrict duplicates within:
144
127
  * * 10s
@@ -410,6 +393,27 @@ declare namespace Paths {
410
393
  }
411
394
  }
412
395
  }
396
+ namespace DisconnectOutlookMailbox {
397
+ namespace Parameters {
398
+ export type Email = string; // email
399
+ }
400
+ export interface PathParameters {
401
+ email: Parameters.Email /* email */;
402
+ }
403
+ namespace Responses {
404
+ export interface $200 {
405
+ success: boolean;
406
+ /**
407
+ * The email address that was disconnected
408
+ */
409
+ email: string; // email
410
+ }
411
+ export interface $404 {
412
+ }
413
+ export interface $500 {
414
+ }
415
+ }
416
+ }
413
417
  namespace GetConnectedOutlookEmails {
414
418
  namespace Responses {
415
419
  export interface $200 {
@@ -610,19 +614,6 @@ declare namespace Paths {
610
614
  export type $500 = Components.Responses.InternalServerError;
611
615
  }
612
616
  }
613
- namespace ResolveOutlookConnection {
614
- namespace Parameters {
615
- export type Email = string; // email
616
- }
617
- export interface QueryParameters {
618
- email: Parameters.Email /* email */;
619
- }
620
- namespace Responses {
621
- export type $200 = Components.Schemas.ResolveOutlookConnectionResponse;
622
- export type $400 = Components.Responses.BadRequest;
623
- export type $500 = Components.Responses.InternalServerError;
624
- }
625
- }
626
617
  namespace SetEmailAddressPrimary {
627
618
  export type RequestBody = Components.Schemas.SetEmailAddressPrimaryPayload;
628
619
  namespace Responses {
@@ -905,16 +896,6 @@ export interface OperationMethods {
905
896
  data?: any,
906
897
  config?: AxiosRequestConfig
907
898
  ): OperationResponse<Paths.GetOutlookConnectionStatus.Responses.$200>
908
- /**
909
- * resolveOutlookConnection - Resolve Outlook Connection
910
- *
911
- * Resolves the Outlook connection for the provided filter parameters.
912
- */
913
- 'resolveOutlookConnection'(
914
- parameters?: Parameters<Paths.ResolveOutlookConnection.QueryParameters> | null,
915
- data?: any,
916
- config?: AxiosRequestConfig
917
- ): OperationResponse<Paths.ResolveOutlookConnection.Responses.$200>
918
899
  /**
919
900
  * disconnectOutlook - Disconnect Outlook
920
901
  *
@@ -941,6 +922,19 @@ export interface OperationMethods {
941
922
  data?: Paths.ConnectOutlookMailbox.RequestBody,
942
923
  config?: AxiosRequestConfig
943
924
  ): OperationResponse<Paths.ConnectOutlookMailbox.Responses.$201>
925
+ /**
926
+ * disconnectOutlookMailbox - Disconnect Outlook Mailbox
927
+ *
928
+ * Disconnects a single Outlook mailbox by email address.
929
+ * Deletes the email address entity, Outlook email mapping, and Graph API subscriptions.
930
+ * Does not affect the tenant-level Outlook connection.
931
+ *
932
+ */
933
+ 'disconnectOutlookMailbox'(
934
+ parameters?: Parameters<Paths.DisconnectOutlookMailbox.PathParameters> | null,
935
+ data?: any,
936
+ config?: AxiosRequestConfig
937
+ ): OperationResponse<Paths.DisconnectOutlookMailbox.Responses.$200>
944
938
  /**
945
939
  * getConnectedOutlookEmails - Get Connected Outlook Emails
946
940
  *
@@ -1244,18 +1238,6 @@ export interface PathsDictionary {
1244
1238
  config?: AxiosRequestConfig
1245
1239
  ): OperationResponse<Paths.GetOutlookConnectionStatus.Responses.$200>
1246
1240
  }
1247
- ['/v2/outlook/connection:resolve']: {
1248
- /**
1249
- * resolveOutlookConnection - Resolve Outlook Connection
1250
- *
1251
- * Resolves the Outlook connection for the provided filter parameters.
1252
- */
1253
- 'get'(
1254
- parameters?: Parameters<Paths.ResolveOutlookConnection.QueryParameters> | null,
1255
- data?: any,
1256
- config?: AxiosRequestConfig
1257
- ): OperationResponse<Paths.ResolveOutlookConnection.Responses.$200>
1258
- }
1259
1241
  ['/v2/outlook/connection/disconnect']: {
1260
1242
  /**
1261
1243
  * disconnectOutlook - Disconnect Outlook
@@ -1286,6 +1268,21 @@ export interface PathsDictionary {
1286
1268
  config?: AxiosRequestConfig
1287
1269
  ): OperationResponse<Paths.ConnectOutlookMailbox.Responses.$201>
1288
1270
  }
1271
+ ['/v2/outlook/mailbox/{email}/disconnect']: {
1272
+ /**
1273
+ * disconnectOutlookMailbox - Disconnect Outlook Mailbox
1274
+ *
1275
+ * Disconnects a single Outlook mailbox by email address.
1276
+ * Deletes the email address entity, Outlook email mapping, and Graph API subscriptions.
1277
+ * Does not affect the tenant-level Outlook connection.
1278
+ *
1279
+ */
1280
+ 'post'(
1281
+ parameters?: Parameters<Paths.DisconnectOutlookMailbox.PathParameters> | null,
1282
+ data?: any,
1283
+ config?: AxiosRequestConfig
1284
+ ): OperationResponse<Paths.DisconnectOutlookMailbox.Responses.$200>
1285
+ }
1289
1286
  ['/v2/outlook/mailbox/mappings']: {
1290
1287
  /**
1291
1288
  * getConnectedOutlookEmails - Get Connected Outlook Emails
@@ -1443,9 +1440,7 @@ export type EmailAddressSetting = Components.Schemas.EmailAddressSetting;
1443
1440
  export type EmailDomainSetting = Components.Schemas.EmailDomainSetting;
1444
1441
  export type ErrorResponse = Components.Schemas.ErrorResponse;
1445
1442
  export type InboxBucketResponse = Components.Schemas.InboxBucketResponse;
1446
- export type OutlookConnectionConfig = Components.Schemas.OutlookConnectionConfig;
1447
1443
  export type ProvisionEpilotEmailAddressPayload = Components.Schemas.ProvisionEpilotEmailAddressPayload;
1448
- export type ResolveOutlookConnectionResponse = Components.Schemas.ResolveOutlookConnectionResponse;
1449
1444
  export type RestrictDuplicatesWithinSetting = Components.Schemas.RestrictDuplicatesWithinSetting;
1450
1445
  export type SetEmailAddressPrimaryPayload = Components.Schemas.SetEmailAddressPrimaryPayload;
1451
1446
  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": "1.1.0-rc1",
3
+ "version": "1.3.0-rc1",
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
+ }