@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,205 @@
1
+ /**
2
+ * EMIL NotificationService
3
+ * The EMIL NotificationService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
+ import { Configuration } from '../configuration';
14
+ import { RequestArgs, BaseAPI } from '../base';
15
+ import { DownloadAttachmentResponseClass } from '../models';
16
+ import { GetEmailMessageResponseClass } from '../models';
17
+ import { ListEmailAttachmentsResponseClass } from '../models';
18
+ /**
19
+ * EmailMessagesApi - axios parameter creator
20
+ * @export
21
+ */
22
+ export declare const EmailMessagesApiAxiosParamCreator: (configuration?: Configuration) => {
23
+ /**
24
+ * undefined **Required Permissions** none
25
+ * @param {string} code
26
+ * @param {number} attachmentId
27
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
28
+ * @param {*} [options] Override http request option.
29
+ * @throws {RequiredError}
30
+ */
31
+ downloadAttachment: (code: string, attachmentId: number, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
32
+ /**
33
+ * undefined **Required Permissions** none
34
+ * @param {string} code
35
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
36
+ * @param {*} [options] Override http request option.
37
+ * @throws {RequiredError}
38
+ */
39
+ getMessage: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
40
+ /**
41
+ * undefined **Required Permissions** none
42
+ * @param {string} code
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
+ listAttachments: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
48
+ };
49
+ /**
50
+ * EmailMessagesApi - functional programming interface
51
+ * @export
52
+ */
53
+ export declare const EmailMessagesApiFp: (configuration?: Configuration) => {
54
+ /**
55
+ * undefined **Required Permissions** none
56
+ * @param {string} code
57
+ * @param {number} attachmentId
58
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
59
+ * @param {*} [options] Override http request option.
60
+ * @throws {RequiredError}
61
+ */
62
+ downloadAttachment(code: string, attachmentId: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DownloadAttachmentResponseClass>>;
63
+ /**
64
+ * undefined **Required Permissions** none
65
+ * @param {string} code
66
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
67
+ * @param {*} [options] Override http request option.
68
+ * @throws {RequiredError}
69
+ */
70
+ getMessage(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetEmailMessageResponseClass>>;
71
+ /**
72
+ * undefined **Required Permissions** none
73
+ * @param {string} code
74
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
75
+ * @param {*} [options] Override http request option.
76
+ * @throws {RequiredError}
77
+ */
78
+ listAttachments(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEmailAttachmentsResponseClass>>;
79
+ };
80
+ /**
81
+ * EmailMessagesApi - factory interface
82
+ * @export
83
+ */
84
+ export declare const EmailMessagesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
85
+ /**
86
+ * undefined **Required Permissions** none
87
+ * @param {string} code
88
+ * @param {number} attachmentId
89
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
90
+ * @param {*} [options] Override http request option.
91
+ * @throws {RequiredError}
92
+ */
93
+ downloadAttachment(code: string, attachmentId: number, authorization?: string, options?: any): AxiosPromise<DownloadAttachmentResponseClass>;
94
+ /**
95
+ * undefined **Required Permissions** none
96
+ * @param {string} code
97
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
98
+ * @param {*} [options] Override http request option.
99
+ * @throws {RequiredError}
100
+ */
101
+ getMessage(code: string, authorization?: string, options?: any): AxiosPromise<GetEmailMessageResponseClass>;
102
+ /**
103
+ * undefined **Required Permissions** none
104
+ * @param {string} code
105
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
106
+ * @param {*} [options] Override http request option.
107
+ * @throws {RequiredError}
108
+ */
109
+ listAttachments(code: string, authorization?: string, options?: any): AxiosPromise<ListEmailAttachmentsResponseClass>;
110
+ };
111
+ /**
112
+ * Request parameters for downloadAttachment operation in EmailMessagesApi.
113
+ * @export
114
+ * @interface EmailMessagesApiDownloadAttachmentRequest
115
+ */
116
+ export interface EmailMessagesApiDownloadAttachmentRequest {
117
+ /**
118
+ *
119
+ * @type {string}
120
+ * @memberof EmailMessagesApiDownloadAttachment
121
+ */
122
+ readonly code: string;
123
+ /**
124
+ *
125
+ * @type {number}
126
+ * @memberof EmailMessagesApiDownloadAttachment
127
+ */
128
+ readonly attachmentId: number;
129
+ /**
130
+ * Bearer Token: provided by the login endpoint under the name accessToken.
131
+ * @type {string}
132
+ * @memberof EmailMessagesApiDownloadAttachment
133
+ */
134
+ readonly authorization?: string;
135
+ }
136
+ /**
137
+ * Request parameters for getMessage operation in EmailMessagesApi.
138
+ * @export
139
+ * @interface EmailMessagesApiGetMessageRequest
140
+ */
141
+ export interface EmailMessagesApiGetMessageRequest {
142
+ /**
143
+ *
144
+ * @type {string}
145
+ * @memberof EmailMessagesApiGetMessage
146
+ */
147
+ readonly code: string;
148
+ /**
149
+ * Bearer Token: provided by the login endpoint under the name accessToken.
150
+ * @type {string}
151
+ * @memberof EmailMessagesApiGetMessage
152
+ */
153
+ readonly authorization?: string;
154
+ }
155
+ /**
156
+ * Request parameters for listAttachments operation in EmailMessagesApi.
157
+ * @export
158
+ * @interface EmailMessagesApiListAttachmentsRequest
159
+ */
160
+ export interface EmailMessagesApiListAttachmentsRequest {
161
+ /**
162
+ *
163
+ * @type {string}
164
+ * @memberof EmailMessagesApiListAttachments
165
+ */
166
+ readonly code: string;
167
+ /**
168
+ * Bearer Token: provided by the login endpoint under the name accessToken.
169
+ * @type {string}
170
+ * @memberof EmailMessagesApiListAttachments
171
+ */
172
+ readonly authorization?: string;
173
+ }
174
+ /**
175
+ * EmailMessagesApi - object-oriented interface
176
+ * @export
177
+ * @class EmailMessagesApi
178
+ * @extends {BaseAPI}
179
+ */
180
+ export declare class EmailMessagesApi extends BaseAPI {
181
+ /**
182
+ * undefined **Required Permissions** none
183
+ * @param {EmailMessagesApiDownloadAttachmentRequest} requestParameters Request parameters.
184
+ * @param {*} [options] Override http request option.
185
+ * @throws {RequiredError}
186
+ * @memberof EmailMessagesApi
187
+ */
188
+ downloadAttachment(requestParameters: EmailMessagesApiDownloadAttachmentRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DownloadAttachmentResponseClass, any, {}>>;
189
+ /**
190
+ * undefined **Required Permissions** none
191
+ * @param {EmailMessagesApiGetMessageRequest} requestParameters Request parameters.
192
+ * @param {*} [options] Override http request option.
193
+ * @throws {RequiredError}
194
+ * @memberof EmailMessagesApi
195
+ */
196
+ getMessage(requestParameters: EmailMessagesApiGetMessageRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetEmailMessageResponseClass, any, {}>>;
197
+ /**
198
+ * undefined **Required Permissions** none
199
+ * @param {EmailMessagesApiListAttachmentsRequest} requestParameters Request parameters.
200
+ * @param {*} [options] Override http request option.
201
+ * @throws {RequiredError}
202
+ * @memberof EmailMessagesApi
203
+ */
204
+ listAttachments(requestParameters: EmailMessagesApiListAttachmentsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListEmailAttachmentsResponseClass, any, {}>>;
205
+ }
@@ -0,0 +1,401 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL NotificationService
6
+ * The EMIL NotificationService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ var __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.EmailMessagesApi = exports.EmailMessagesApiFactory = exports.EmailMessagesApiFp = exports.EmailMessagesApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ /**
89
+ * EmailMessagesApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var EmailMessagesApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * undefined **Required Permissions** none
97
+ * @param {string} code
98
+ * @param {number} attachmentId
99
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ downloadAttachment: function (code, attachmentId, 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 'code' is not null or undefined
111
+ (0, common_1.assertParamExists)('downloadAttachment', 'code', code);
112
+ // verify required parameter 'attachmentId' is not null or undefined
113
+ (0, common_1.assertParamExists)('downloadAttachment', 'attachmentId', attachmentId);
114
+ localVarPath = "/notificationservice/v1/email-messages/{code}/attachments/{attachmentId}/download"
115
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)))
116
+ .replace("{".concat("attachmentId", "}"), encodeURIComponent(String(attachmentId)));
117
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
118
+ if (configuration) {
119
+ baseOptions = configuration.baseOptions;
120
+ baseAccessToken = configuration.accessToken;
121
+ }
122
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
123
+ localVarHeaderParameter = {};
124
+ localVarQueryParameter = {};
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ case 1:
129
+ // authentication bearer required
130
+ // http bearer authentication required
131
+ _a.sent();
132
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
134
+ }
135
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
136
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
137
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
138
+ return [2 /*return*/, {
139
+ url: (0, common_1.toPathString)(localVarUrlObj),
140
+ options: localVarRequestOptions,
141
+ }];
142
+ }
143
+ });
144
+ });
145
+ },
146
+ /**
147
+ * undefined **Required Permissions** none
148
+ * @param {string} code
149
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
150
+ * @param {*} [options] Override http request option.
151
+ * @throws {RequiredError}
152
+ */
153
+ getMessage: function (code, authorization, options) {
154
+ if (options === void 0) { options = {}; }
155
+ return __awaiter(_this, void 0, void 0, function () {
156
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
157
+ return __generator(this, function (_a) {
158
+ switch (_a.label) {
159
+ case 0:
160
+ // verify required parameter 'code' is not null or undefined
161
+ (0, common_1.assertParamExists)('getMessage', 'code', code);
162
+ localVarPath = "/notificationservice/v1/email-messages/{code}"
163
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
164
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
165
+ if (configuration) {
166
+ baseOptions = configuration.baseOptions;
167
+ baseAccessToken = configuration.accessToken;
168
+ }
169
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
170
+ localVarHeaderParameter = {};
171
+ localVarQueryParameter = {};
172
+ // authentication bearer required
173
+ // http bearer authentication required
174
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
175
+ case 1:
176
+ // authentication bearer required
177
+ // http bearer authentication required
178
+ _a.sent();
179
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
180
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
181
+ }
182
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
183
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
184
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
185
+ return [2 /*return*/, {
186
+ url: (0, common_1.toPathString)(localVarUrlObj),
187
+ options: localVarRequestOptions,
188
+ }];
189
+ }
190
+ });
191
+ });
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
+ listAttachments: function (code, authorization, options) {
201
+ if (options === void 0) { options = {}; }
202
+ return __awaiter(_this, void 0, void 0, function () {
203
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
204
+ return __generator(this, function (_a) {
205
+ switch (_a.label) {
206
+ case 0:
207
+ // verify required parameter 'code' is not null or undefined
208
+ (0, common_1.assertParamExists)('listAttachments', 'code', code);
209
+ localVarPath = "/notificationservice/v1/email-messages/{code}/attachments"
210
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
211
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
212
+ if (configuration) {
213
+ baseOptions = configuration.baseOptions;
214
+ baseAccessToken = configuration.accessToken;
215
+ }
216
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
217
+ localVarHeaderParameter = {};
218
+ localVarQueryParameter = {};
219
+ // authentication bearer required
220
+ // http bearer authentication required
221
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
222
+ case 1:
223
+ // authentication bearer required
224
+ // http bearer authentication required
225
+ _a.sent();
226
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
227
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
228
+ }
229
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
230
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
231
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
232
+ return [2 /*return*/, {
233
+ url: (0, common_1.toPathString)(localVarUrlObj),
234
+ options: localVarRequestOptions,
235
+ }];
236
+ }
237
+ });
238
+ });
239
+ },
240
+ };
241
+ };
242
+ exports.EmailMessagesApiAxiosParamCreator = EmailMessagesApiAxiosParamCreator;
243
+ /**
244
+ * EmailMessagesApi - functional programming interface
245
+ * @export
246
+ */
247
+ var EmailMessagesApiFp = function (configuration) {
248
+ var localVarAxiosParamCreator = (0, exports.EmailMessagesApiAxiosParamCreator)(configuration);
249
+ return {
250
+ /**
251
+ * undefined **Required Permissions** none
252
+ * @param {string} code
253
+ * @param {number} attachmentId
254
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
255
+ * @param {*} [options] Override http request option.
256
+ * @throws {RequiredError}
257
+ */
258
+ downloadAttachment: function (code, attachmentId, authorization, options) {
259
+ return __awaiter(this, void 0, void 0, function () {
260
+ var localVarAxiosArgs;
261
+ return __generator(this, function (_a) {
262
+ switch (_a.label) {
263
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadAttachment(code, attachmentId, authorization, options)];
264
+ case 1:
265
+ localVarAxiosArgs = _a.sent();
266
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
267
+ }
268
+ });
269
+ });
270
+ },
271
+ /**
272
+ * undefined **Required Permissions** none
273
+ * @param {string} code
274
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
275
+ * @param {*} [options] Override http request option.
276
+ * @throws {RequiredError}
277
+ */
278
+ getMessage: function (code, authorization, options) {
279
+ return __awaiter(this, void 0, void 0, function () {
280
+ var localVarAxiosArgs;
281
+ return __generator(this, function (_a) {
282
+ switch (_a.label) {
283
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getMessage(code, authorization, options)];
284
+ case 1:
285
+ localVarAxiosArgs = _a.sent();
286
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
287
+ }
288
+ });
289
+ });
290
+ },
291
+ /**
292
+ * undefined **Required Permissions** none
293
+ * @param {string} code
294
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
295
+ * @param {*} [options] Override http request option.
296
+ * @throws {RequiredError}
297
+ */
298
+ listAttachments: function (code, authorization, options) {
299
+ return __awaiter(this, void 0, void 0, function () {
300
+ var localVarAxiosArgs;
301
+ return __generator(this, function (_a) {
302
+ switch (_a.label) {
303
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listAttachments(code, authorization, options)];
304
+ case 1:
305
+ localVarAxiosArgs = _a.sent();
306
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
307
+ }
308
+ });
309
+ });
310
+ },
311
+ };
312
+ };
313
+ exports.EmailMessagesApiFp = EmailMessagesApiFp;
314
+ /**
315
+ * EmailMessagesApi - factory interface
316
+ * @export
317
+ */
318
+ var EmailMessagesApiFactory = function (configuration, basePath, axios) {
319
+ var localVarFp = (0, exports.EmailMessagesApiFp)(configuration);
320
+ return {
321
+ /**
322
+ * undefined **Required Permissions** none
323
+ * @param {string} code
324
+ * @param {number} attachmentId
325
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
326
+ * @param {*} [options] Override http request option.
327
+ * @throws {RequiredError}
328
+ */
329
+ downloadAttachment: function (code, attachmentId, authorization, options) {
330
+ return localVarFp.downloadAttachment(code, attachmentId, authorization, options).then(function (request) { return request(axios, basePath); });
331
+ },
332
+ /**
333
+ * undefined **Required Permissions** none
334
+ * @param {string} code
335
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
336
+ * @param {*} [options] Override http request option.
337
+ * @throws {RequiredError}
338
+ */
339
+ getMessage: function (code, authorization, options) {
340
+ return localVarFp.getMessage(code, authorization, options).then(function (request) { return request(axios, basePath); });
341
+ },
342
+ /**
343
+ * undefined **Required Permissions** none
344
+ * @param {string} code
345
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
346
+ * @param {*} [options] Override http request option.
347
+ * @throws {RequiredError}
348
+ */
349
+ listAttachments: function (code, authorization, options) {
350
+ return localVarFp.listAttachments(code, authorization, options).then(function (request) { return request(axios, basePath); });
351
+ },
352
+ };
353
+ };
354
+ exports.EmailMessagesApiFactory = EmailMessagesApiFactory;
355
+ /**
356
+ * EmailMessagesApi - object-oriented interface
357
+ * @export
358
+ * @class EmailMessagesApi
359
+ * @extends {BaseAPI}
360
+ */
361
+ var EmailMessagesApi = /** @class */ (function (_super) {
362
+ __extends(EmailMessagesApi, _super);
363
+ function EmailMessagesApi() {
364
+ return _super !== null && _super.apply(this, arguments) || this;
365
+ }
366
+ /**
367
+ * undefined **Required Permissions** none
368
+ * @param {EmailMessagesApiDownloadAttachmentRequest} requestParameters Request parameters.
369
+ * @param {*} [options] Override http request option.
370
+ * @throws {RequiredError}
371
+ * @memberof EmailMessagesApi
372
+ */
373
+ EmailMessagesApi.prototype.downloadAttachment = function (requestParameters, options) {
374
+ var _this = this;
375
+ return (0, exports.EmailMessagesApiFp)(this.configuration).downloadAttachment(requestParameters.code, requestParameters.attachmentId, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
376
+ };
377
+ /**
378
+ * undefined **Required Permissions** none
379
+ * @param {EmailMessagesApiGetMessageRequest} requestParameters Request parameters.
380
+ * @param {*} [options] Override http request option.
381
+ * @throws {RequiredError}
382
+ * @memberof EmailMessagesApi
383
+ */
384
+ EmailMessagesApi.prototype.getMessage = function (requestParameters, options) {
385
+ var _this = this;
386
+ return (0, exports.EmailMessagesApiFp)(this.configuration).getMessage(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
387
+ };
388
+ /**
389
+ * undefined **Required Permissions** none
390
+ * @param {EmailMessagesApiListAttachmentsRequest} requestParameters Request parameters.
391
+ * @param {*} [options] Override http request option.
392
+ * @throws {RequiredError}
393
+ * @memberof EmailMessagesApi
394
+ */
395
+ EmailMessagesApi.prototype.listAttachments = function (requestParameters, options) {
396
+ var _this = this;
397
+ return (0, exports.EmailMessagesApiFp)(this.configuration).listAttachments(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
398
+ };
399
+ return EmailMessagesApi;
400
+ }(base_1.BaseAPI));
401
+ exports.EmailMessagesApi = EmailMessagesApi;