@epilot/email-settings-client 0.12.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.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={330:function(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":{"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/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(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})})();
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
@@ -648,6 +665,19 @@ declare namespace Paths {
648
665
  export type $500 = Components.Responses.InternalServerError;
649
666
  }
650
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
+ }
651
681
  namespace SetEmailAddressPrimary {
652
682
  export type RequestBody = Components.Schemas.SetEmailAddressPrimaryPayload;
653
683
  namespace Responses {
@@ -930,6 +960,16 @@ export interface OperationMethods {
930
960
  data?: any,
931
961
  config?: AxiosRequestConfig
932
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>
933
973
  /**
934
974
  * disconnectOutlook - Disconnect Outlook
935
975
  *
@@ -1272,6 +1312,18 @@ export interface PathsDictionary {
1272
1312
  config?: AxiosRequestConfig
1273
1313
  ): OperationResponse<Paths.GetOutlookConnectionStatus.Responses.$200>
1274
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
+ }
1275
1327
  ['/v2/outlook/connection/disconnect']: {
1276
1328
  /**
1277
1329
  * disconnectOutlook - Disconnect Outlook
@@ -1473,7 +1525,9 @@ export type EmailAddressSetting = Components.Schemas.EmailAddressSetting;
1473
1525
  export type EmailDomainSetting = Components.Schemas.EmailDomainSetting;
1474
1526
  export type ErrorResponse = Components.Schemas.ErrorResponse;
1475
1527
  export type InboxBucketResponse = Components.Schemas.InboxBucketResponse;
1528
+ export type OutlookConnectionConfig = Components.Schemas.OutlookConnectionConfig;
1476
1529
  export type ProvisionEpilotEmailAddressPayload = Components.Schemas.ProvisionEpilotEmailAddressPayload;
1530
+ export type ResolveOutlookConnectionResponse = Components.Schemas.ResolveOutlookConnectionResponse;
1477
1531
  export type RestrictDuplicatesWithinSetting = Components.Schemas.RestrictDuplicatesWithinSetting;
1478
1532
  export type SetEmailAddressPrimaryPayload = Components.Schemas.SetEmailAddressPrimaryPayload;
1479
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.12.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
+ }