@emilgroup/notification-sdk 0.1.1-beta.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.
Files changed (160) hide show
  1. package/.openapi-generator/FILES +58 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +51 -0
  5. package/api/default-api.ts +124 -0
  6. package/api/email-messages-api.ts +368 -0
  7. package/api/email-tracking-api.ts +537 -0
  8. package/api/email-verifications-api.ts +264 -0
  9. package/api/layouts-api.ts +673 -0
  10. package/api/notification-templates-api.ts +687 -0
  11. package/api/notifications-api.ts +161 -0
  12. package/api.ts +39 -0
  13. package/base.ts +331 -0
  14. package/common.ts +198 -0
  15. package/configuration.ts +110 -0
  16. package/dist/api/default-api.d.ts +70 -0
  17. package/dist/api/default-api.js +200 -0
  18. package/dist/api/email-messages-api.d.ts +205 -0
  19. package/dist/api/email-messages-api.js +401 -0
  20. package/dist/api/email-tracking-api.d.ts +301 -0
  21. package/dist/api/email-tracking-api.js +520 -0
  22. package/dist/api/email-verifications-api.d.ts +146 -0
  23. package/dist/api/email-verifications-api.js +309 -0
  24. package/dist/api/layouts-api.d.ts +373 -0
  25. package/dist/api/layouts-api.js +624 -0
  26. package/dist/api/notification-templates-api.d.ts +382 -0
  27. package/dist/api/notification-templates-api.js +630 -0
  28. package/dist/api/notifications-api.d.ts +93 -0
  29. package/dist/api/notifications-api.js +220 -0
  30. package/dist/api.d.ts +18 -0
  31. package/dist/api.js +36 -0
  32. package/dist/base.d.ts +86 -0
  33. package/dist/base.js +367 -0
  34. package/dist/common.d.ts +91 -0
  35. package/dist/common.js +276 -0
  36. package/dist/configuration.d.ts +89 -0
  37. package/dist/configuration.js +52 -0
  38. package/dist/index.d.ts +15 -0
  39. package/dist/index.js +36 -0
  40. package/dist/models/complete-email-verification-dto.d.ts +30 -0
  41. package/dist/models/complete-email-verification-dto.js +15 -0
  42. package/dist/models/complete-email-verification-response-class.d.ts +24 -0
  43. package/dist/models/complete-email-verification-response-class.js +15 -0
  44. package/dist/models/create-layout-request-dto.d.ts +48 -0
  45. package/dist/models/create-layout-request-dto.js +15 -0
  46. package/dist/models/create-layout-response-class.d.ts +25 -0
  47. package/dist/models/create-layout-response-class.js +15 -0
  48. package/dist/models/create-notification-template-request-dto.d.ts +66 -0
  49. package/dist/models/create-notification-template-request-dto.js +15 -0
  50. package/dist/models/create-notification-template-response-class.d.ts +25 -0
  51. package/dist/models/create-notification-template-response-class.js +15 -0
  52. package/dist/models/delete-layout-request-dto.d.ts +24 -0
  53. package/dist/models/delete-layout-request-dto.js +15 -0
  54. package/dist/models/delete-notification-template-request-dto.d.ts +24 -0
  55. package/dist/models/delete-notification-template-request-dto.js +15 -0
  56. package/dist/models/download-attachment-response-class.d.ts +36 -0
  57. package/dist/models/download-attachment-response-class.js +15 -0
  58. package/dist/models/email-attachment-class.d.ts +84 -0
  59. package/dist/models/email-attachment-class.js +15 -0
  60. package/dist/models/email-message-class.d.ts +140 -0
  61. package/dist/models/email-message-class.js +27 -0
  62. package/dist/models/email-thread-class.d.ts +83 -0
  63. package/dist/models/email-thread-class.js +20 -0
  64. package/dist/models/get-email-message-response-class.d.ts +25 -0
  65. package/dist/models/get-email-message-response-class.js +15 -0
  66. package/dist/models/get-email-thread-response-class.d.ts +25 -0
  67. package/dist/models/get-email-thread-response-class.js +15 -0
  68. package/dist/models/get-layout-request-dto.d.ts +24 -0
  69. package/dist/models/get-layout-request-dto.js +15 -0
  70. package/dist/models/get-layout-response-class.d.ts +25 -0
  71. package/dist/models/get-layout-response-class.js +15 -0
  72. package/dist/models/get-notification-template-request-dto.d.ts +30 -0
  73. package/dist/models/get-notification-template-request-dto.js +15 -0
  74. package/dist/models/get-notification-template-response-class.d.ts +25 -0
  75. package/dist/models/get-notification-template-response-class.js +15 -0
  76. package/dist/models/html-template-class.d.ts +54 -0
  77. package/dist/models/html-template-class.js +15 -0
  78. package/dist/models/index.d.ts +38 -0
  79. package/dist/models/index.js +54 -0
  80. package/dist/models/initiate-email-verification-dto.d.ts +30 -0
  81. package/dist/models/initiate-email-verification-dto.js +15 -0
  82. package/dist/models/initiate-email-verification-response-class.d.ts +24 -0
  83. package/dist/models/initiate-email-verification-response-class.js +15 -0
  84. package/dist/models/inline-response200.d.ts +54 -0
  85. package/dist/models/inline-response200.js +15 -0
  86. package/dist/models/inline-response503.d.ts +54 -0
  87. package/dist/models/inline-response503.js +15 -0
  88. package/dist/models/layout-class.d.ts +73 -0
  89. package/dist/models/layout-class.js +15 -0
  90. package/dist/models/list-email-attachments-response-class.d.ts +25 -0
  91. package/dist/models/list-email-attachments-response-class.js +15 -0
  92. package/dist/models/list-email-messages-response-class.d.ts +43 -0
  93. package/dist/models/list-email-messages-response-class.js +15 -0
  94. package/dist/models/list-email-threads-response-class.d.ts +43 -0
  95. package/dist/models/list-email-threads-response-class.js +15 -0
  96. package/dist/models/list-layouts-response-class.d.ts +30 -0
  97. package/dist/models/list-layouts-response-class.js +15 -0
  98. package/dist/models/list-notification-templates-response-class.d.ts +30 -0
  99. package/dist/models/list-notification-templates-response-class.js +15 -0
  100. package/dist/models/notification-template-class.d.ts +98 -0
  101. package/dist/models/notification-template-class.js +15 -0
  102. package/dist/models/s3-document-dto.d.ts +36 -0
  103. package/dist/models/s3-document-dto.js +15 -0
  104. package/dist/models/send-notification-request-dto.d.ts +115 -0
  105. package/dist/models/send-notification-request-dto.js +21 -0
  106. package/dist/models/send-notification-response-class.d.ts +24 -0
  107. package/dist/models/send-notification-response-class.js +15 -0
  108. package/dist/models/update-html-template-request-dto.d.ts +42 -0
  109. package/dist/models/update-html-template-request-dto.js +21 -0
  110. package/dist/models/update-layout-request-dto.d.ts +55 -0
  111. package/dist/models/update-layout-request-dto.js +15 -0
  112. package/dist/models/update-layout-response-class.d.ts +25 -0
  113. package/dist/models/update-layout-response-class.js +15 -0
  114. package/dist/models/update-notification-template-request-dto.d.ts +73 -0
  115. package/dist/models/update-notification-template-request-dto.js +15 -0
  116. package/dist/models/update-notification-template-response-class.d.ts +25 -0
  117. package/dist/models/update-notification-template-response-class.js +15 -0
  118. package/git_push.sh +57 -0
  119. package/index.ts +19 -0
  120. package/models/complete-email-verification-dto.ts +36 -0
  121. package/models/complete-email-verification-response-class.ts +30 -0
  122. package/models/create-layout-request-dto.ts +54 -0
  123. package/models/create-layout-response-class.ts +31 -0
  124. package/models/create-notification-template-request-dto.ts +72 -0
  125. package/models/create-notification-template-response-class.ts +31 -0
  126. package/models/delete-layout-request-dto.ts +30 -0
  127. package/models/delete-notification-template-request-dto.ts +30 -0
  128. package/models/download-attachment-response-class.ts +42 -0
  129. package/models/email-attachment-class.ts +90 -0
  130. package/models/email-message-class.ts +150 -0
  131. package/models/email-thread-class.ts +92 -0
  132. package/models/get-email-message-response-class.ts +31 -0
  133. package/models/get-email-thread-response-class.ts +31 -0
  134. package/models/get-layout-request-dto.ts +30 -0
  135. package/models/get-layout-response-class.ts +31 -0
  136. package/models/get-notification-template-request-dto.ts +36 -0
  137. package/models/get-notification-template-response-class.ts +31 -0
  138. package/models/html-template-class.ts +60 -0
  139. package/models/index.ts +38 -0
  140. package/models/initiate-email-verification-dto.ts +36 -0
  141. package/models/initiate-email-verification-response-class.ts +30 -0
  142. package/models/inline-response200.ts +48 -0
  143. package/models/inline-response503.ts +48 -0
  144. package/models/layout-class.ts +79 -0
  145. package/models/list-email-attachments-response-class.ts +31 -0
  146. package/models/list-email-messages-response-class.ts +49 -0
  147. package/models/list-email-threads-response-class.ts +49 -0
  148. package/models/list-layouts-response-class.ts +36 -0
  149. package/models/list-notification-templates-response-class.ts +36 -0
  150. package/models/notification-template-class.ts +104 -0
  151. package/models/s3-document-dto.ts +42 -0
  152. package/models/send-notification-request-dto.ts +124 -0
  153. package/models/send-notification-response-class.ts +30 -0
  154. package/models/update-html-template-request-dto.ts +51 -0
  155. package/models/update-layout-request-dto.ts +61 -0
  156. package/models/update-layout-response-class.ts +31 -0
  157. package/models/update-notification-template-request-dto.ts +79 -0
  158. package/models/update-notification-template-response-class.ts +31 -0
  159. package/package.json +27 -0
  160. package/tsconfig.json +23 -0
