@epilot/email-settings-client 1.4.0 → 1.5.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/client.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { Client } from './openapi';
1
+ import type { Client } from './openapi';
2
2
  export declare const getClient: () => Client;
3
3
  export declare const createClient: () => Client;
@@ -1 +1 @@
1
- (()=>{"use strict";var e={330(e,o,t){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0});var n=s(t(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":{"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":{"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/{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":{}}},"/v1/email-settings/domain/name-servers:verify":{"post":{"operationId":"verifyNameServers","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"}]}')}},o={},t=function t(s){var n=o[s];if(void 0!==n)return n.exports;var r=o[s]={exports:{}};return e[s].call(r.exports,r,r.exports,t),r.exports}(330),s=exports;for(var n in t)s[n]=t[n];t.__esModule&&Object.defineProperty(s,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={330(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":{"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/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":{}}},"/v1/email-settings/domain/name-servers:verify":{"post":{"operationId":"verifyNameServers","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}(330),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
@@ -1,5 +1,3 @@
1
- /* eslint-disable */
2
-
3
1
  import type {
4
2
  OpenAPIClient,
5
3
  Parameters,
@@ -779,6 +777,18 @@ declare namespace Paths {
779
777
  export type $500 = Components.Responses.InternalServerError;
780
778
  }
781
779
  }
780
+ namespace ConnectMsTeams {
781
+ namespace Responses {
782
+ export interface $200 {
783
+ connected?: boolean;
784
+ connected_at?: string; // date-time
785
+ }
786
+ export interface $400 {
787
+ error?: string;
788
+ message?: string;
789
+ }
790
+ }
791
+ }
782
792
  namespace ConnectOutlook {
783
793
  namespace Responses {
784
794
  export interface $200 {
@@ -899,6 +909,13 @@ declare namespace Paths {
899
909
  export type $500 = Components.Responses.InternalServerError;
900
910
  }
901
911
  }
912
+ namespace DisconnectMsTeams {
913
+ namespace Responses {
914
+ export interface $200 {
915
+ connected?: boolean;
916
+ }
917
+ }
918
+ }
902
919
  namespace DisconnectOutlook {
903
920
  export interface RequestBody {
904
921
  /**
@@ -996,6 +1013,24 @@ declare namespace Paths {
996
1013
  }
997
1014
  }
998
1015
  }
1016
+ namespace GetMsTeamsStatus {
1017
+ namespace Responses {
1018
+ export interface $200 {
1019
+ /**
1020
+ * Whether the Teams channel is connected
1021
+ */
1022
+ connected?: boolean;
1023
+ /**
1024
+ * When the Teams channel was connected
1025
+ */
1026
+ connected_at?: string; // date-time
1027
+ /**
1028
+ * User ID who connected the Teams channel
1029
+ */
1030
+ connected_by_user_id?: string;
1031
+ }
1032
+ }
1033
+ }
999
1034
  namespace GetOutlookConnectionStatus {
1000
1035
  namespace Responses {
1001
1036
  export interface $200 {
@@ -1007,6 +1042,10 @@ declare namespace Paths {
1007
1042
  * Whether any connections exist
1008
1043
  */
1009
1044
  has_connections: boolean;
1045
+ /**
1046
+ * Whether Microsoft Teams features are enabled for this organization
1047
+ */
1048
+ teams_enabled?: boolean;
1010
1049
  }
1011
1050
  export interface $400 {
1012
1051
  }
@@ -1521,6 +1560,40 @@ export interface OperationMethods {
1521
1560
  data?: Paths.DisconnectOutlook.RequestBody,
1522
1561
  config?: AxiosRequestConfig
1523
1562
  ): OperationResponse<Paths.DisconnectOutlook.Responses.$200>
1563
+ /**
1564
+ * connectMsTeams - connectMsTeams
1565
+ *
1566
+ * Connects Microsoft Teams channel (click-to-call deep links, meetings) for the organization.
1567
+ * Requires an active Microsoft 365 / Outlook connection.
1568
+ *
1569
+ */
1570
+ 'connectMsTeams'(
1571
+ parameters?: Parameters<UnknownParamsObject> | null,
1572
+ data?: any,
1573
+ config?: AxiosRequestConfig
1574
+ ): OperationResponse<Paths.ConnectMsTeams.Responses.$200>
1575
+ /**
1576
+ * disconnectMsTeams - disconnectMsTeams
1577
+ *
1578
+ * Disconnects Microsoft Teams channel for the organization.
1579
+ *
1580
+ */
1581
+ 'disconnectMsTeams'(
1582
+ parameters?: Parameters<UnknownParamsObject> | null,
1583
+ data?: any,
1584
+ config?: AxiosRequestConfig
1585
+ ): OperationResponse<Paths.DisconnectMsTeams.Responses.$200>
1586
+ /**
1587
+ * getMsTeamsStatus - getMsTeamsStatus
1588
+ *
1589
+ * Returns the connection status of the Microsoft Teams channel for the organization.
1590
+ *
1591
+ */
1592
+ 'getMsTeamsStatus'(
1593
+ parameters?: Parameters<UnknownParamsObject> | null,
1594
+ data?: any,
1595
+ config?: AxiosRequestConfig
1596
+ ): OperationResponse<Paths.GetMsTeamsStatus.Responses.$200>
1524
1597
  /**
1525
1598
  * connectOutlookMailbox - connectOutlookMailbox
1526
1599
  *
@@ -1998,6 +2071,46 @@ export interface PathsDictionary {
1998
2071
  config?: AxiosRequestConfig
1999
2072
  ): OperationResponse<Paths.DisconnectOutlook.Responses.$200>
2000
2073
  }
2074
+ ['/v2/channels/msteams/connect']: {
2075
+ /**
2076
+ * connectMsTeams - connectMsTeams
2077
+ *
2078
+ * Connects Microsoft Teams channel (click-to-call deep links, meetings) for the organization.
2079
+ * Requires an active Microsoft 365 / Outlook connection.
2080
+ *
2081
+ */
2082
+ 'post'(
2083
+ parameters?: Parameters<UnknownParamsObject> | null,
2084
+ data?: any,
2085
+ config?: AxiosRequestConfig
2086
+ ): OperationResponse<Paths.ConnectMsTeams.Responses.$200>
2087
+ }
2088
+ ['/v2/channels/msteams/disconnect']: {
2089
+ /**
2090
+ * disconnectMsTeams - disconnectMsTeams
2091
+ *
2092
+ * Disconnects Microsoft Teams channel for the organization.
2093
+ *
2094
+ */
2095
+ 'post'(
2096
+ parameters?: Parameters<UnknownParamsObject> | null,
2097
+ data?: any,
2098
+ config?: AxiosRequestConfig
2099
+ ): OperationResponse<Paths.DisconnectMsTeams.Responses.$200>
2100
+ }
2101
+ ['/v2/channels/msteams/status']: {
2102
+ /**
2103
+ * getMsTeamsStatus - getMsTeamsStatus
2104
+ *
2105
+ * Returns the connection status of the Microsoft Teams channel for the organization.
2106
+ *
2107
+ */
2108
+ 'get'(
2109
+ parameters?: Parameters<UnknownParamsObject> | null,
2110
+ data?: any,
2111
+ config?: AxiosRequestConfig
2112
+ ): OperationResponse<Paths.GetMsTeamsStatus.Responses.$200>
2113
+ }
2001
2114
  ['/v2/outlook/mailbox/connect']: {
2002
2115
  /**
2003
2116
  * connectOutlookMailbox - connectOutlookMailbox
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/email-settings-client",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "API Client for epilot Email Settings API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,17 +19,17 @@
19
19
  "email-settings"
20
20
  ],
21
21
  "scripts": {
22
- "test": "jest",
22
+ "test": "vitest",
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
26
  "openapi:local": "node ../../scripts/update-openapi.js /Users/manikandansubramanian/Workspace/email-settings/lambda/ApiHandlerFunction/openapi.yml",
27
- "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
27
+ "typegen": "openapi typegen src/openapi.json --client > src/openapi.d.ts",
28
28
  "build": "tsc && npm run build:patch && npm run bundle-definition",
29
29
  "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
30
30
  "build:watch": "npm run build && tsc -w",
31
31
  "prepublishOnly": "npm run typegen && npm run build",
32
- "lint": "pnpm exec eslint src"
32
+ "lint": "biome check src"
33
33
  },
34
34
  "files": [
35
35
  "*.js",
@@ -58,13 +58,10 @@
58
58
  "util": "^0.12.3"
59
59
  },
60
60
  "devDependencies": {
61
- "@types/jest": "^26.0.20",
62
61
  "axios": "^1.11.0",
63
62
  "copy-webpack-plugin": "^7.0.0",
64
- "jest": "^29.6.2",
65
63
  "json-loader": "^0.5.7",
66
64
  "openapicmd": "^2.7.0",
67
- "ts-jest": "^29.4.1",
68
65
  "ts-loader": "^8.0.14",
69
66
  "ts-node": "^10.9.1",
70
67
  "typescript": "^4.1.3",