@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,687 @@
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 { CreateNotificationTemplateRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateNotificationTemplateResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { GetNotificationTemplateResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { ListNotificationTemplatesResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { UpdateNotificationTemplateRequestDto } from '../models';
33
+ // @ts-ignore
34
+ import { UpdateNotificationTemplateResponseClass } from '../models';
35
+ /**
36
+ * NotificationTemplatesApi - axios parameter creator
37
+ * @export
38
+ */
39
+ export const NotificationTemplatesApiAxiosParamCreator = function (configuration?: Configuration) {
40
+ return {
41
+ /**
42
+ * undefined **Required Permissions** \"notification-management.email-templates.create\"
43
+ * @param {CreateNotificationTemplateRequestDto} createNotificationTemplateRequestDto
44
+ * @param {string} [authorization] Bearer Token
45
+ * @param {*} [options] Override http request option.
46
+ * @throws {RequiredError}
47
+ */
48
+ createNotificationTemplate: async (createNotificationTemplateRequestDto: CreateNotificationTemplateRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
49
+ // verify required parameter 'createNotificationTemplateRequestDto' is not null or undefined
50
+ assertParamExists('createNotificationTemplate', 'createNotificationTemplateRequestDto', createNotificationTemplateRequestDto)
51
+ const localVarPath = `/notificationservice/v1/notification-templates`;
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(createNotificationTemplateRequestDto, 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
+ deleteNotificationTemplate: async (id: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
95
+ // verify required parameter 'id' is not null or undefined
96
+ assertParamExists('deleteNotificationTemplate', 'id', id)
97
+ const localVarPath = `/notificationservice/v1/notification-templates/{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
135
+ * @param {string} [authorization] Bearer Token
136
+ * @param {string} [expand]
137
+ * @param {*} [options] Override http request option.
138
+ * @throws {RequiredError}
139
+ */
140
+ getNotificationTemplate: async (id: number, id2: number, authorization?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
141
+ // verify required parameter 'id' is not null or undefined
142
+ assertParamExists('getNotificationTemplate', 'id', id)
143
+ // verify required parameter 'id2' is not null or undefined
144
+ assertParamExists('getNotificationTemplate', 'id2', id2)
145
+ const localVarPath = `/notificationservice/v1/notification-templates/{id}`
146
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
147
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
148
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
149
+ let baseOptions;
150
+ let baseAccessToken;
151
+ if (configuration) {
152
+ baseOptions = configuration.baseOptions;
153
+ baseAccessToken = configuration.accessToken;
154
+ }
155
+
156
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
157
+ const localVarHeaderParameter = {} as any;
158
+ const localVarQueryParameter = {} as any;
159
+
160
+ // authentication bearer required
161
+ // http bearer authentication required
162
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
163
+
164
+ if (id2 !== undefined) {
165
+ localVarQueryParameter['id'] = id2;
166
+ }
167
+
168
+ if (expand !== undefined) {
169
+ localVarQueryParameter['expand'] = expand;
170
+ }
171
+
172
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
173
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
174
+ }
175
+
176
+
177
+
178
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
179
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
180
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
181
+
182
+ return {
183
+ url: toPathString(localVarUrlObj),
184
+ options: localVarRequestOptions,
185
+ };
186
+ },
187
+ /**
188
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
189
+ * @param {string} [authorization] Bearer Token
190
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
191
+ * @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.
192
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
193
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
194
+ * @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.
195
+ * @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.
196
+ * @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.
197
+ * @param {*} [options] Override http request option.
198
+ * @throws {RequiredError}
199
+ */
200
+ listNotificationTemplates: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
201
+ const localVarPath = `/notificationservice/v1/notification-templates`;
202
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
203
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
204
+ let baseOptions;
205
+ let baseAccessToken;
206
+ if (configuration) {
207
+ baseOptions = configuration.baseOptions;
208
+ baseAccessToken = configuration.accessToken;
209
+ }
210
+
211
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
212
+ const localVarHeaderParameter = {} as any;
213
+ const localVarQueryParameter = {} as any;
214
+
215
+ // authentication bearer required
216
+ // http bearer authentication required
217
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
218
+
219
+ if (pageSize !== undefined) {
220
+ localVarQueryParameter['pageSize'] = pageSize;
221
+ }
222
+
223
+ if (pageToken !== undefined) {
224
+ localVarQueryParameter['pageToken'] = pageToken;
225
+ }
226
+
227
+ if (filter !== undefined) {
228
+ localVarQueryParameter['filter'] = filter;
229
+ }
230
+
231
+ if (search !== undefined) {
232
+ localVarQueryParameter['search'] = search;
233
+ }
234
+
235
+ if (order !== undefined) {
236
+ localVarQueryParameter['order'] = order;
237
+ }
238
+
239
+ if (expand !== undefined) {
240
+ localVarQueryParameter['expand'] = expand;
241
+ }
242
+
243
+ if (filters !== undefined) {
244
+ localVarQueryParameter['filters'] = filters;
245
+ }
246
+
247
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
248
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
249
+ }
250
+
251
+
252
+
253
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
254
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
255
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
256
+
257
+ return {
258
+ url: toPathString(localVarUrlObj),
259
+ options: localVarRequestOptions,
260
+ };
261
+ },
262
+ /**
263
+ * undefined **Required Permissions** \"notification-management.email-templates.update\"
264
+ * @param {number} id
265
+ * @param {UpdateNotificationTemplateRequestDto} updateNotificationTemplateRequestDto
266
+ * @param {string} [authorization] Bearer Token
267
+ * @param {*} [options] Override http request option.
268
+ * @throws {RequiredError}
269
+ */
270
+ updateNotificationTemplate: async (id: number, updateNotificationTemplateRequestDto: UpdateNotificationTemplateRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
271
+ // verify required parameter 'id' is not null or undefined
272
+ assertParamExists('updateNotificationTemplate', 'id', id)
273
+ // verify required parameter 'updateNotificationTemplateRequestDto' is not null or undefined
274
+ assertParamExists('updateNotificationTemplate', 'updateNotificationTemplateRequestDto', updateNotificationTemplateRequestDto)
275
+ const localVarPath = `/notificationservice/v1/notification-templates/{id}`
276
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
277
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
278
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
279
+ let baseOptions;
280
+ let baseAccessToken;
281
+ if (configuration) {
282
+ baseOptions = configuration.baseOptions;
283
+ baseAccessToken = configuration.accessToken;
284
+ }
285
+
286
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
287
+ const localVarHeaderParameter = {} as any;
288
+ const localVarQueryParameter = {} as any;
289
+
290
+ // authentication bearer required
291
+ // http bearer authentication required
292
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
293
+
294
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
295
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
296
+ }
297
+
298
+
299
+
300
+ localVarHeaderParameter['Content-Type'] = 'application/json';
301
+
302
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
303
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
304
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
305
+ localVarRequestOptions.data = serializeDataIfNeeded(updateNotificationTemplateRequestDto, localVarRequestOptions, configuration)
306
+
307
+ return {
308
+ url: toPathString(localVarUrlObj),
309
+ options: localVarRequestOptions,
310
+ };
311
+ },
312
+ }
313
+ };
314
+
315
+ /**
316
+ * NotificationTemplatesApi - functional programming interface
317
+ * @export
318
+ */
319
+ export const NotificationTemplatesApiFp = function(configuration?: Configuration) {
320
+ const localVarAxiosParamCreator = NotificationTemplatesApiAxiosParamCreator(configuration)
321
+ return {
322
+ /**
323
+ * undefined **Required Permissions** \"notification-management.email-templates.create\"
324
+ * @param {CreateNotificationTemplateRequestDto} createNotificationTemplateRequestDto
325
+ * @param {string} [authorization] Bearer Token
326
+ * @param {*} [options] Override http request option.
327
+ * @throws {RequiredError}
328
+ */
329
+ async createNotificationTemplate(createNotificationTemplateRequestDto: CreateNotificationTemplateRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateNotificationTemplateResponseClass>> {
330
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createNotificationTemplate(createNotificationTemplateRequestDto, authorization, options);
331
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
332
+ },
333
+ /**
334
+ * undefined **Required Permissions** \"notification-management.email-templates.delete\"
335
+ * @param {number} id
336
+ * @param {string} [authorization] Bearer Token
337
+ * @param {*} [options] Override http request option.
338
+ * @throws {RequiredError}
339
+ */
340
+ async deleteNotificationTemplate(id: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
341
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteNotificationTemplate(id, authorization, options);
342
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
343
+ },
344
+ /**
345
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
346
+ * @param {number} id
347
+ * @param {number} id2
348
+ * @param {string} [authorization] Bearer Token
349
+ * @param {string} [expand]
350
+ * @param {*} [options] Override http request option.
351
+ * @throws {RequiredError}
352
+ */
353
+ async getNotificationTemplate(id: number, id2: number, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetNotificationTemplateResponseClass>> {
354
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getNotificationTemplate(id, id2, authorization, expand, options);
355
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
356
+ },
357
+ /**
358
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
359
+ * @param {string} [authorization] Bearer Token
360
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
361
+ * @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.
362
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
363
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
364
+ * @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.
365
+ * @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.
366
+ * @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.
367
+ * @param {*} [options] Override http request option.
368
+ * @throws {RequiredError}
369
+ */
370
+ async listNotificationTemplates(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListNotificationTemplatesResponseClass>> {
371
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listNotificationTemplates(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
372
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
373
+ },
374
+ /**
375
+ * undefined **Required Permissions** \"notification-management.email-templates.update\"
376
+ * @param {number} id
377
+ * @param {UpdateNotificationTemplateRequestDto} updateNotificationTemplateRequestDto
378
+ * @param {string} [authorization] Bearer Token
379
+ * @param {*} [options] Override http request option.
380
+ * @throws {RequiredError}
381
+ */
382
+ async updateNotificationTemplate(id: number, updateNotificationTemplateRequestDto: UpdateNotificationTemplateRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateNotificationTemplateResponseClass>> {
383
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateNotificationTemplate(id, updateNotificationTemplateRequestDto, authorization, options);
384
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
385
+ },
386
+ }
387
+ };
388
+
389
+ /**
390
+ * NotificationTemplatesApi - factory interface
391
+ * @export
392
+ */
393
+ export const NotificationTemplatesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
394
+ const localVarFp = NotificationTemplatesApiFp(configuration)
395
+ return {
396
+ /**
397
+ * undefined **Required Permissions** \"notification-management.email-templates.create\"
398
+ * @param {CreateNotificationTemplateRequestDto} createNotificationTemplateRequestDto
399
+ * @param {string} [authorization] Bearer Token
400
+ * @param {*} [options] Override http request option.
401
+ * @throws {RequiredError}
402
+ */
403
+ createNotificationTemplate(createNotificationTemplateRequestDto: CreateNotificationTemplateRequestDto, authorization?: string, options?: any): AxiosPromise<CreateNotificationTemplateResponseClass> {
404
+ return localVarFp.createNotificationTemplate(createNotificationTemplateRequestDto, authorization, options).then((request) => request(axios, basePath));
405
+ },
406
+ /**
407
+ * undefined **Required Permissions** \"notification-management.email-templates.delete\"
408
+ * @param {number} id
409
+ * @param {string} [authorization] Bearer Token
410
+ * @param {*} [options] Override http request option.
411
+ * @throws {RequiredError}
412
+ */
413
+ deleteNotificationTemplate(id: number, authorization?: string, options?: any): AxiosPromise<object> {
414
+ return localVarFp.deleteNotificationTemplate(id, authorization, options).then((request) => request(axios, basePath));
415
+ },
416
+ /**
417
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
418
+ * @param {number} id
419
+ * @param {number} id2
420
+ * @param {string} [authorization] Bearer Token
421
+ * @param {string} [expand]
422
+ * @param {*} [options] Override http request option.
423
+ * @throws {RequiredError}
424
+ */
425
+ getNotificationTemplate(id: number, id2: number, authorization?: string, expand?: string, options?: any): AxiosPromise<GetNotificationTemplateResponseClass> {
426
+ return localVarFp.getNotificationTemplate(id, id2, authorization, expand, options).then((request) => request(axios, basePath));
427
+ },
428
+ /**
429
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
430
+ * @param {string} [authorization] Bearer Token
431
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
432
+ * @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.
433
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
434
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
435
+ * @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.
436
+ * @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.
437
+ * @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.
438
+ * @param {*} [options] Override http request option.
439
+ * @throws {RequiredError}
440
+ */
441
+ listNotificationTemplates(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListNotificationTemplatesResponseClass> {
442
+ return localVarFp.listNotificationTemplates(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
443
+ },
444
+ /**
445
+ * undefined **Required Permissions** \"notification-management.email-templates.update\"
446
+ * @param {number} id
447
+ * @param {UpdateNotificationTemplateRequestDto} updateNotificationTemplateRequestDto
448
+ * @param {string} [authorization] Bearer Token
449
+ * @param {*} [options] Override http request option.
450
+ * @throws {RequiredError}
451
+ */
452
+ updateNotificationTemplate(id: number, updateNotificationTemplateRequestDto: UpdateNotificationTemplateRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateNotificationTemplateResponseClass> {
453
+ return localVarFp.updateNotificationTemplate(id, updateNotificationTemplateRequestDto, authorization, options).then((request) => request(axios, basePath));
454
+ },
455
+ };
456
+ };
457
+
458
+ /**
459
+ * Request parameters for createNotificationTemplate operation in NotificationTemplatesApi.
460
+ * @export
461
+ * @interface NotificationTemplatesApiCreateNotificationTemplateRequest
462
+ */
463
+ export interface NotificationTemplatesApiCreateNotificationTemplateRequest {
464
+ /**
465
+ *
466
+ * @type {CreateNotificationTemplateRequestDto}
467
+ * @memberof NotificationTemplatesApiCreateNotificationTemplate
468
+ */
469
+ readonly createNotificationTemplateRequestDto: CreateNotificationTemplateRequestDto
470
+
471
+ /**
472
+ * Bearer Token
473
+ * @type {string}
474
+ * @memberof NotificationTemplatesApiCreateNotificationTemplate
475
+ */
476
+ readonly authorization?: string
477
+ }
478
+
479
+ /**
480
+ * Request parameters for deleteNotificationTemplate operation in NotificationTemplatesApi.
481
+ * @export
482
+ * @interface NotificationTemplatesApiDeleteNotificationTemplateRequest
483
+ */
484
+ export interface NotificationTemplatesApiDeleteNotificationTemplateRequest {
485
+ /**
486
+ *
487
+ * @type {number}
488
+ * @memberof NotificationTemplatesApiDeleteNotificationTemplate
489
+ */
490
+ readonly id: number
491
+
492
+ /**
493
+ * Bearer Token
494
+ * @type {string}
495
+ * @memberof NotificationTemplatesApiDeleteNotificationTemplate
496
+ */
497
+ readonly authorization?: string
498
+ }
499
+
500
+ /**
501
+ * Request parameters for getNotificationTemplate operation in NotificationTemplatesApi.
502
+ * @export
503
+ * @interface NotificationTemplatesApiGetNotificationTemplateRequest
504
+ */
505
+ export interface NotificationTemplatesApiGetNotificationTemplateRequest {
506
+ /**
507
+ *
508
+ * @type {number}
509
+ * @memberof NotificationTemplatesApiGetNotificationTemplate
510
+ */
511
+ readonly id: number
512
+
513
+ /**
514
+ *
515
+ * @type {number}
516
+ * @memberof NotificationTemplatesApiGetNotificationTemplate
517
+ */
518
+ readonly id2: number
519
+
520
+ /**
521
+ * Bearer Token
522
+ * @type {string}
523
+ * @memberof NotificationTemplatesApiGetNotificationTemplate
524
+ */
525
+ readonly authorization?: string
526
+
527
+ /**
528
+ *
529
+ * @type {string}
530
+ * @memberof NotificationTemplatesApiGetNotificationTemplate
531
+ */
532
+ readonly expand?: string
533
+ }
534
+
535
+ /**
536
+ * Request parameters for listNotificationTemplates operation in NotificationTemplatesApi.
537
+ * @export
538
+ * @interface NotificationTemplatesApiListNotificationTemplatesRequest
539
+ */
540
+ export interface NotificationTemplatesApiListNotificationTemplatesRequest {
541
+ /**
542
+ * Bearer Token
543
+ * @type {string}
544
+ * @memberof NotificationTemplatesApiListNotificationTemplates
545
+ */
546
+ readonly authorization?: string
547
+
548
+ /**
549
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
550
+ * @type {number}
551
+ * @memberof NotificationTemplatesApiListNotificationTemplates
552
+ */
553
+ readonly pageSize?: number
554
+
555
+ /**
556
+ * 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.
557
+ * @type {string}
558
+ * @memberof NotificationTemplatesApiListNotificationTemplates
559
+ */
560
+ readonly pageToken?: string
561
+
562
+ /**
563
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
564
+ * @type {string}
565
+ * @memberof NotificationTemplatesApiListNotificationTemplates
566
+ */
567
+ readonly filter?: string
568
+
569
+ /**
570
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
571
+ * @type {string}
572
+ * @memberof NotificationTemplatesApiListNotificationTemplates
573
+ */
574
+ readonly search?: string
575
+
576
+ /**
577
+ * 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.
578
+ * @type {string}
579
+ * @memberof NotificationTemplatesApiListNotificationTemplates
580
+ */
581
+ readonly order?: string
582
+
583
+ /**
584
+ * 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.
585
+ * @type {string}
586
+ * @memberof NotificationTemplatesApiListNotificationTemplates
587
+ */
588
+ readonly expand?: string
589
+
590
+ /**
591
+ * 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.
592
+ * @type {string}
593
+ * @memberof NotificationTemplatesApiListNotificationTemplates
594
+ */
595
+ readonly filters?: string
596
+ }
597
+
598
+ /**
599
+ * Request parameters for updateNotificationTemplate operation in NotificationTemplatesApi.
600
+ * @export
601
+ * @interface NotificationTemplatesApiUpdateNotificationTemplateRequest
602
+ */
603
+ export interface NotificationTemplatesApiUpdateNotificationTemplateRequest {
604
+ /**
605
+ *
606
+ * @type {number}
607
+ * @memberof NotificationTemplatesApiUpdateNotificationTemplate
608
+ */
609
+ readonly id: number
610
+
611
+ /**
612
+ *
613
+ * @type {UpdateNotificationTemplateRequestDto}
614
+ * @memberof NotificationTemplatesApiUpdateNotificationTemplate
615
+ */
616
+ readonly updateNotificationTemplateRequestDto: UpdateNotificationTemplateRequestDto
617
+
618
+ /**
619
+ * Bearer Token
620
+ * @type {string}
621
+ * @memberof NotificationTemplatesApiUpdateNotificationTemplate
622
+ */
623
+ readonly authorization?: string
624
+ }
625
+
626
+ /**
627
+ * NotificationTemplatesApi - object-oriented interface
628
+ * @export
629
+ * @class NotificationTemplatesApi
630
+ * @extends {BaseAPI}
631
+ */
632
+ export class NotificationTemplatesApi extends BaseAPI {
633
+ /**
634
+ * undefined **Required Permissions** \"notification-management.email-templates.create\"
635
+ * @param {NotificationTemplatesApiCreateNotificationTemplateRequest} requestParameters Request parameters.
636
+ * @param {*} [options] Override http request option.
637
+ * @throws {RequiredError}
638
+ * @memberof NotificationTemplatesApi
639
+ */
640
+ public createNotificationTemplate(requestParameters: NotificationTemplatesApiCreateNotificationTemplateRequest, options?: AxiosRequestConfig) {
641
+ return NotificationTemplatesApiFp(this.configuration).createNotificationTemplate(requestParameters.createNotificationTemplateRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
642
+ }
643
+
644
+ /**
645
+ * undefined **Required Permissions** \"notification-management.email-templates.delete\"
646
+ * @param {NotificationTemplatesApiDeleteNotificationTemplateRequest} requestParameters Request parameters.
647
+ * @param {*} [options] Override http request option.
648
+ * @throws {RequiredError}
649
+ * @memberof NotificationTemplatesApi
650
+ */
651
+ public deleteNotificationTemplate(requestParameters: NotificationTemplatesApiDeleteNotificationTemplateRequest, options?: AxiosRequestConfig) {
652
+ return NotificationTemplatesApiFp(this.configuration).deleteNotificationTemplate(requestParameters.id, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
653
+ }
654
+
655
+ /**
656
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
657
+ * @param {NotificationTemplatesApiGetNotificationTemplateRequest} requestParameters Request parameters.
658
+ * @param {*} [options] Override http request option.
659
+ * @throws {RequiredError}
660
+ * @memberof NotificationTemplatesApi
661
+ */
662
+ public getNotificationTemplate(requestParameters: NotificationTemplatesApiGetNotificationTemplateRequest, options?: AxiosRequestConfig) {
663
+ return NotificationTemplatesApiFp(this.configuration).getNotificationTemplate(requestParameters.id, requestParameters.id2, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
664
+ }
665
+
666
+ /**
667
+ * undefined **Required Permissions** \"notification-management.email-templates.view\"
668
+ * @param {NotificationTemplatesApiListNotificationTemplatesRequest} requestParameters Request parameters.
669
+ * @param {*} [options] Override http request option.
670
+ * @throws {RequiredError}
671
+ * @memberof NotificationTemplatesApi
672
+ */
673
+ public listNotificationTemplates(requestParameters: NotificationTemplatesApiListNotificationTemplatesRequest = {}, options?: AxiosRequestConfig) {
674
+ return NotificationTemplatesApiFp(this.configuration).listNotificationTemplates(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
675
+ }
676
+
677
+ /**
678
+ * undefined **Required Permissions** \"notification-management.email-templates.update\"
679
+ * @param {NotificationTemplatesApiUpdateNotificationTemplateRequest} requestParameters Request parameters.
680
+ * @param {*} [options] Override http request option.
681
+ * @throws {RequiredError}
682
+ * @memberof NotificationTemplatesApi
683
+ */
684
+ public updateNotificationTemplate(requestParameters: NotificationTemplatesApiUpdateNotificationTemplateRequest, options?: AxiosRequestConfig) {
685
+ return NotificationTemplatesApiFp(this.configuration).updateNotificationTemplate(requestParameters.id, requestParameters.updateNotificationTemplateRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
686
+ }
687
+ }