@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,673 @@
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 { CreateLayoutRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateLayoutResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { GetLayoutResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { ListLayoutsResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { UpdateLayoutRequestDto } from '../models';
33
+ // @ts-ignore
34
+ import { UpdateLayoutResponseClass } from '../models';
35
+ /**
36
+ * LayoutsApi - axios parameter creator
37
+ * @export
38
+ */
39
+ export const LayoutsApiAxiosParamCreator = function (configuration?: Configuration) {
40
+ return {
41
+ /**
42
+ * undefined **Required Permissions** \"notification-management.email-templates.create\"
43
+ * @param {CreateLayoutRequestDto} createLayoutRequestDto
44
+ * @param {string} [authorization] Bearer Token
45
+ * @param {*} [options] Override http request option.
46
+ * @throws {RequiredError}
47
+ */
48
+ createLayout: async (createLayoutRequestDto: CreateLayoutRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
49
+ // verify required parameter 'createLayoutRequestDto' is not null or undefined
50
+ assertParamExists('createLayout', 'createLayoutRequestDto', createLayoutRequestDto)
51
+ const localVarPath = `/notificationservice/v1/layouts`;
52
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
53
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
54
+ let baseOptions;
55
+ let baseAccessToken;
56
+ if (configuration) {
57
+ baseOptions = configuration.baseOptions;
58
+ baseAccessToken = configuration.accessToken;
59
+ }
60
+
61
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
62
+ const localVarHeaderParameter = {} as any;
63
+ const localVarQueryParameter = {} as any;
64
+
65
+ // authentication bearer required
66
+ // http bearer authentication required
67
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
68
+
69
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
70
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
71
+ }
72
+
73
+
74
+
75
+ localVarHeaderParameter['Content-Type'] = 'application/json';
76
+
77
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
78
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
79
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
80
+ localVarRequestOptions.data = serializeDataIfNeeded(createLayoutRequestDto, localVarRequestOptions, configuration)
81
+
82
+ return {
83
+ url: toPathString(localVarUrlObj),
84
+ options: localVarRequestOptions,
85
+ };
86
+ },
87
+ /**
88
+ * undefined **Required Permissions** \"notification-management.email-templates.delete\"
89
+ * @param {number} id
90
+ * @param {string} [authorization] Bearer Token
91
+ * @param {*} [options] Override http request option.
92
+ * @throws {RequiredError}
93
+ */
94
+ deleteLayout: async (id: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
95
+ // verify required parameter 'id' is not null or undefined
96
+ assertParamExists('deleteLayout', 'id', id)
97
+ const localVarPath = `/notificationservice/v1/layouts/{id}`
98
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
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: 'DELETE', ...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** \"notification-management.email-templates.view\"
133
+ * @param {number} id
134
+ * @param {number} id2 Layout id
135
+ * @param {string} [authorization] Bearer Token
136
+ * @param {*} [options] Override http request option.
137
+ * @throws {RequiredError}
138
+ */
139
+ getLayout: async (id: number, id2: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
140
+ // verify required parameter 'id' is not null or undefined
141
+ assertParamExists('getLayout', 'id', id)
142
+ // verify required parameter 'id2' is not null or undefined
143
+ assertParamExists('getLayout', 'id2', id2)
144
+ const localVarPath = `/notificationservice/v1/layouts/{id}`
145
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
146
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
147
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
148
+ let baseOptions;
149
+ let baseAccessToken;
150
+ if (configuration) {
151
+ baseOptions = configuration.baseOptions;
152
+ baseAccessToken = configuration.accessToken;
153
+ }
154
+
155
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
156
+ const localVarHeaderParameter = {} as any;
157
+ const localVarQueryParameter = {} as any;
158
+
159
+ // authentication bearer required
160
+ // http bearer authentication required
161
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
162
+
163
+ if (id2 !== undefined) {
164
+ localVarQueryParameter['id'] = id2;
165
+ }
166
+
167
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
168
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
169
+ }
170
+
171
+
172
+
173
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
174
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
175
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
176
+
177
+ return {
178
+ url: toPathString(localVarUrlObj),
179
+ options: localVarRequestOptions,
180
+ };
181
+ },
182
+ /**
183
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
184
+ * @param {string} [authorization] Bearer Token
185
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
186
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
187
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
188
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
189
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
190
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
191
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
192
+ * @param {*} [options] Override http request option.
193
+ * @throws {RequiredError}
194
+ */
195
+ listLayouts: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
196
+ const localVarPath = `/notificationservice/v1/layouts`;
197
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
198
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
199
+ let baseOptions;
200
+ let baseAccessToken;
201
+ if (configuration) {
202
+ baseOptions = configuration.baseOptions;
203
+ baseAccessToken = configuration.accessToken;
204
+ }
205
+
206
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
207
+ const localVarHeaderParameter = {} as any;
208
+ const localVarQueryParameter = {} as any;
209
+
210
+ // authentication bearer required
211
+ // http bearer authentication required
212
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
213
+
214
+ if (pageSize !== undefined) {
215
+ localVarQueryParameter['pageSize'] = pageSize;
216
+ }
217
+
218
+ if (pageToken !== undefined) {
219
+ localVarQueryParameter['pageToken'] = pageToken;
220
+ }
221
+
222
+ if (filter !== undefined) {
223
+ localVarQueryParameter['filter'] = filter;
224
+ }
225
+
226
+ if (search !== undefined) {
227
+ localVarQueryParameter['search'] = search;
228
+ }
229
+
230
+ if (order !== undefined) {
231
+ localVarQueryParameter['order'] = order;
232
+ }
233
+
234
+ if (expand !== undefined) {
235
+ localVarQueryParameter['expand'] = expand;
236
+ }
237
+
238
+ if (filters !== undefined) {
239
+ localVarQueryParameter['filters'] = filters;
240
+ }
241
+
242
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
243
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
244
+ }
245
+
246
+
247
+
248
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
249
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
250
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
251
+
252
+ return {
253
+ url: toPathString(localVarUrlObj),
254
+ options: localVarRequestOptions,
255
+ };
256
+ },
257
+ /**
258
+ * undefined **Required Permissions** \"notification-management.email-templates.update\"
259
+ * @param {number} id
260
+ * @param {UpdateLayoutRequestDto} updateLayoutRequestDto
261
+ * @param {string} [authorization] Bearer Token
262
+ * @param {*} [options] Override http request option.
263
+ * @throws {RequiredError}
264
+ */
265
+ updateLayout: async (id: number, updateLayoutRequestDto: UpdateLayoutRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
266
+ // verify required parameter 'id' is not null or undefined
267
+ assertParamExists('updateLayout', 'id', id)
268
+ // verify required parameter 'updateLayoutRequestDto' is not null or undefined
269
+ assertParamExists('updateLayout', 'updateLayoutRequestDto', updateLayoutRequestDto)
270
+ const localVarPath = `/notificationservice/v1/layouts/{id}`
271
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
272
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
273
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
274
+ let baseOptions;
275
+ let baseAccessToken;
276
+ if (configuration) {
277
+ baseOptions = configuration.baseOptions;
278
+ baseAccessToken = configuration.accessToken;
279
+ }
280
+
281
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
282
+ const localVarHeaderParameter = {} as any;
283
+ const localVarQueryParameter = {} as any;
284
+
285
+ // authentication bearer required
286
+ // http bearer authentication required
287
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
288
+
289
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
290
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
291
+ }
292
+
293
+
294
+
295
+ localVarHeaderParameter['Content-Type'] = 'application/json';
296
+
297
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
298
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
299
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
300
+ localVarRequestOptions.data = serializeDataIfNeeded(updateLayoutRequestDto, localVarRequestOptions, configuration)
301
+
302
+ return {
303
+ url: toPathString(localVarUrlObj),
304
+ options: localVarRequestOptions,
305
+ };
306
+ },
307
+ }
308
+ };
309
+
310
+ /**
311
+ * LayoutsApi - functional programming interface
312
+ * @export
313
+ */
314
+ export const LayoutsApiFp = function(configuration?: Configuration) {
315
+ const localVarAxiosParamCreator = LayoutsApiAxiosParamCreator(configuration)
316
+ return {
317
+ /**
318
+ * undefined **Required Permissions** \"notification-management.email-templates.create\"
319
+ * @param {CreateLayoutRequestDto} createLayoutRequestDto
320
+ * @param {string} [authorization] Bearer Token
321
+ * @param {*} [options] Override http request option.
322
+ * @throws {RequiredError}
323
+ */
324
+ async createLayout(createLayoutRequestDto: CreateLayoutRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateLayoutResponseClass>> {
325
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createLayout(createLayoutRequestDto, authorization, options);
326
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
327
+ },
328
+ /**
329
+ * undefined **Required Permissions** \"notification-management.email-templates.delete\"
330
+ * @param {number} id
331
+ * @param {string} [authorization] Bearer Token
332
+ * @param {*} [options] Override http request option.
333
+ * @throws {RequiredError}
334
+ */
335
+ async deleteLayout(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
336
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteLayout(id, authorization, options);
337
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
338
+ },
339
+ /**
340
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
341
+ * @param {number} id
342
+ * @param {number} id2 Layout id
343
+ * @param {string} [authorization] Bearer Token
344
+ * @param {*} [options] Override http request option.
345
+ * @throws {RequiredError}
346
+ */
347
+ async getLayout(id: number, id2: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetLayoutResponseClass>> {
348
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getLayout(id, id2, authorization, options);
349
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
350
+ },
351
+ /**
352
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
353
+ * @param {string} [authorization] Bearer Token
354
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
355
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
356
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
357
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
358
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
359
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
360
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
361
+ * @param {*} [options] Override http request option.
362
+ * @throws {RequiredError}
363
+ */
364
+ async listLayouts(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListLayoutsResponseClass>> {
365
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listLayouts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
366
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
367
+ },
368
+ /**
369
+ * undefined **Required Permissions** \"notification-management.email-templates.update\"
370
+ * @param {number} id
371
+ * @param {UpdateLayoutRequestDto} updateLayoutRequestDto
372
+ * @param {string} [authorization] Bearer Token
373
+ * @param {*} [options] Override http request option.
374
+ * @throws {RequiredError}
375
+ */
376
+ async updateLayout(id: number, updateLayoutRequestDto: UpdateLayoutRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateLayoutResponseClass>> {
377
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateLayout(id, updateLayoutRequestDto, authorization, options);
378
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
379
+ },
380
+ }
381
+ };
382
+
383
+ /**
384
+ * LayoutsApi - factory interface
385
+ * @export
386
+ */
387
+ export const LayoutsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
388
+ const localVarFp = LayoutsApiFp(configuration)
389
+ return {
390
+ /**
391
+ * undefined **Required Permissions** \"notification-management.email-templates.create\"
392
+ * @param {CreateLayoutRequestDto} createLayoutRequestDto
393
+ * @param {string} [authorization] Bearer Token
394
+ * @param {*} [options] Override http request option.
395
+ * @throws {RequiredError}
396
+ */
397
+ createLayout(createLayoutRequestDto: CreateLayoutRequestDto, authorization?: string, options?: any): AxiosPromise<CreateLayoutResponseClass> {
398
+ return localVarFp.createLayout(createLayoutRequestDto, authorization, options).then((request) => request(axios, basePath));
399
+ },
400
+ /**
401
+ * undefined **Required Permissions** \"notification-management.email-templates.delete\"
402
+ * @param {number} id
403
+ * @param {string} [authorization] Bearer Token
404
+ * @param {*} [options] Override http request option.
405
+ * @throws {RequiredError}
406
+ */
407
+ deleteLayout(id: number, authorization?: string, options?: any): AxiosPromise<object> {
408
+ return localVarFp.deleteLayout(id, authorization, options).then((request) => request(axios, basePath));
409
+ },
410
+ /**
411
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
412
+ * @param {number} id
413
+ * @param {number} id2 Layout id
414
+ * @param {string} [authorization] Bearer Token
415
+ * @param {*} [options] Override http request option.
416
+ * @throws {RequiredError}
417
+ */
418
+ getLayout(id: number, id2: number, authorization?: string, options?: any): AxiosPromise<GetLayoutResponseClass> {
419
+ return localVarFp.getLayout(id, id2, authorization, options).then((request) => request(axios, basePath));
420
+ },
421
+ /**
422
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
423
+ * @param {string} [authorization] Bearer Token
424
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
425
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
426
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
427
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
428
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
429
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
430
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
431
+ * @param {*} [options] Override http request option.
432
+ * @throws {RequiredError}
433
+ */
434
+ listLayouts(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListLayoutsResponseClass> {
435
+ return localVarFp.listLayouts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
436
+ },
437
+ /**
438
+ * undefined **Required Permissions** \"notification-management.email-templates.update\"
439
+ * @param {number} id
440
+ * @param {UpdateLayoutRequestDto} updateLayoutRequestDto
441
+ * @param {string} [authorization] Bearer Token
442
+ * @param {*} [options] Override http request option.
443
+ * @throws {RequiredError}
444
+ */
445
+ updateLayout(id: number, updateLayoutRequestDto: UpdateLayoutRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateLayoutResponseClass> {
446
+ return localVarFp.updateLayout(id, updateLayoutRequestDto, authorization, options).then((request) => request(axios, basePath));
447
+ },
448
+ };
449
+ };
450
+
451
+ /**
452
+ * Request parameters for createLayout operation in LayoutsApi.
453
+ * @export
454
+ * @interface LayoutsApiCreateLayoutRequest
455
+ */
456
+ export interface LayoutsApiCreateLayoutRequest {
457
+ /**
458
+ *
459
+ * @type {CreateLayoutRequestDto}
460
+ * @memberof LayoutsApiCreateLayout
461
+ */
462
+ readonly createLayoutRequestDto: CreateLayoutRequestDto
463
+
464
+ /**
465
+ * Bearer Token
466
+ * @type {string}
467
+ * @memberof LayoutsApiCreateLayout
468
+ */
469
+ readonly authorization?: string
470
+ }
471
+
472
+ /**
473
+ * Request parameters for deleteLayout operation in LayoutsApi.
474
+ * @export
475
+ * @interface LayoutsApiDeleteLayoutRequest
476
+ */
477
+ export interface LayoutsApiDeleteLayoutRequest {
478
+ /**
479
+ *
480
+ * @type {number}
481
+ * @memberof LayoutsApiDeleteLayout
482
+ */
483
+ readonly id: number
484
+
485
+ /**
486
+ * Bearer Token
487
+ * @type {string}
488
+ * @memberof LayoutsApiDeleteLayout
489
+ */
490
+ readonly authorization?: string
491
+ }
492
+
493
+ /**
494
+ * Request parameters for getLayout operation in LayoutsApi.
495
+ * @export
496
+ * @interface LayoutsApiGetLayoutRequest
497
+ */
498
+ export interface LayoutsApiGetLayoutRequest {
499
+ /**
500
+ *
501
+ * @type {number}
502
+ * @memberof LayoutsApiGetLayout
503
+ */
504
+ readonly id: number
505
+
506
+ /**
507
+ * Layout id
508
+ * @type {number}
509
+ * @memberof LayoutsApiGetLayout
510
+ */
511
+ readonly id2: number
512
+
513
+ /**
514
+ * Bearer Token
515
+ * @type {string}
516
+ * @memberof LayoutsApiGetLayout
517
+ */
518
+ readonly authorization?: string
519
+ }
520
+
521
+ /**
522
+ * Request parameters for listLayouts operation in LayoutsApi.
523
+ * @export
524
+ * @interface LayoutsApiListLayoutsRequest
525
+ */
526
+ export interface LayoutsApiListLayoutsRequest {
527
+ /**
528
+ * Bearer Token
529
+ * @type {string}
530
+ * @memberof LayoutsApiListLayouts
531
+ */
532
+ readonly authorization?: string
533
+
534
+ /**
535
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
536
+ * @type {number}
537
+ * @memberof LayoutsApiListLayouts
538
+ */
539
+ readonly pageSize?: number
540
+
541
+ /**
542
+ * A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
543
+ * @type {string}
544
+ * @memberof LayoutsApiListLayouts
545
+ */
546
+ readonly pageToken?: string
547
+
548
+ /**
549
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
550
+ * @type {string}
551
+ * @memberof LayoutsApiListLayouts
552
+ */
553
+ readonly filter?: string
554
+
555
+ /**
556
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
557
+ * @type {string}
558
+ * @memberof LayoutsApiListLayouts
559
+ */
560
+ readonly search?: string
561
+
562
+ /**
563
+ * The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
564
+ * @type {string}
565
+ * @memberof LayoutsApiListLayouts
566
+ */
567
+ readonly order?: string
568
+
569
+ /**
570
+ * Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
571
+ * @type {string}
572
+ * @memberof LayoutsApiListLayouts
573
+ */
574
+ readonly expand?: string
575
+
576
+ /**
577
+ * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
578
+ * @type {string}
579
+ * @memberof LayoutsApiListLayouts
580
+ */
581
+ readonly filters?: string
582
+ }
583
+
584
+ /**
585
+ * Request parameters for updateLayout operation in LayoutsApi.
586
+ * @export
587
+ * @interface LayoutsApiUpdateLayoutRequest
588
+ */
589
+ export interface LayoutsApiUpdateLayoutRequest {
590
+ /**
591
+ *
592
+ * @type {number}
593
+ * @memberof LayoutsApiUpdateLayout
594
+ */
595
+ readonly id: number
596
+
597
+ /**
598
+ *
599
+ * @type {UpdateLayoutRequestDto}
600
+ * @memberof LayoutsApiUpdateLayout
601
+ */
602
+ readonly updateLayoutRequestDto: UpdateLayoutRequestDto
603
+
604
+ /**
605
+ * Bearer Token
606
+ * @type {string}
607
+ * @memberof LayoutsApiUpdateLayout
608
+ */
609
+ readonly authorization?: string
610
+ }
611
+
612
+ /**
613
+ * LayoutsApi - object-oriented interface
614
+ * @export
615
+ * @class LayoutsApi
616
+ * @extends {BaseAPI}
617
+ */
618
+ export class LayoutsApi extends BaseAPI {
619
+ /**
620
+ * undefined **Required Permissions** \"notification-management.email-templates.create\"
621
+ * @param {LayoutsApiCreateLayoutRequest} requestParameters Request parameters.
622
+ * @param {*} [options] Override http request option.
623
+ * @throws {RequiredError}
624
+ * @memberof LayoutsApi
625
+ */
626
+ public createLayout(requestParameters: LayoutsApiCreateLayoutRequest, options?: AxiosRequestConfig) {
627
+ return LayoutsApiFp(this.configuration).createLayout(requestParameters.createLayoutRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
628
+ }
629
+
630
+ /**
631
+ * undefined **Required Permissions** \"notification-management.email-templates.delete\"
632
+ * @param {LayoutsApiDeleteLayoutRequest} requestParameters Request parameters.
633
+ * @param {*} [options] Override http request option.
634
+ * @throws {RequiredError}
635
+ * @memberof LayoutsApi
636
+ */
637
+ public deleteLayout(requestParameters: LayoutsApiDeleteLayoutRequest, options?: AxiosRequestConfig) {
638
+ return LayoutsApiFp(this.configuration).deleteLayout(requestParameters.id, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
639
+ }
640
+
641
+ /**
642
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
643
+ * @param {LayoutsApiGetLayoutRequest} requestParameters Request parameters.
644
+ * @param {*} [options] Override http request option.
645
+ * @throws {RequiredError}
646
+ * @memberof LayoutsApi
647
+ */
648
+ public getLayout(requestParameters: LayoutsApiGetLayoutRequest, options?: AxiosRequestConfig) {
649
+ return LayoutsApiFp(this.configuration).getLayout(requestParameters.id, requestParameters.id2, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
650
+ }
651
+
652
+ /**
653
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
654
+ * @param {LayoutsApiListLayoutsRequest} requestParameters Request parameters.
655
+ * @param {*} [options] Override http request option.
656
+ * @throws {RequiredError}
657
+ * @memberof LayoutsApi
658
+ */
659
+ public listLayouts(requestParameters: LayoutsApiListLayoutsRequest = {}, options?: AxiosRequestConfig) {
660
+ return LayoutsApiFp(this.configuration).listLayouts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
661
+ }
662
+
663
+ /**
664
+ * undefined **Required Permissions** \"notification-management.email-templates.update\"
665
+ * @param {LayoutsApiUpdateLayoutRequest} requestParameters Request parameters.
666
+ * @param {*} [options] Override http request option.
667
+ * @throws {RequiredError}
668
+ * @memberof LayoutsApi
669
+ */
670
+ public updateLayout(requestParameters: LayoutsApiUpdateLayoutRequest, options?: AxiosRequestConfig) {
671
+ return LayoutsApiFp(this.configuration).updateLayout(requestParameters.id, requestParameters.updateLayoutRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
672
+ }
673
+ }