@@ -0,0 +1,58 @@
1
+ .gitignore
2
+ .npmignore
3
+ .openapi-generator-ignore
4
+ README.md
5
+ api.ts
6
+ api/default-api.ts
7
+ api/email-messages-api.ts
8
+ api/email-tracking-api.ts
9
+ api/email-verifications-api.ts
10
+ api/layouts-api.ts
11
+ api/notification-templates-api.ts
12
+ api/notifications-api.ts
13
+ base.ts
14
+ common.ts
15
+ configuration.ts
16
+ git_push.sh
17
+ index.ts
18
+ models/complete-email-verification-dto.ts
19
+ models/complete-email-verification-response-class.ts
20
+ models/create-layout-request-dto.ts
21
+ models/create-layout-response-class.ts
22
+ models/create-notification-template-request-dto.ts
23
+ models/create-notification-template-response-class.ts
24
+ models/delete-layout-request-dto.ts
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
32
+ models/get-layout-request-dto.ts
33
+ models/get-layout-response-class.ts
34
+ models/get-notification-template-request-dto.ts
35
+ models/get-notification-template-response-class.ts
36
+ models/html-template-class.ts
37
+ models/index.ts
38
+ models/initiate-email-verification-dto.ts
39
+ models/initiate-email-verification-response-class.ts
40
+ models/inline-response200.ts
41
+ models/inline-response503.ts
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
46
+ models/list-layouts-response-class.ts
47
+ models/list-notification-templates-response-class.ts
48
+ models/notification-template-class.ts
49
+ models/s3-document-dto.ts
50
+ models/send-notification-request-dto.ts
51
+ models/send-notification-response-class.ts
52
+ models/update-html-template-request-dto.ts
53
+ models/update-layout-request-dto.ts
54
+ models/update-layout-response-class.ts
55
+ models/update-notification-template-request-dto.ts
56
+ models/update-notification-template-response-class.ts
57
+ package.json
58
+ tsconfig.json
@@ -0,0 +1 @@
1
+ 5.4.0
@@ -0,0 +1,23 @@
1
+ # OpenAPI Generator Ignore
2
+ # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3
+
4
+ # Use this file to prevent files from being overwritten by the generator.
5
+ # The patterns follow closely to .gitignore or .dockerignore.
6
+
7
+ # As an example, the C# client generator defines ApiClient.cs.
8
+ # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9
+ #ApiClient.cs
10
+
11
+ # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12
+ #foo/*/qux
13
+ # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14
+
15
+ # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16
+ #foo/**/qux
17
+ # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18
+
19
+ # You can also negate patterns with an exclamation (!).
20
+ # For example, you can ignore all files in a docs folder with the file extension .md:
21
+ #docs/*.md
22
+ # Then explicitly reverse the ignore rule for a single file:
23
+ #!docs/README.md
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # Emil Notification SDK
2
+
3
+ This TypeScript/JavaScript client utilizes [axios](https://github.com/axios/axios). The generated module can be used with client-based applications (i.e. React).
4
+
5
+ Language level
6
+ * ES5 - you must have a Promises/A+ library installed
7
+ * ES6
8
+
9
+ Module system
10
+ * CommonJS
11
+ * ES6 module system
12
+
13
+ Although this package can be used in both TypeScript and JavaScript, it is intended to be used with TypeScript. The definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)). For more information, you can go to [Emil Api documentation](https://emil.stoplight.io/docs/emil-api/).
14
+
15
+ ## Consuming
16
+
17
+ Navigate to the folder of your consuming project and run one of the following commands:
18
+
19
+ ```
20
+ npm install @emilgroup/notification-sdk@0.1.1-beta.0 --save
21
+ ```
22
+ or
23
+ ```
24
+ yarn add @emilgroup/notification-sdk@0.1.1-beta.0
25
+ ```
26
+
27
+ And then you can import ``.
28
+
29
+ ```ts
30
+ import { } from '@emilgroup/notification-sdk'
31
+
32
+ const = new ();
33
+ ```
34
+
35
+ To use authentication protected endpoints, you have to first authorize. To do so, use the `authorize` function in ``:
36
+
37
+ ```ts
38
+ async function (): Promise<Void> {
39
+ try {
40
+ const = new ();
41
+
42
+ await .authorize('username', 'password');
43
+
44
+ const { data: { items } } = await .();
45
+
46
+ console.log(items);
47
+ } catch(error) {
48
+ // process error
49
+ }
50
+ }
51
+ ```
@@ -0,0 +1,124 @@
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 { InlineResponse200 } from '../models';
25
+ // @ts-ignore
26
+ import { InlineResponse503 } from '../models';
27
+ /**
28
+ * DefaultApi - axios parameter creator
29
+ * @export
30
+ */
31
+ export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) {
32
+ return {
33
+ /**
34
+ * Returns the health status of the notification service. This endpoint is used to monitor the operational status of the notification service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
35
+ * @summary Health Check
36
+ * @param {*} [options] Override http request option.
37
+ * @throws {RequiredError}
38
+ */
39
+ check: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
40
+ const localVarPath = `/notificationservice/health`;
41
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
42
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
43
+ let baseOptions;
44
+ let baseAccessToken;
45
+ if (configuration) {
46
+ baseOptions = configuration.baseOptions;
47
+ baseAccessToken = configuration.accessToken;
48
+ }
49
+
50
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
51
+ const localVarHeaderParameter = {} as any;
52
+ const localVarQueryParameter = {} as any;
53
+
54
+
55
+
56
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
57
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
58
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
59
+
60
+ return {
61
+ url: toPathString(localVarUrlObj),
62
+ options: localVarRequestOptions,
63
+ };
64
+ },
65
+ }
66
+ };
67
+
68
+ /**
69
+ * DefaultApi - functional programming interface
70
+ * @export
71
+ */
72
+ export const DefaultApiFp = function(configuration?: Configuration) {
73
+ const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration)
74
+ return {
75
+ /**
76
+ * Returns the health status of the notification service. This endpoint is used to monitor the operational status of the notification service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
77
+ * @summary Health Check
78
+ * @param {*} [options] Override http request option.
79
+ * @throws {RequiredError}
80
+ */
81
+ async check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>> {
82
+ const localVarAxiosArgs = await localVarAxiosParamCreator.check(options);
83
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
84
+ },
85
+ }
86
+ };
87
+
88
+ /**
89
+ * DefaultApi - factory interface
90
+ * @export
91
+ */
92
+ export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
93
+ const localVarFp = DefaultApiFp(configuration)
94
+ return {
95
+ /**
96
+ * Returns the health status of the notification service. This endpoint is used to monitor the operational status of the notification service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
97
+ * @summary Health Check
98
+ * @param {*} [options] Override http request option.
99
+ * @throws {RequiredError}
100
+ */
101
+ check(options?: any): AxiosPromise<InlineResponse200> {
102
+ return localVarFp.check(options).then((request) => request(axios, basePath));
103
+ },
104
+ };
105
+ };
106
+
107
+ /**
108
+ * DefaultApi - object-oriented interface
109
+ * @export
110
+ * @class DefaultApi
111
+ * @extends {BaseAPI}
112
+ */
113
+ export class DefaultApi extends BaseAPI {
114
+ /**
115
+ * Returns the health status of the notification service. This endpoint is used to monitor the operational status of the notification service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
116
+ * @summary Health Check
117
+ * @param {*} [options] Override http request option.
118
+ * @throws {RequiredError}
119
+ * @memberof DefaultApi
120
+ */
121
+ public check(options?: AxiosRequestConfig) {
122
+ return DefaultApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
123
+ }
124
+ }
@@ -0,0 +1,368 @@
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
+ /**
30
+ * EmailMessagesApi - axios parameter creator
31
+ * @export
32
+ */
33
+ export const EmailMessagesApiAxiosParamCreator = function (configuration?: Configuration) {
34
+ return {
35
+ /**
36
+ * undefined **Required Permissions** none
37
+ * @param {string} code
38
+ * @param {number} attachmentId
39
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
40
+ * @param {*} [options] Override http request option.
41
+ * @throws {RequiredError}
42
+ */
43
+ downloadAttachment: async (code: string, attachmentId: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
44
+ // verify required parameter 'code' is not null or undefined
45
+ assertParamExists('downloadAttachment', 'code', code)
46
+ // verify required parameter 'attachmentId' is not null or undefined
47
+ assertParamExists('downloadAttachment', 'attachmentId', attachmentId)
48
+ const localVarPath = `/notificationservice/v1/email-messages/{code}/attachments/{attachmentId}/download`
49
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)))
50
+ .replace(`{${"attachmentId"}}`, encodeURIComponent(String(attachmentId)));
51
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
52
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
53
+ let baseOptions;
54
+ let baseAccessToken;
55
+ if (configuration) {
56
+ baseOptions = configuration.baseOptions;
57
+ baseAccessToken = configuration.accessToken;
58
+ }
59
+
60
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
61
+ const localVarHeaderParameter = {} as any;
62
+ const localVarQueryParameter = {} as any;
63
+
64
+ // authentication bearer required
65
+ // http bearer authentication required
66
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
67
+
68
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
69
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
70
+ }
71
+
72
+
73
+
74
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
75
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
76
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
77
+
78
+ return {
79
+ url: toPathString(localVarUrlObj),
80
+ options: localVarRequestOptions,
81
+ };
82
+ },
83
+ /**
84
+ * undefined **Required Permissions** none
85
+ * @param {string} code
86
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
87
+ * @param {*} [options] Override http request option.
88
+ * @throws {RequiredError}
89
+ */
90
+ getMessage: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
91
+ // verify required parameter 'code' is not null or undefined
92
+ assertParamExists('getMessage', 'code', code)
93
+ const localVarPath = `/notificationservice/v1/email-messages/{code}`
94
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
95
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
96
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
97
+ let baseOptions;
98
+ let baseAccessToken;
99
+ if (configuration) {
100
+ baseOptions = configuration.baseOptions;
101
+ baseAccessToken = configuration.accessToken;
102
+ }
103
+
104
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
105
+ const localVarHeaderParameter = {} as any;
106
+ const localVarQueryParameter = {} as any;
107
+
108
+ // authentication bearer required
109
+ // http bearer authentication required
110
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
111
+
112
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
113
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
114
+ }
115
+
116
+
117
+
118
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
119
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
120
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
121
+
122
+ return {
123
+ url: toPathString(localVarUrlObj),
124
+ options: localVarRequestOptions,
125
+ };
126
+ },
127
+ /**
128
+ * undefined **Required Permissions** none
129
+ * @param {string} code
130
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
131
+ * @param {*} [options] Override http request option.
132
+ * @throws {RequiredError}
133
+ */
134
+ listAttachments: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
135
+ // verify required parameter 'code' is not null or undefined
136
+ assertParamExists('listAttachments', 'code', code)
137
+ const localVarPath = `/notificationservice/v1/email-messages/{code}/attachments`
138
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
139
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
140
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
141
+ let baseOptions;
142
+ let baseAccessToken;
143
+ if (configuration) {
144
+ baseOptions = configuration.baseOptions;
145
+ baseAccessToken = configuration.accessToken;
146
+ }
147
+
148
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
149
+ const localVarHeaderParameter = {} as any;
150
+ const localVarQueryParameter = {} as any;
151
+
152
+ // authentication bearer required
153
+ // http bearer authentication required
154
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
155
+
156
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
157
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
158
+ }
159
+
160
+
161
+
162
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
163
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
164
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
165
+
166
+ return {
167
+ url: toPathString(localVarUrlObj),
168
+ options: localVarRequestOptions,
169
+ };
170
+ },
171
+ }
172
+ };
173
+
174
+ /**
175
+ * EmailMessagesApi - functional programming interface
176
+ * @export
177
+ */
178
+ export const EmailMessagesApiFp = function(configuration?: Configuration) {
179
+ const localVarAxiosParamCreator = EmailMessagesApiAxiosParamCreator(configuration)
180
+ return {
181
+ /**
182
+ * undefined **Required Permissions** none
183
+ * @param {string} code
184
+ * @param {number} attachmentId
185
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
186
+ * @param {*} [options] Override http request option.
187
+ * @throws {RequiredError}
188
+ */
189
+ async downloadAttachment(code: string, attachmentId: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DownloadAttachmentResponseClass>> {
190
+ const localVarAxiosArgs = await localVarAxiosParamCreator.downloadAttachment(code, attachmentId, authorization, options);
191
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
192
+ },
193
+ /**
194
+ * undefined **Required Permissions** none
195
+ * @param {string} code
196
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
197
+ * @param {*} [options] Override http request option.
198
+ * @throws {RequiredError}
199
+ */
200
+ async getMessage(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetEmailMessageResponseClass>> {
201
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getMessage(code, authorization, options);
202
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
203
+ },
204
+ /**
205
+ * undefined **Required Permissions** none
206
+ * @param {string} code
207
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
208
+ * @param {*} [options] Override http request option.
209
+ * @throws {RequiredError}
210
+ */
211
+ async listAttachments(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEmailAttachmentsResponseClass>> {
212
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listAttachments(code, authorization, options);
213
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
214
+ },
215
+ }
216
+ };
217
+
218
+ /**
219
+ * EmailMessagesApi - factory interface
220
+ * @export
221
+ */
222
+ export const EmailMessagesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
223
+ const localVarFp = EmailMessagesApiFp(configuration)
224
+ return {
225
+ /**
226
+ * undefined **Required Permissions** none
227
+ * @param {string} code
228
+ * @param {number} attachmentId
229
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
230
+ * @param {*} [options] Override http request option.
231
+ * @throws {RequiredError}
232
+ */
233
+ downloadAttachment(code: string, attachmentId: number, authorization?: string, options?: any): AxiosPromise<DownloadAttachmentResponseClass> {
234
+ return localVarFp.downloadAttachment(code, attachmentId, authorization, options).then((request) => request(axios, basePath));
235
+ },
236
+ /**
237
+ * undefined **Required Permissions** none
238
+ * @param {string} code
239
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
240
+ * @param {*} [options] Override http request option.
241
+ * @throws {RequiredError}
242
+ */
243
+ getMessage(code: string, authorization?: string, options?: any): AxiosPromise<GetEmailMessageResponseClass> {
244
+ return localVarFp.getMessage(code, authorization, options).then((request) => request(axios, basePath));
245
+ },
246
+ /**
247
+ * undefined **Required Permissions** none
248
+ * @param {string} code
249
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ */
253
+ listAttachments(code: string, authorization?: string, options?: any): AxiosPromise<ListEmailAttachmentsResponseClass> {
254
+ return localVarFp.listAttachments(code, authorization, options).then((request) => request(axios, basePath));
255
+ },
256
+ };
257
+ };
258
+
259
+ /**
260
+ * Request parameters for downloadAttachment operation in EmailMessagesApi.
261
+ * @export
262
+ * @interface EmailMessagesApiDownloadAttachmentRequest
263
+ */
264
+ export interface EmailMessagesApiDownloadAttachmentRequest {
265
+ /**
266
+ *
267
+ * @type {string}
268
+ * @memberof EmailMessagesApiDownloadAttachment
269
+ */
270
+ readonly code: string
271
+
272
+ /**
273
+ *
274
+ * @type {number}
275
+ * @memberof EmailMessagesApiDownloadAttachment
276
+ */
277
+ readonly attachmentId: number
278
+
279
+ /**
280
+ * Bearer Token: provided by the login endpoint under the name accessToken.
281
+ * @type {string}
282
+ * @memberof EmailMessagesApiDownloadAttachment
283
+ */
284
+ readonly authorization?: string
285
+ }
286
+
287
+ /**
288
+ * Request parameters for getMessage operation in EmailMessagesApi.
289
+ * @export
290
+ * @interface EmailMessagesApiGetMessageRequest
291
+ */
292
+ export interface EmailMessagesApiGetMessageRequest {
293
+ /**
294
+ *
295
+ * @type {string}
296
+ * @memberof EmailMessagesApiGetMessage
297
+ */
298
+ readonly code: string
299
+
300
+ /**
301
+ * Bearer Token: provided by the login endpoint under the name accessToken.
302
+ * @type {string}
303
+ * @memberof EmailMessagesApiGetMessage
304
+ */
305
+ readonly authorization?: string
306
+ }
307
+
308
+ /**
309
+ * Request parameters for listAttachments operation in EmailMessagesApi.
310
+ * @export
311
+ * @interface EmailMessagesApiListAttachmentsRequest
312
+ */
313
+ export interface EmailMessagesApiListAttachmentsRequest {
314
+ /**
315
+ *
316
+ * @type {string}
317
+ * @memberof EmailMessagesApiListAttachments
318
+ */
319
+ readonly code: string
320
+
321
+ /**
322
+ * Bearer Token: provided by the login endpoint under the name accessToken.
323
+ * @type {string}
324
+ * @memberof EmailMessagesApiListAttachments
325
+ */
326
+ readonly authorization?: string
327
+ }
328
+
329
+ /**
330
+ * EmailMessagesApi - object-oriented interface
331
+ * @export
332
+ * @class EmailMessagesApi
333
+ * @extends {BaseAPI}
334
+ */
335
+ export class EmailMessagesApi extends BaseAPI {
336
+ /**
337
+ * undefined **Required Permissions** none
338
+ * @param {EmailMessagesApiDownloadAttachmentRequest} requestParameters Request parameters.
339
+ * @param {*} [options] Override http request option.
340
+ * @throws {RequiredError}
341
+ * @memberof EmailMessagesApi
342
+ */
343
+ public downloadAttachment(requestParameters: EmailMessagesApiDownloadAttachmentRequest, options?: AxiosRequestConfig) {
344
+ return EmailMessagesApiFp(this.configuration).downloadAttachment(requestParameters.code, requestParameters.attachmentId, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
345
+ }
346
+
347
+ /**
348
+ * undefined **Required Permissions** none
349
+ * @param {EmailMessagesApiGetMessageRequest} requestParameters Request parameters.
350
+ * @param {*} [options] Override http request option.
351
+ * @throws {RequiredError}
352
+ * @memberof EmailMessagesApi
353
+ */
354
+ public getMessage(requestParameters: EmailMessagesApiGetMessageRequest, options?: AxiosRequestConfig) {
355
+ return EmailMessagesApiFp(this.configuration).getMessage(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
356
+ }
357
+
358
+ /**
359
+ * undefined **Required Permissions** none
360
+ * @param {EmailMessagesApiListAttachmentsRequest} requestParameters Request parameters.
361
+ * @param {*} [options] Override http request option.
362
+ * @throws {RequiredError}
363
+ * @memberof EmailMessagesApi
364
+ */
365
+ public listAttachments(requestParameters: EmailMessagesApiListAttachmentsRequest, options?: AxiosRequestConfig) {
366
+ return EmailMessagesApiFp(this.configuration).listAttachments(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
367
+ }
368
+ }