@emilgroup/notification-sdk 0.8.1-beta.49 → 0.8.1-beta.5

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.
Files changed (101) hide show
  1. package/.openapi-generator/FILES +0 -20
  2. package/README.md +2 -2
  3. package/api/email-messages-api.ts +28 -40
  4. package/api/email-tracking-api.ts +40 -271
  5. package/api/email-verifications-api.ts +8 -16
  6. package/api/layouts-api.ts +36 -56
  7. package/api/notification-templates-api.ts +36 -56
  8. package/api/notifications-api.ts +4 -115
  9. package/api.ts +0 -6
  10. package/base.ts +15 -36
  11. package/configuration.ts +0 -11
  12. package/dist/api/email-messages-api.d.ts +28 -40
  13. package/dist/api/email-messages-api.js +25 -37
  14. package/dist/api/email-tracking-api.d.ts +40 -170
  15. package/dist/api/email-tracking-api.js +34 -233
  16. package/dist/api/email-verifications-api.d.ts +8 -16
  17. package/dist/api/email-verifications-api.js +8 -16
  18. package/dist/api/layouts-api.d.ts +36 -56
  19. package/dist/api/layouts-api.js +32 -52
  20. package/dist/api/notification-templates-api.d.ts +36 -56
  21. package/dist/api/notification-templates-api.js +32 -52
  22. package/dist/api/notifications-api.d.ts +4 -65
  23. package/dist/api/notifications-api.js +4 -101
  24. package/dist/api.d.ts +0 -3
  25. package/dist/api.js +0 -3
  26. package/dist/base.d.ts +0 -1
  27. package/dist/base.js +16 -36
  28. package/dist/configuration.d.ts +0 -9
  29. package/dist/configuration.js +0 -1
  30. package/dist/models/email-message-class.d.ts +7 -73
  31. package/dist/models/email-message-class.js +3 -22
  32. package/dist/models/email-thread-class.d.ts +5 -37
  33. package/dist/models/index.d.ts +0 -17
  34. package/dist/models/index.js +0 -17
  35. package/dist/models/send-notification-request-dto.d.ts +1 -10
  36. package/dist/models/send-notification-request-dto.js +1 -2
  37. package/models/email-message-class.ts +8 -78
  38. package/models/email-thread-class.ts +5 -37
  39. package/models/index.ts +0 -17
  40. package/models/send-notification-request-dto.ts +2 -9
  41. package/package.json +1 -1
  42. package/api/email-mailboxes-api.ts +0 -148
  43. package/api/email-subscriptions-api.ts +0 -559
  44. package/api/msgraph-webhooks-api.ts +0 -278
  45. package/dist/api/email-mailboxes-api.d.ts +0 -87
  46. package/dist/api/email-mailboxes-api.js +0 -218
  47. package/dist/api/email-subscriptions-api.d.ts +0 -319
  48. package/dist/api/email-subscriptions-api.js +0 -537
  49. package/dist/api/msgraph-webhooks-api.d.ts +0 -168
  50. package/dist/api/msgraph-webhooks-api.js +0 -305
  51. package/dist/models/assign-email-thread-entity-body-dto.d.ts +0 -43
  52. package/dist/models/assign-email-thread-entity-body-dto.js +0 -22
  53. package/dist/models/assign-email-thread-entity-response-class.d.ts +0 -25
  54. package/dist/models/assign-email-thread-entity-response-class.js +0 -15
  55. package/dist/models/email-mailbox-class.d.ts +0 -47
  56. package/dist/models/email-mailbox-class.js +0 -20
  57. package/dist/models/email-message-summary-class.d.ts +0 -98
  58. package/dist/models/email-message-summary-class.js +0 -33
  59. package/dist/models/email-subscription-class.d.ts +0 -104
  60. package/dist/models/email-subscription-class.js +0 -23
  61. package/dist/models/entity-ref-class.d.ts +0 -37
  62. package/dist/models/entity-ref-class.js +0 -22
  63. package/dist/models/get-email-subscription-response-class.d.ts +0 -25
  64. package/dist/models/get-email-subscription-response-class.js +0 -15
  65. package/dist/models/grpc-send-email-request-dto.d.ts +0 -137
  66. package/dist/models/grpc-send-email-request-dto.js +0 -22
  67. package/dist/models/inline-attachment-dto.d.ts +0 -36
  68. package/dist/models/inline-attachment-dto.js +0 -15
  69. package/dist/models/list-email-mailboxes-response-class.d.ts +0 -43
  70. package/dist/models/list-email-mailboxes-response-class.js +0 -15
  71. package/dist/models/list-email-subscriptions-response-class.d.ts +0 -43
  72. package/dist/models/list-email-subscriptions-response-class.js +0 -15
  73. package/dist/models/reconcile-email-subscriptions-request-dto.d.ts +0 -24
  74. package/dist/models/reconcile-email-subscriptions-request-dto.js +0 -15
  75. package/dist/models/reconcile-email-subscriptions-response-class.d.ts +0 -48
  76. package/dist/models/reconcile-email-subscriptions-response-class.js +0 -15
  77. package/dist/models/renew-email-subscription-response-class.d.ts +0 -25
  78. package/dist/models/renew-email-subscription-response-class.js +0 -15
  79. package/dist/models/send-email-request-dto.d.ts +0 -131
  80. package/dist/models/send-email-request-dto.js +0 -22
  81. package/dist/models/send-email-response-class.d.ts +0 -24
  82. package/dist/models/send-email-response-class.js +0 -15
  83. package/dist/models/unassign-email-thread-entity-response-class.d.ts +0 -25
  84. package/dist/models/unassign-email-thread-entity-response-class.js +0 -15
  85. package/models/assign-email-thread-entity-body-dto.ts +0 -52
  86. package/models/assign-email-thread-entity-response-class.ts +0 -31
  87. package/models/email-mailbox-class.ts +0 -56
  88. package/models/email-message-summary-class.ts +0 -109
  89. package/models/email-subscription-class.ts +0 -113
  90. package/models/entity-ref-class.ts +0 -46
  91. package/models/get-email-subscription-response-class.ts +0 -31
  92. package/models/grpc-send-email-request-dto.ts +0 -144
  93. package/models/inline-attachment-dto.ts +0 -42
  94. package/models/list-email-mailboxes-response-class.ts +0 -49
  95. package/models/list-email-subscriptions-response-class.ts +0 -49
  96. package/models/reconcile-email-subscriptions-request-dto.ts +0 -30
  97. package/models/reconcile-email-subscriptions-response-class.ts +0 -54
  98. package/models/renew-email-subscription-response-class.ts +0 -31
  99. package/models/send-email-request-dto.ts +0 -138
  100. package/models/send-email-response-class.ts +0 -30
  101. package/models/unassign-email-thread-entity-response-class.ts +0 -31
