@emilgroup/notification-sdk-node 1.4.1-beta.0 → 1.4.1-beta.14

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 (52) hide show
  1. package/.openapi-generator/FILES +11 -0
  2. package/README.md +2 -2
  3. package/api/email-messages-api.ts +372 -0
  4. package/api/email-tracking-api.ts +541 -0
  5. package/api.ts +4 -0
  6. package/base.ts +0 -1
  7. package/dist/api/default-api.d.ts +1 -1
  8. package/dist/api/email-messages-api.d.ts +205 -0
  9. package/dist/api/email-messages-api.js +405 -0
  10. package/dist/api/email-tracking-api.d.ts +301 -0
  11. package/dist/api/email-tracking-api.js +524 -0
  12. package/dist/api/email-verifications-api.d.ts +2 -2
  13. package/dist/api/layouts-api.d.ts +5 -5
  14. package/dist/api/notification-templates-api.d.ts +5 -5
  15. package/dist/api/notifications-api.d.ts +1 -1
  16. package/dist/api.d.ts +2 -0
  17. package/dist/api.js +2 -0
  18. package/dist/common.d.ts +1 -1
  19. package/dist/models/download-attachment-response-class.d.ts +36 -0
  20. package/dist/models/download-attachment-response-class.js +15 -0
  21. package/dist/models/email-attachment-class.d.ts +84 -0
  22. package/dist/models/email-attachment-class.js +15 -0
  23. package/dist/models/email-message-class.d.ts +140 -0
  24. package/dist/models/email-message-class.js +27 -0
  25. package/dist/models/email-thread-class.d.ts +83 -0
  26. package/dist/models/email-thread-class.js +20 -0
  27. package/dist/models/get-email-message-response-class.d.ts +25 -0
  28. package/dist/models/get-email-message-response-class.js +15 -0
  29. package/dist/models/get-email-thread-response-class.d.ts +25 -0
  30. package/dist/models/get-email-thread-response-class.js +15 -0
  31. package/dist/models/index.d.ts +9 -0
  32. package/dist/models/index.js +9 -0
  33. package/dist/models/list-email-attachments-response-class.d.ts +25 -0
  34. package/dist/models/list-email-attachments-response-class.js +15 -0
  35. package/dist/models/list-email-messages-response-class.d.ts +43 -0
  36. package/dist/models/list-email-messages-response-class.js +15 -0
  37. package/dist/models/list-email-threads-response-class.d.ts +43 -0
  38. package/dist/models/list-email-threads-response-class.js +15 -0
  39. package/dist/models/send-notification-request-dto.d.ts +44 -2
  40. package/dist/models/send-notification-request-dto.js +6 -0
  41. package/models/download-attachment-response-class.ts +42 -0
  42. package/models/email-attachment-class.ts +90 -0
  43. package/models/email-message-class.ts +150 -0
  44. package/models/email-thread-class.ts +92 -0
  45. package/models/get-email-message-response-class.ts +31 -0
  46. package/models/get-email-thread-response-class.ts +31 -0
  47. package/models/index.ts +9 -0
  48. package/models/list-email-attachments-response-class.ts +31 -0
  49. package/models/list-email-messages-response-class.ts +49 -0
  50. package/models/list-email-threads-response-class.ts +49 -0
  51. package/models/send-notification-request-dto.ts +47 -2
  52. package/package.json +3 -3
@@ -4,6 +4,8 @@
4
4
  README.md
5
5
  api.ts
6
6
  api/default-api.ts
7
+ api/email-messages-api.ts
8
+ api/email-tracking-api.ts
7
9
  api/email-verifications-api.ts
8
10
  api/layouts-api.ts
9
11
  api/notification-templates-api.ts
@@ -21,6 +23,12 @@ models/create-notification-template-request-dto.ts
21
23
  models/create-notification-template-response-class.ts
22
24
  models/delete-layout-request-dto.ts
23
25
  models/delete-notification-template-request-dto.ts
26
+ models/download-attachment-response-class.ts
27
+ models/email-attachment-class.ts
28
+ models/email-message-class.ts
29
+ models/email-thread-class.ts
30
+ models/get-email-message-response-class.ts
31
+ models/get-email-thread-response-class.ts
24
32
  models/get-layout-request-dto.ts
25
33
  models/get-layout-response-class.ts
26
34
  models/get-notification-template-request-dto.ts