@@ -12,8 +12,6 @@
12
12
  import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
13
  import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
- import { SendEmailRequestDto } from '../models';
16
- import { SendEmailResponseClass } from '../models';
17
15
  import { SendNotificationRequestDto } from '../models';
18
16
  import { SendNotificationResponseClass } from '../models';
19
17
  /**
@@ -22,17 +20,7 @@ import { SendNotificationResponseClass } from '../models';
22
20
  */
23
21
  export declare const NotificationsApiAxiosParamCreator: (configuration?: Configuration) => {
24
22
  /**
25
- * Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
26
- * @summary Send an email without a template
27
- * @param {SendEmailRequestDto} sendEmailRequestDto
28
- * @param {string} [authorization] Bearer Token
29
- * @param {*} [options] Override http request option.
30
- * @throws {RequiredError}
31
- */
32
- sendEmail: (sendEmailRequestDto: SendEmailRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
33
- /**
34
- * Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
35
- * @summary Send a notification
23
+ * undefined **Required Permissions** none
36
24
  * @param {SendNotificationRequestDto} sendNotificationRequestDto
37
25
  * @param {string} [authorization] Bearer Token
38
26
  * @param {*} [options] Override http request option.
@@ -46,17 +34,7 @@ export declare const NotificationsApiAxiosParamCreator: (configuration?: Configu
46
34
  */
47
35
  export declare const NotificationsApiFp: (configuration?: Configuration) => {
48
36
  /**
49
- * Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
50
- * @summary Send an email without a template
51
- * @param {SendEmailRequestDto} sendEmailRequestDto
52
- * @param {string} [authorization] Bearer Token
53
- * @param {*} [options] Override http request option.
54
- * @throws {RequiredError}
55
- */
56
- sendEmail(sendEmailRequestDto: SendEmailRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SendEmailResponseClass>>;
57
- /**
58
- * Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
59
- * @summary Send a notification
37
+ * undefined **Required Permissions** none
60
38
  * @param {SendNotificationRequestDto} sendNotificationRequestDto
61
39
  * @param {string} [authorization] Bearer Token
62
40
  * @param {*} [options] Override http request option.
@@ -70,17 +48,7 @@ export declare const NotificationsApiFp: (configuration?: Configuration) => {
70
48
  */
71
49
  export declare const NotificationsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
72
50
  /**
73
- * Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
74
- * @summary Send an email without a template
75
- * @param {SendEmailRequestDto} sendEmailRequestDto
76
- * @param {string} [authorization] Bearer Token
77
- * @param {*} [options] Override http request option.
78
- * @throws {RequiredError}
79
- */
80
- sendEmail(sendEmailRequestDto: SendEmailRequestDto, authorization?: string, options?: any): AxiosPromise<SendEmailResponseClass>;
81
- /**
82
- * Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
83
- * @summary Send a notification
51
+ * undefined **Required Permissions** none
84
52
  * @param {SendNotificationRequestDto} sendNotificationRequestDto
85
53
  * @param {string} [authorization] Bearer Token
86
54
  * @param {*} [options] Override http request option.
@@ -88,25 +56,6 @@ export declare const NotificationsApiFactory: (configuration?: Configuration, ba
88
56
  */
89
57
  sendNotification(sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options?: any): AxiosPromise<SendNotificationResponseClass>;
90
58
  };
91
- /**
92
- * Request parameters for sendEmail operation in NotificationsApi.
93
- * @export
94
- * @interface NotificationsApiSendEmailRequest
95
- */
96
- export interface NotificationsApiSendEmailRequest {
97
- /**
98
- *
99
- * @type {SendEmailRequestDto}
100
- * @memberof NotificationsApiSendEmail
101
- */
102
- readonly sendEmailRequestDto: SendEmailRequestDto;
103
- /**
104
- * Bearer Token
105
- * @type {string}
106
- * @memberof NotificationsApiSendEmail
107
- */
108
- readonly authorization?: string;
109
- }
110
59
  /**
111
60
  * Request parameters for sendNotification operation in NotificationsApi.
112
61
  * @export
@@ -134,17 +83,7 @@ export interface NotificationsApiSendNotificationRequest {
134
83
  */
135
84
  export declare class NotificationsApi extends BaseAPI {
136
85
  /**
137
- * Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
138
- * @summary Send an email without a template
139
- * @param {NotificationsApiSendEmailRequest} requestParameters Request parameters.
140
- * @param {*} [options] Override http request option.
141
- * @throws {RequiredError}
142
- * @memberof NotificationsApi
143
- */
144
- sendEmail(requestParameters: NotificationsApiSendEmailRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SendEmailResponseClass, any, {}>>;
145
- /**
146
- * Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
147
- * @summary Send a notification
86
+ * undefined **Required Permissions** none
148
87
  * @param {NotificationsApiSendNotificationRequest} requestParameters Request parameters.
149
88
  * @param {*} [options] Override http request option.
150
89
  * @throws {RequiredError}
@@ -93,57 +93,7 @@ var NotificationsApiAxiosParamCreator = function (configuration) {
93
93
  var _this = this;
94
94
  return {
95
95
  /**
96
- * Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
97
- * @summary Send an email without a template
98
- * @param {SendEmailRequestDto} sendEmailRequestDto
99
- * @param {string} [authorization] Bearer Token
100
- * @param {*} [options] Override http request option.
101
- * @throws {RequiredError}
102
- */
103
- sendEmail: function (sendEmailRequestDto, authorization, options) {
104
- if (options === void 0) { options = {}; }
105
- return __awaiter(_this, void 0, void 0, function () {
106
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
- return __generator(this, function (_a) {
108
- switch (_a.label) {
109
- case 0:
110
- // verify required parameter 'sendEmailRequestDto' is not null or undefined
111
- (0, common_1.assertParamExists)('sendEmail', 'sendEmailRequestDto', sendEmailRequestDto);
112
- localVarPath = "/notificationservice/v1/notifications/emails";
113
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
114
- if (configuration) {
115
- baseOptions = configuration.baseOptions;
116
- baseAccessToken = configuration.accessToken;
117
- }
118
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
119
- localVarHeaderParameter = {};
120
- localVarQueryParameter = {};
121
- // authentication bearer required
122
- // http bearer authentication required
123
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
- case 1:
125
- // authentication bearer required
126
- // http bearer authentication required
127
- _a.sent();
128
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
- }
131
- localVarHeaderParameter['Content-Type'] = 'application/json';
132
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
133
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
135
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(sendEmailRequestDto, localVarRequestOptions, configuration);
136
- return [2 /*return*/, {
137
- url: (0, common_1.toPathString)(localVarUrlObj),
138
- options: localVarRequestOptions,
139
- }];
140
- }
141
- });
142
- });
143
- },
144
- /**
145
- * Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
146
- * @summary Send a notification
96
+ * undefined **Required Permissions** none
147
97
  * @param {SendNotificationRequestDto} sendNotificationRequestDto
148
98
  * @param {string} [authorization] Bearer Token
149
99
  * @param {*} [options] Override http request option.
@@ -201,29 +151,7 @@ var NotificationsApiFp = function (configuration) {
201
151
  var localVarAxiosParamCreator = (0, exports.NotificationsApiAxiosParamCreator)(configuration);
202
152
  return {
203
153
  /**
204
- * Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
205
- * @summary Send an email without a template
206
- * @param {SendEmailRequestDto} sendEmailRequestDto
207
- * @param {string} [authorization] Bearer Token
208
- * @param {*} [options] Override http request option.
209
- * @throws {RequiredError}
210
- */
211
- sendEmail: function (sendEmailRequestDto, authorization, options) {
212
- return __awaiter(this, void 0, void 0, function () {
213
- var localVarAxiosArgs;
214
- return __generator(this, function (_a) {
215
- switch (_a.label) {
216
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.sendEmail(sendEmailRequestDto, authorization, options)];
217
- case 1:
218
- localVarAxiosArgs = _a.sent();
219
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
220
- }
221
- });
222
- });
223
- },
224
- /**
225
- * Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
226
- * @summary Send a notification
154
+ * undefined **Required Permissions** none
227
155
  * @param {SendNotificationRequestDto} sendNotificationRequestDto
228
156
  * @param {string} [authorization] Bearer Token
229
157
  * @param {*} [options] Override http request option.
@@ -253,19 +181,7 @@ var NotificationsApiFactory = function (configuration, basePath, axios) {
253
181
  var localVarFp = (0, exports.NotificationsApiFp)(configuration);
254
182
  return {
255
183
  /**
256
- * Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
257
- * @summary Send an email without a template
258
- * @param {SendEmailRequestDto} sendEmailRequestDto
259
- * @param {string} [authorization] Bearer Token
260
- * @param {*} [options] Override http request option.
261
- * @throws {RequiredError}
262
- */
263
- sendEmail: function (sendEmailRequestDto, authorization, options) {
264
- return localVarFp.sendEmail(sendEmailRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
265
- },
266
- /**
267
- * Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
268
- * @summary Send a notification
184
+ * undefined **Required Permissions** none
269
185
  * @param {SendNotificationRequestDto} sendNotificationRequestDto
270
186
  * @param {string} [authorization] Bearer Token
271
187
  * @param {*} [options] Override http request option.
@@ -289,20 +205,7 @@ var NotificationsApi = /** @class */ (function (_super) {
289
205
  return _super !== null && _super.apply(this, arguments) || this;
290
206
  }
291
207
  /**
292
- * Sends an email with a caller-supplied HTML and/or text body, delivered as given. Attachments can reference documents already in S3 or be sent inline as base64. **Required Permissions** none
293
- * @summary Send an email without a template
294
- * @param {NotificationsApiSendEmailRequest} requestParameters Request parameters.
295
- * @param {*} [options] Override http request option.
296
- * @throws {RequiredError}
297
- * @memberof NotificationsApi
298
- */
299
- NotificationsApi.prototype.sendEmail = function (requestParameters, options) {
300
- var _this = this;
301
- return (0, exports.NotificationsApiFp)(this.configuration).sendEmail(requestParameters.sendEmailRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
302
- };
303
- /**
304
- * Sends an email using the notification template identified by `templateSlug`. Provide `entityType` and `entityCode` to track replies in an email thread. **Required Permissions** none
305
- * @summary Send a notification
208
+ * undefined **Required Permissions** none
306
209
  * @param {NotificationsApiSendNotificationRequest} requestParameters Request parameters.
307
210
  * @param {*} [options] Override http request option.
308
211
  * @throws {RequiredError}
package/dist/api.d.ts CHANGED
@@ -9,13 +9,10 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- export * from './api/email-mailboxes-api';
13
12
  export * from './api/email-messages-api';
14
- export * from './api/email-subscriptions-api';
15
13
  export * from './api/email-tracking-api';
16
14
  export * from './api/email-verifications-api';
17
15
  export * from './api/health-api';
18
16
  export * from './api/layouts-api';
19
- export * from './api/msgraph-webhooks-api';
20
17
  export * from './api/notification-templates-api';
21
18
  export * from './api/notifications-api';
package/dist/api.js CHANGED
@@ -27,13 +27,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
27
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
- __exportStar(require("./api/email-mailboxes-api"), exports);
31
30
  __exportStar(require("./api/email-messages-api"), exports);
32
- __exportStar(require("./api/email-subscriptions-api"), exports);
33
31
  __exportStar(require("./api/email-tracking-api"), exports);
34
32
  __exportStar(require("./api/email-verifications-api"), exports);
35
33
  __exportStar(require("./api/health-api"), exports);
36
34
  __exportStar(require("./api/layouts-api"), exports);
37
- __exportStar(require("./api/msgraph-webhooks-api"), exports);
38
35
  __exportStar(require("./api/notification-templates-api"), exports);
39
36
  __exportStar(require("./api/notifications-api"), exports);
package/dist/base.d.ts CHANGED
@@ -63,7 +63,6 @@ export declare class BaseAPI {
63
63
  protected configuration: Configuration | undefined;
64
64
  private tokenData?;
65
65
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
66
- private useCookieAuth;
67
66
  selectEnvironment(env: Environment): void;
68
67
  selectBasePath(path: string): void;
69
68
  getPermissions(): Array<string>;
package/dist/base.js CHANGED
@@ -128,15 +128,10 @@ var BaseAPI = /** @class */ (function () {
128
128
  var accessToken = this.tokenData.accessToken;
129
129
  this.configuration = configuration;
130
130
  this.basePath = configuration.basePath || this.basePath;
131
- if (configuration.cookieAuth) {
132
- this.useCookieAuth();
133
- }
134
- else {
135
- // Use config token if provided, otherwise use tokenData token
136
- var configToken = this.configuration.accessToken;
137
- var storedToken = accessToken ? "Bearer ".concat(accessToken) : '';
138
- this.configuration.accessToken = configToken || storedToken;
139
- }
131
+ // Use config token if provided, otherwise use tokenData token
132
+ var configToken = this.configuration.accessToken;
133
+ var storedToken = accessToken ? "Bearer ".concat(accessToken) : '';
134
+ this.configuration.accessToken = configToken || storedToken;
140
135
  }
141
136
  else {
142
137
  var _a = this.tokenData, accessToken = _a.accessToken, username = _a.username;
@@ -148,11 +143,6 @@ var BaseAPI = /** @class */ (function () {
148
143
  }
149
144
  this.attachInterceptor(axios);
150
145
  }
151
- // Cookie mode: the browser sends the HttpOnly access cookie, so no token is read from storage.
152
- BaseAPI.prototype.useCookieAuth = function () {
153
- this.configuration.username = this.configuration.username || this.tokenData.username;
154
- this.configuration.baseOptions = __assign(__assign({}, this.configuration.baseOptions), { withCredentials: true });
155
- };
156
146
  BaseAPI.prototype.selectEnvironment = function (env) {
157
147
  this.selectBasePath(env);
158
148
  };
@@ -187,12 +177,10 @@ var BaseAPI = /** @class */ (function () {
187
177
  response = _b.sent();
188
178
  _a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
189
179
  this.configuration.username = username;
180
+ this.configuration.accessToken = "Bearer ".concat(accessToken);
190
181
  this.tokenData.username = username;
182
+ this.tokenData.accessToken = accessToken;
191
183
  this.tokenData.permissions = permissions;
192
- if (!this.configuration.cookieAuth) {
193
- this.configuration.accessToken = "Bearer ".concat(accessToken);
194
- this.tokenData.accessToken = accessToken;
195
- }
196
184
  if (!targetWorkspace) return [3 /*break*/, 3];
197
185
  return [4 /*yield*/, this.switchWorkspace(targetWorkspace)];
198
186
  case 2:
@@ -218,7 +206,10 @@ var BaseAPI = /** @class */ (function () {
218
206
  options = {
219
207
  method: 'POST',
220
208
  url: "".concat(this.configuration.basePath, "/authservice/v1/workspaces/switch"),
221
- headers: __assign({ 'Content-Type': 'application/json' }, (this.configuration.cookieAuth ? {} : { 'Authorization': "Bearer ".concat(this.configuration.accessToken) })),
209
+ headers: {
210
+ 'Content-Type': 'application/json',
211
+ 'Authorization': "Bearer ".concat(this.configuration.accessToken),
212
+ },
222
213
  data: {
223
214
  username: this.configuration.username,
224
215
  targetWorkspace: targetWorkspace,
@@ -229,11 +220,9 @@ var BaseAPI = /** @class */ (function () {
229
220
  case 1:
230
221
  response = _b.sent();
231
222
  _a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
223
+ this.configuration.accessToken = "Bearer ".concat(accessToken);
224
+ this.tokenData.accessToken = accessToken;
232
225
  this.tokenData.permissions = permissions;
233
- if (!this.configuration.cookieAuth) {
234
- this.configuration.accessToken = "Bearer ".concat(accessToken);
235
- this.tokenData.accessToken = accessToken;
236
- }
237
226
  this.storeTokenData(__assign({}, this.tokenData));
238
227
  return [2 /*return*/];
239
228
  }
@@ -276,13 +265,7 @@ var BaseAPI = /** @class */ (function () {
276
265
  });
277
266
  };
278
267
  BaseAPI.prototype.storeTokenData = function (tokenData) {
279
- var _a;
280
268
  if (typeof window !== 'undefined') {
281
- if (tokenData && ((_a = this.configuration) === null || _a === void 0 ? void 0 : _a.cookieAuth)) {
282
- // Cookie mode saves who is logged in, never the token; a token saved by apps not yet migrated stays.
283
- var username = tokenData.username, permissions = tokenData.permissions;
284
- tokenData = __assign(__assign({}, ((0, common_1.defaultStorage)().get(TOKEN_DATA) || {})), { username: username, permissions: permissions });
285
- }
286
269
  (0, common_1.defaultStorage)().set(TOKEN_DATA, tokenData);
287
270
  }
288
271
  };
@@ -317,15 +300,12 @@ var BaseAPI = /** @class */ (function () {
317
300
  return [4 /*yield*/, this.refreshTokenInternal()];
318
301
  case 2:
319
302
  _a = _c.sent(), tokenString = _a.accessToken, permissions = _a.permissions;
303
+ accessToken = "Bearer ".concat(tokenString);
320
304
  this.tokenData.permissions = permissions;
321
305
  delete originalConfig.headers['Authorization'];
322
- // In cookie mode the refresh reply renewed the access cookie, so retry without a header.
323
- if (!this.configuration.cookieAuth) {
324
- accessToken = "Bearer ".concat(tokenString);
325
- originalConfig.headers['Authorization'] = accessToken;
326
- this.configuration.accessToken = accessToken;
327
- this.tokenData.accessToken = tokenString;
328
- }
306
+ originalConfig.headers['Authorization'] = accessToken;
307
+ this.configuration.accessToken = accessToken;
308
+ this.tokenData.accessToken = tokenString;
329
309
  this.storeTokenData(this.tokenData);
330
310
  return [2 /*return*/, axios(originalConfig)];
331
311
  case 3:
@@ -17,7 +17,6 @@ export interface ConfigurationParameters {
17
17
  basePath?: string;
18
18
  baseOptions?: any;
19
19
  formDataCtor?: new () => any;
20
- cookieAuth?: boolean;
21
20
  }
22
21
  export declare class Configuration {
23
22
  /**
@@ -69,14 +68,6 @@ export declare class Configuration {
69
68
  * @type {new () => FormData}
70
69
  */
71
70
  formDataCtor?: new () => any;
72
- /**
73
- * Authenticate with the HttpOnly access cookie instead of a stored token: every call sends credentials.
74
- * The browser holds one cookie, so use it with one logged-in account; log out through the auth service.
75
- *
76
- * @type {boolean}
77
- * @memberof Configuration
78
- */
79
- cookieAuth?: boolean;
80
71
  constructor(param?: ConfigurationParameters);
81
72
  /**
82
73
  * Check if the given MIME is a JSON MIME.
@@ -24,7 +24,6 @@ var Configuration = /** @class */ (function () {
24
24
  this.basePath = param.basePath;
25
25
  this.baseOptions = param.baseOptions;
26
26
  this.formDataCtor = param.formDataCtor;
27
- this.cookieAuth = param.cookieAuth;
28
27
  }
29
28
  /**
30
29
  * Check if the given MIME is a JSON MIME.
@@ -10,7 +10,6 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { EmailAttachmentClass } from './email-attachment-class';
13
- import { EntityRefClass } from './entity-ref-class';
14
13
  /**
15
14
  *
16
15
  * @export
@@ -30,41 +29,11 @@ export interface EmailMessageClass {
30
29
  */
31
30
  'code': string;
32
31
  /**
33
- * Thread code this message belongs to. Empty only while an inbound message is still being correlated.
32
+ * Thread code this message belongs to
34
33
  * @type {string}
35
34
  * @memberof EmailMessageClass
36
35
  */
37
36
  'threadCode': string;
38
- /**
39
- * Correlation state of an inbound message: pending, matched (thread and entity known) or unassigned (thread known, no entity yet)
40
- * @type {string}
41
- * @memberof EmailMessageClass
42
- */
43
- 'matchStatus': EmailMessageClassMatchStatusEnum;
44
- /**
45
- * What this row is: a message somebody wrote, or a delivery report (bounce) a mail server sent back about an outbound message
46
- * @type {string}
47
- * @memberof EmailMessageClass
48
- */
49
- 'kind': EmailMessageClassKindEnum;
50
- /**
51
- * Delivery report only: code of the outbound message the report is about
52
- * @type {string}
53
- * @memberof EmailMessageClass
54
- */
55
- 'reportedMessageCode'?: string;
56
- /**
57
- * Provider the message was sent or received through
58
- * @type {string}
59
- * @memberof EmailMessageClass
60
- */
61
- 'provider'?: EmailMessageClassProviderEnum;
62
- /**
63
- * Mailbox the message belongs to: the Microsoft 365 mailbox it was sent from or arrived in, or the sender address for SES. Empty for an inbound email that matched nothing yet.
64
- * @type {string}
65
- * @memberof EmailMessageClass
66
- */
67
- 'mailbox'?: string;
68
37
  /**
69
38
  * Direction of the email
70
39
  * @type {string}
@@ -108,7 +77,7 @@ export interface EmailMessageClass {
108
77
  */
109
78
  'bodyHtml'?: string;
110
79
  /**
111
- * Delivery status of the email. Outbound emails move through pending → sent, then bounced if a bounce arrives; failed marks a system-level send failure; inbound emails are always received.
80
+ * Delivery status of the email
112
81
  * @type {string}
113
82
  * @memberof EmailMessageClass
114
83
  */
@@ -162,46 +131,18 @@ export interface EmailMessageClass {
162
131
  */
163
132
  'attachments': Array<EmailAttachmentClass>;
164
133
  /**
165
- * Inbound only: how many attachments the email arrived with, images embedded in the body not counted. At most 10 attachments and 35 MB in total are kept, in order, stopping at the first that does not fit; when this is higher than the length of `attachments`, the rest are only in the original email.
166
- * @type {number}
167
- * @memberof EmailMessageClass
168
- */
169
- 'attachmentCount'?: number;
170
- /**
171
- * The entity the message\'s thread is linked to. Not set while the message is unassigned.
172
- * @type {EntityRefClass}
173
- * @memberof EmailMessageClass
174
- */
175
- 'entityRef'?: EntityRefClass;
176
- /**
177
- * Business number of the linked entity (policy, lead, claim or partner number)
134
+ * Entity type this message is associated with
178
135
  * @type {string}
179
136
  * @memberof EmailMessageClass
180
137
  */
181
- 'entityNumber'?: string;
138
+ 'entityType': string;
182
139
  /**
183
- * Latest workflow status of the email: the status of whichever workflow it triggered changed most recently. Counts EMAIL_RECEIVED workflows for an incoming email and EMAIL_BOUNCED workflows for an outgoing one. Not set when the email triggered no workflow.
140
+ * Entity code this message is associated with
184
141
  * @type {string}
185
142
  * @memberof EmailMessageClass
186
143
  */
187
- 'workflowStatus'?: EmailMessageClassWorkflowStatusEnum;
144
+ 'entityCode': string;
188
145
  }
189
- export declare const EmailMessageClassMatchStatusEnum: {
190
- readonly Pending: "pending";
191
- readonly Matched: "matched";
192
- readonly Unassigned: "unassigned";
193
- };
194
- export type EmailMessageClassMatchStatusEnum = typeof EmailMessageClassMatchStatusEnum[keyof typeof EmailMessageClassMatchStatusEnum];
195
- export declare const EmailMessageClassKindEnum: {
196
- readonly Message: "message";
197
- readonly DeliveryReport: "delivery_report";
198
- };
199
- export type EmailMessageClassKindEnum = typeof EmailMessageClassKindEnum[keyof typeof EmailMessageClassKindEnum];
200
- export declare const EmailMessageClassProviderEnum: {
201
- readonly Ses: "ses";
202
- readonly Msgraph: "msgraph";
203
- };
204
- export type EmailMessageClassProviderEnum = typeof EmailMessageClassProviderEnum[keyof typeof EmailMessageClassProviderEnum];
205
146
  export declare const EmailMessageClassDirectionEnum: {
206
147
  readonly Outbound: "outbound";
207
148
  readonly Inbound: "inbound";
@@ -210,15 +151,8 @@ export type EmailMessageClassDirectionEnum = typeof EmailMessageClassDirectionEn
210
151
  export declare const EmailMessageClassDeliveryStatusEnum: {
211
152
  readonly Pending: "pending";
212
153
  readonly Sent: "sent";
154
+ readonly Delivered: "delivered";
213
155
  readonly Bounced: "bounced";
214
156
  readonly Failed: "failed";
215
- readonly Received: "received";
216
157
  };
217
158
  export type EmailMessageClassDeliveryStatusEnum = typeof EmailMessageClassDeliveryStatusEnum[keyof typeof EmailMessageClassDeliveryStatusEnum];
218
- export declare const EmailMessageClassWorkflowStatusEnum: {
219
- readonly InProgress: "in_progress";
220
- readonly Done: "done";
221
- readonly Failed: "failed";
222
- readonly Cancelled: "cancelled";
223
- };
224
- export type EmailMessageClassWorkflowStatusEnum = typeof EmailMessageClassWorkflowStatusEnum[keyof typeof EmailMessageClassWorkflowStatusEnum];
@@ -13,20 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.EmailMessageClassWorkflowStatusEnum = exports.EmailMessageClassDeliveryStatusEnum = exports.EmailMessageClassDirectionEnum = exports.EmailMessageClassProviderEnum = exports.EmailMessageClassKindEnum = exports.EmailMessageClassMatchStatusEnum = void 0;
17
- exports.EmailMessageClassMatchStatusEnum = {
18
- Pending: 'pending',
19
- Matched: 'matched',
20
- Unassigned: 'unassigned'
21
- };
22
- exports.EmailMessageClassKindEnum = {
23
- Message: 'message',
24
- DeliveryReport: 'delivery_report'
25
- };
26
- exports.EmailMessageClassProviderEnum = {
27
- Ses: 'ses',
28
- Msgraph: 'msgraph'
29
- };
16
+ exports.EmailMessageClassDeliveryStatusEnum = exports.EmailMessageClassDirectionEnum = void 0;
30
17
  exports.EmailMessageClassDirectionEnum = {
31
18
  Outbound: 'outbound',
32
19
  Inbound: 'inbound'
@@ -34,13 +21,7 @@ exports.EmailMessageClassDirectionEnum = {
34
21
  exports.EmailMessageClassDeliveryStatusEnum = {
35
22
  Pending: 'pending',
36
23
  Sent: 'sent',
24
+ Delivered: 'delivered',
37
25
  Bounced: 'bounced',
38
- Failed: 'failed',
39
- Received: 'received'
40
- };
41
- exports.EmailMessageClassWorkflowStatusEnum = {
42
- InProgress: 'in_progress',
43
- Done: 'done',
44
- Failed: 'failed',
45
- Cancelled: 'cancelled'
26
+ Failed: 'failed'
46
27
  };
@@ -9,8 +9,6 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { EmailMessageSummaryClass } from './email-message-summary-class';
13
- import { EntityRefClass } from './entity-ref-class';
14
12
  /**
15
13
  *
16
14
  * @export
@@ -30,17 +28,17 @@ export interface EmailThreadClass {
30
28
  */
31
29
  'code': string;
32
30
  /**
33
- * The entity the thread, and every message in it, is linked to. Not set while the thread is unassigned.
34
- * @type {EntityRefClass}
31
+ * Entity type associated with this thread
32
+ * @type {string}
35
33
  * @memberof EmailThreadClass
36
34
  */
37
- 'entityRef'?: EntityRefClass;
35
+ 'entityType': string;
38
36
  /**
39
- * Number of the entity the thread is linked to
37
+ * Entity code associated with this thread
40
38
  * @type {string}
41
39
  * @memberof EmailThreadClass
42
40
  */
43
- 'entityNumber'?: string;
41
+ 'entityCode': string;
44
42
  /**
45
43
  * Email subject of the thread
46
44
  * @type {string}
@@ -53,12 +51,6 @@ export interface EmailThreadClass {
53
51
  * @memberof EmailThreadClass
54
52
  */
55
53
  'status': EmailThreadClassStatusEnum;
56
- /**
57
- * Mailbox the thread belongs to: the Microsoft 365 mailbox the conversation lives in, or the sender address for SES. Empty for a thread opened by an inbound email that matched nothing.
58
- * @type {string}
59
- * @memberof EmailThreadClass
60
- */
61
- 'mailbox'?: string;
62
54
  /**
63
55
  * User who created this thread
64
56
  * @type {string}
@@ -83,30 +75,6 @@ export interface EmailThreadClass {
83
75
  * @memberof EmailThreadClass
84
76
  */
85
77
  'updatedAt': string;
86
- /**
87
- * Number of messages in the thread. Delivery reports (bounces) are not counted.
88
- * @type {number}
89
- * @memberof EmailThreadClass
90
- */
91
- 'messageCount': number;
92
- /**
93
- * When the newest message of the thread was received, or sent for an outbound message
94
- * @type {string}
95
- * @memberof EmailThreadClass
96
- */
97
- 'lastMessageAt'?: string;
98
- /**
99
- * Newest message of the thread, the one a thread row in a list shows. Set when listing threads.
100
- * @type {EmailMessageSummaryClass}
101
- * @memberof EmailThreadClass
102
- */
103
- 'latestMessage'?: EmailMessageSummaryClass;
104
- /**
105
- * Every message of the thread, newest first. Only filled when listing with expand=messages; bodies are fetched per message.
106
- * @type {Array<EmailMessageSummaryClass>}
107
- * @memberof EmailThreadClass
108
- */
109
- 'messages': Array<EmailMessageSummaryClass>;
110
78
  }
111
79
  export declare const EmailThreadClassStatusEnum: {
112
80
  readonly Open: "open";