@@ -32,6 +40,9 @@ models/initiate-email-verification-response-class.ts
32
40
  models/inline-response200.ts
33
41
  models/inline-response503.ts
34
42
  models/layout-class.ts
43
+ models/list-email-attachments-response-class.ts
44
+ models/list-email-messages-response-class.ts
45
+ models/list-email-threads-response-class.ts
35
46
  models/list-layouts-response-class.ts
36
47
  models/list-notification-templates-response-class.ts
37
48
  models/notification-template-class.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/notification-sdk-node@1.4.1-beta.0 --save
20
+ npm install @emilgroup/notification-sdk-node@1.4.1-beta.14 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/notification-sdk-node@1.4.1-beta.0
24
+ yarn add @emilgroup/notification-sdk-node@1.4.1-beta.14
25
25
  ```
26
26
 
27
27
  And then you can import `LayoutApi`.
@@ -0,0 +1,372 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL NotificationService
5
+ * The EMIL NotificationService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { DownloadAttachmentResponseClass } from '../models';
25
+ // @ts-ignore
26
+ import { GetEmailMessageResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { ListEmailAttachmentsResponseClass } from '../models';
29
+ // URLSearchParams not necessarily used
30
+ // @ts-ignore
31
+ import { URL, URLSearchParams } from 'url';
32
+ const FormData = require('form-data');
33
+ /**
34
+ * EmailMessagesApi - axios parameter creator
35
+ * @export
36
+ */
37
+ export const EmailMessagesApiAxiosParamCreator = function (configuration?: Configuration) {
38
+ return {
39
+ /**
40
+ * undefined **Required Permissions** none
41
+ * @param {string} code
42
+ * @param {number} attachmentId
43
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
44
+ * @param {*} [options] Override http request option.
45
+ * @throws {RequiredError}
46
+ */
47
+ downloadAttachment: async (code: string, attachmentId: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
48
+ // verify required parameter 'code' is not null or undefined
49
+ assertParamExists('downloadAttachment', 'code', code)
50
+ // verify required parameter 'attachmentId' is not null or undefined
51
+ assertParamExists('downloadAttachment', 'attachmentId', attachmentId)
52
+ const localVarPath = `/notificationservice/v1/email-messages/{code}/attachments/{attachmentId}/download`
53
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)))
54
+ .replace(`{${"attachmentId"}}`, encodeURIComponent(String(attachmentId)));
55
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
56
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
57
+ let baseOptions;
58
+ let baseAccessToken;
59
+ if (configuration) {
60
+ baseOptions = configuration.baseOptions;
61
+ baseAccessToken = configuration.accessToken;
62
+ }
63
+
64
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
65
+ const localVarHeaderParameter = {} as any;
66
+ const localVarQueryParameter = {} as any;
67
+
68
+ // authentication bearer required
69
+ // http bearer authentication required
70
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
71
+
72
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
73
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
74
+ }
75
+
76
+
77
+
78
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
79
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
80
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
81
+
82
+ return {
83
+ url: toPathString(localVarUrlObj),
84
+ options: localVarRequestOptions,
85
+ };
86
+ },
87
+ /**
88
+ * undefined **Required Permissions** none
89
+ * @param {string} code
90
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
91
+ * @param {*} [options] Override http request option.
92
+ * @throws {RequiredError}
93
+ */
94
+ getMessage: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
95
+ // verify required parameter 'code' is not null or undefined
96
+ assertParamExists('getMessage', 'code', code)
97
+ const localVarPath = `/notificationservice/v1/email-messages/{code}`
98
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
99
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
100
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
101
+ let baseOptions;
102
+ let baseAccessToken;
103
+ if (configuration) {
104
+ baseOptions = configuration.baseOptions;
105
+ baseAccessToken = configuration.accessToken;
106
+ }
107
+
108
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
109
+ const localVarHeaderParameter = {} as any;
110
+ const localVarQueryParameter = {} as any;
111
+
112
+ // authentication bearer required
113
+ // http bearer authentication required
114
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
115
+
116
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
117
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
118
+ }
119
+
120
+
121
+
122
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
123
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
124
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
125
+
126
+ return {
127
+ url: toPathString(localVarUrlObj),
128
+ options: localVarRequestOptions,
129
+ };
130
+ },
131
+ /**
132
+ * undefined **Required Permissions** none
133
+ * @param {string} code
134
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
135
+ * @param {*} [options] Override http request option.
136
+ * @throws {RequiredError}
137
+ */
138
+ listAttachments: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
139
+ // verify required parameter 'code' is not null or undefined
140
+ assertParamExists('listAttachments', 'code', code)
141
+ const localVarPath = `/notificationservice/v1/email-messages/{code}/attachments`
142
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
143
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
144
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
145
+ let baseOptions;
146
+ let baseAccessToken;
147
+ if (configuration) {
148
+ baseOptions = configuration.baseOptions;
149
+ baseAccessToken = configuration.accessToken;
150
+ }
151
+
152
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
153
+ const localVarHeaderParameter = {} as any;
154
+ const localVarQueryParameter = {} as any;
155
+
156
+ // authentication bearer required
157
+ // http bearer authentication required
158
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
159
+
160
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
161
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
162
+ }
163
+
164
+
165
+
166
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
167
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
168
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
169
+
170
+ return {
171
+ url: toPathString(localVarUrlObj),
172
+ options: localVarRequestOptions,
173
+ };
174
+ },
175
+ }
176
+ };
177
+
178
+ /**
179
+ * EmailMessagesApi - functional programming interface
180
+ * @export
181
+ */
182
+ export const EmailMessagesApiFp = function(configuration?: Configuration) {
183
+ const localVarAxiosParamCreator = EmailMessagesApiAxiosParamCreator(configuration)
184
+ return {
185
+ /**
186
+ * undefined **Required Permissions** none
187
+ * @param {string} code
188
+ * @param {number} attachmentId
189
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
190
+ * @param {*} [options] Override http request option.
191
+ * @throws {RequiredError}
192
+ */
193
+ async downloadAttachment(code: string, attachmentId: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DownloadAttachmentResponseClass>> {
194
+ const localVarAxiosArgs = await localVarAxiosParamCreator.downloadAttachment(code, attachmentId, authorization, options);
195
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
196
+ },
197
+ /**
198
+ * undefined **Required Permissions** none
199
+ * @param {string} code
200
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
201
+ * @param {*} [options] Override http request option.
202
+ * @throws {RequiredError}
203
+ */
204
+ async getMessage(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetEmailMessageResponseClass>> {
205
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getMessage(code, authorization, options);
206
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
207
+ },
208
+ /**
209
+ * undefined **Required Permissions** none
210
+ * @param {string} code
211
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
212
+ * @param {*} [options] Override http request option.
213
+ * @throws {RequiredError}
214
+ */
215
+ async listAttachments(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEmailAttachmentsResponseClass>> {
216
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listAttachments(code, authorization, options);
217
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
218
+ },
219
+ }
220
+ };
221
+
222
+ /**
223
+ * EmailMessagesApi - factory interface
224
+ * @export
225
+ */
226
+ export const EmailMessagesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
227
+ const localVarFp = EmailMessagesApiFp(configuration)
228
+ return {
229
+ /**
230
+ * undefined **Required Permissions** none
231
+ * @param {string} code
232
+ * @param {number} attachmentId
233
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
234
+ * @param {*} [options] Override http request option.
235
+ * @throws {RequiredError}
236
+ */
237
+ downloadAttachment(code: string, attachmentId: number, authorization?: string, options?: any): AxiosPromise<DownloadAttachmentResponseClass> {
238
+ return localVarFp.downloadAttachment(code, attachmentId, authorization, options).then((request) => request(axios, basePath));
239
+ },
240
+ /**
241
+ * undefined **Required Permissions** none
242
+ * @param {string} code
243
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
244
+ * @param {*} [options] Override http request option.
245
+ * @throws {RequiredError}
246
+ */
247
+ getMessage(code: string, authorization?: string, options?: any): AxiosPromise<GetEmailMessageResponseClass> {
248
+ return localVarFp.getMessage(code, authorization, options).then((request) => request(axios, basePath));
249
+ },
250
+ /**
251
+ * undefined **Required Permissions** none
252
+ * @param {string} code
253
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
254
+ * @param {*} [options] Override http request option.
255
+ * @throws {RequiredError}
256
+ */
257
+ listAttachments(code: string, authorization?: string, options?: any): AxiosPromise<ListEmailAttachmentsResponseClass> {
258
+ return localVarFp.listAttachments(code, authorization, options).then((request) => request(axios, basePath));
259
+ },
260
+ };
261
+ };
262
+
263
+ /**
264
+ * Request parameters for downloadAttachment operation in EmailMessagesApi.
265
+ * @export
266
+ * @interface EmailMessagesApiDownloadAttachmentRequest
267
+ */
268
+ export interface EmailMessagesApiDownloadAttachmentRequest {
269
+ /**
270
+ *
271
+ * @type {string}
272
+ * @memberof EmailMessagesApiDownloadAttachment
273
+ */
274
+ readonly code: string
275
+
276
+ /**
277
+ *
278
+ * @type {number}
279
+ * @memberof EmailMessagesApiDownloadAttachment
280
+ */
281
+ readonly attachmentId: number
282
+
283
+ /**
284
+ * Bearer Token: provided by the login endpoint under the name accessToken.
285
+ * @type {string}
286
+ * @memberof EmailMessagesApiDownloadAttachment
287
+ */
288
+ readonly authorization?: string
289
+ }
290
+
291
+ /**
292
+ * Request parameters for getMessage operation in EmailMessagesApi.
293
+ * @export
294
+ * @interface EmailMessagesApiGetMessageRequest
295
+ */
296
+ export interface EmailMessagesApiGetMessageRequest {
297
+ /**
298
+ *
299
+ * @type {string}
300
+ * @memberof EmailMessagesApiGetMessage
301
+ */
302
+ readonly code: string
303
+
304
+ /**
305
+ * Bearer Token: provided by the login endpoint under the name accessToken.
306
+ * @type {string}
307
+ * @memberof EmailMessagesApiGetMessage
308
+ */
309
+ readonly authorization?: string
310
+ }
311
+
312
+ /**
313
+ * Request parameters for listAttachments operation in EmailMessagesApi.
314
+ * @export
315
+ * @interface EmailMessagesApiListAttachmentsRequest
316
+ */
317
+ export interface EmailMessagesApiListAttachmentsRequest {
318
+ /**
319
+ *
320
+ * @type {string}
321
+ * @memberof EmailMessagesApiListAttachments
322
+ */
323
+ readonly code: string
324
+
325
+ /**
326
+ * Bearer Token: provided by the login endpoint under the name accessToken.
327
+ * @type {string}
328
+ * @memberof EmailMessagesApiListAttachments
329
+ */
330
+ readonly authorization?: string
331
+ }
332
+
333
+ /**
334
+ * EmailMessagesApi - object-oriented interface
335
+ * @export
336
+ * @class EmailMessagesApi
337
+ * @extends {BaseAPI}
338
+ */
339
+ export class EmailMessagesApi extends BaseAPI {
340
+ /**
341
+ * undefined **Required Permissions** none
342
+ * @param {EmailMessagesApiDownloadAttachmentRequest} requestParameters Request parameters.
343
+ * @param {*} [options] Override http request option.
344
+ * @throws {RequiredError}
345
+ * @memberof EmailMessagesApi
346
+ */
347
+ public downloadAttachment(requestParameters: EmailMessagesApiDownloadAttachmentRequest, options?: AxiosRequestConfig) {
348
+ return EmailMessagesApiFp(this.configuration).downloadAttachment(requestParameters.code, requestParameters.attachmentId, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
349
+ }
350
+
351
+ /**
352
+ * undefined **Required Permissions** none
353
+ * @param {EmailMessagesApiGetMessageRequest} requestParameters Request parameters.
354
+ * @param {*} [options] Override http request option.
355
+ * @throws {RequiredError}
356
+ * @memberof EmailMessagesApi
357
+ */
358
+ public getMessage(requestParameters: EmailMessagesApiGetMessageRequest, options?: AxiosRequestConfig) {
359
+ return EmailMessagesApiFp(this.configuration).getMessage(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
360
+ }
361
+
362
+ /**
363
+ * undefined **Required Permissions** none
364
+ * @param {EmailMessagesApiListAttachmentsRequest} requestParameters Request parameters.
365
+ * @param {*} [options] Override http request option.
366
+ * @throws {RequiredError}
367
+ * @memberof EmailMessagesApi
368
+ */
369
+ public listAttachments(requestParameters: EmailMessagesApiListAttachmentsRequest, options?: AxiosRequestConfig) {
370
+ return EmailMessagesApiFp(this.configuration).listAttachments(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
371
+ }
372
+ }