tuix-email-service-client 0.2.0 → 0.4.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.
- package/.openapi-generator/VERSION +1 -1
- package/apis/ClientApi.js +192 -80
- package/apis/ClientApi.js.map +1 -1
- package/apis/ClientApi.ts +208 -80
- package/docs/ClientApi.md +1 -1
- package/package.json +1 -1
- package/runtime.js +15 -0
- package/runtime.js.map +1 -1
- package/runtime.ts +18 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
7.
|
|
1
|
+
7.21.0
|
package/apis/ClientApi.js
CHANGED
|
@@ -54,10 +54,9 @@ const index_1 = require("../models/index");
|
|
|
54
54
|
*/
|
|
55
55
|
class ClientApi extends runtime.BaseAPI {
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
58
|
-
* Get all API keys for the authenticated user
|
|
57
|
+
* Creates request options for apiKeysGet without sending the request
|
|
59
58
|
*/
|
|
60
|
-
async
|
|
59
|
+
async apiKeysGetRequestOpts(requestParameters) {
|
|
61
60
|
const queryParameters = {};
|
|
62
61
|
if (requestParameters['page'] != null) {
|
|
63
62
|
queryParameters['page'] = requestParameters['page'];
|
|
@@ -67,12 +66,20 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
67
66
|
}
|
|
68
67
|
const headerParameters = {};
|
|
69
68
|
let urlPath = `/api-keys`;
|
|
70
|
-
|
|
69
|
+
return {
|
|
71
70
|
path: urlPath,
|
|
72
71
|
method: 'GET',
|
|
73
72
|
headers: headerParameters,
|
|
74
73
|
query: queryParameters,
|
|
75
|
-
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Retrieve all API keys associated with the authenticated user\'s account with pagination.
|
|
78
|
+
* Get all API keys for the authenticated user
|
|
79
|
+
*/
|
|
80
|
+
async apiKeysGetRaw(requestParameters, initOverrides) {
|
|
81
|
+
const requestOptions = await this.apiKeysGetRequestOpts(requestParameters);
|
|
82
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
76
83
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetAPIKeysResponseDTOFromJSON)(jsonValue));
|
|
77
84
|
}
|
|
78
85
|
/**
|
|
@@ -84,10 +91,9 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
84
91
|
return await response.value();
|
|
85
92
|
}
|
|
86
93
|
/**
|
|
87
|
-
*
|
|
88
|
-
* Delete an API key
|
|
94
|
+
* Creates request options for apiKeysIdDelete without sending the request
|
|
89
95
|
*/
|
|
90
|
-
async
|
|
96
|
+
async apiKeysIdDeleteRequestOpts(requestParameters) {
|
|
91
97
|
if (requestParameters['id'] == null) {
|
|
92
98
|
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiKeysIdDelete().');
|
|
93
99
|
}
|
|
@@ -95,12 +101,20 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
95
101
|
const headerParameters = {};
|
|
96
102
|
let urlPath = `/api-keys/{id}`;
|
|
97
103
|
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
98
|
-
|
|
104
|
+
return {
|
|
99
105
|
path: urlPath,
|
|
100
106
|
method: 'DELETE',
|
|
101
107
|
headers: headerParameters,
|
|
102
108
|
query: queryParameters,
|
|
103
|
-
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Delete a specific API key belonging to the authenticated user.
|
|
113
|
+
* Delete an API key
|
|
114
|
+
*/
|
|
115
|
+
async apiKeysIdDeleteRaw(requestParameters, initOverrides) {
|
|
116
|
+
const requestOptions = await this.apiKeysIdDeleteRequestOpts(requestParameters);
|
|
117
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
104
118
|
return new runtime.VoidApiResponse(response);
|
|
105
119
|
}
|
|
106
120
|
/**
|
|
@@ -111,10 +125,9 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
111
125
|
await this.apiKeysIdDeleteRaw(requestParameters, initOverrides);
|
|
112
126
|
}
|
|
113
127
|
/**
|
|
114
|
-
*
|
|
115
|
-
* Create a new API key
|
|
128
|
+
* Creates request options for apiKeysPost without sending the request
|
|
116
129
|
*/
|
|
117
|
-
async
|
|
130
|
+
async apiKeysPostRequestOpts(requestParameters) {
|
|
118
131
|
if (requestParameters['createAPIKeyRequestDTO'] == null) {
|
|
119
132
|
throw new runtime.RequiredError('createAPIKeyRequestDTO', 'Required parameter "createAPIKeyRequestDTO" was null or undefined when calling apiKeysPost().');
|
|
120
133
|
}
|
|
@@ -122,13 +135,21 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
122
135
|
const headerParameters = {};
|
|
123
136
|
headerParameters['Content-Type'] = 'application/json';
|
|
124
137
|
let urlPath = `/api-keys`;
|
|
125
|
-
|
|
138
|
+
return {
|
|
126
139
|
path: urlPath,
|
|
127
140
|
method: 'POST',
|
|
128
141
|
headers: headerParameters,
|
|
129
142
|
query: queryParameters,
|
|
130
143
|
body: (0, index_1.CreateAPIKeyRequestDTOToJSON)(requestParameters['createAPIKeyRequestDTO']),
|
|
131
|
-
}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Create a new API key for accessing the RAG service.
|
|
148
|
+
* Create a new API key
|
|
149
|
+
*/
|
|
150
|
+
async apiKeysPostRaw(requestParameters, initOverrides) {
|
|
151
|
+
const requestOptions = await this.apiKeysPostRequestOpts(requestParameters);
|
|
152
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
132
153
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateAPIKeyResponseDTOFromJSON)(jsonValue));
|
|
133
154
|
}
|
|
134
155
|
/**
|
|
@@ -140,10 +161,9 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
140
161
|
return await response.value();
|
|
141
162
|
}
|
|
142
163
|
/**
|
|
143
|
-
*
|
|
144
|
-
* Send an email
|
|
164
|
+
* Creates request options for apiSendEmail without sending the request
|
|
145
165
|
*/
|
|
146
|
-
async
|
|
166
|
+
async apiSendEmailRequestOpts(requestParameters) {
|
|
147
167
|
if (requestParameters['applicationId'] == null) {
|
|
148
168
|
throw new runtime.RequiredError('applicationId', 'Required parameter "applicationId" was null or undefined when calling apiSendEmail().');
|
|
149
169
|
}
|
|
@@ -199,13 +219,21 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
199
219
|
}
|
|
200
220
|
let urlPath = `/api/applications/{applicationId}/emails/send`;
|
|
201
221
|
urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
|
|
202
|
-
|
|
222
|
+
return {
|
|
203
223
|
path: urlPath,
|
|
204
224
|
method: 'POST',
|
|
205
225
|
headers: headerParameters,
|
|
206
226
|
query: queryParameters,
|
|
207
227
|
body: formParams,
|
|
208
|
-
}
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Send an email
|
|
232
|
+
* Send an email
|
|
233
|
+
*/
|
|
234
|
+
async apiSendEmailRaw(requestParameters, initOverrides) {
|
|
235
|
+
const requestOptions = await this.apiSendEmailRequestOpts(requestParameters);
|
|
236
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
209
237
|
return new runtime.VoidApiResponse(response);
|
|
210
238
|
}
|
|
211
239
|
/**
|
|
@@ -216,10 +244,9 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
216
244
|
await this.apiSendEmailRaw(requestParameters, initOverrides);
|
|
217
245
|
}
|
|
218
246
|
/**
|
|
219
|
-
*
|
|
220
|
-
* Creates a new account
|
|
247
|
+
* Creates request options for createAccount without sending the request
|
|
221
248
|
*/
|
|
222
|
-
async
|
|
249
|
+
async createAccountRequestOpts(requestParameters) {
|
|
223
250
|
if (requestParameters['createAccountDTO'] == null) {
|
|
224
251
|
throw new runtime.RequiredError('createAccountDTO', 'Required parameter "createAccountDTO" was null or undefined when calling createAccount().');
|
|
225
252
|
}
|
|
@@ -227,13 +254,21 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
227
254
|
const headerParameters = {};
|
|
228
255
|
headerParameters['Content-Type'] = 'application/json';
|
|
229
256
|
let urlPath = `/accounts`;
|
|
230
|
-
|
|
257
|
+
return {
|
|
231
258
|
path: urlPath,
|
|
232
259
|
method: 'POST',
|
|
233
260
|
headers: headerParameters,
|
|
234
261
|
query: queryParameters,
|
|
235
262
|
body: (0, index_1.CreateAccountDTOToJSON)(requestParameters['createAccountDTO']),
|
|
236
|
-
}
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Create an account
|
|
267
|
+
* Creates a new account
|
|
268
|
+
*/
|
|
269
|
+
async createAccountRaw(requestParameters, initOverrides) {
|
|
270
|
+
const requestOptions = await this.createAccountRequestOpts(requestParameters);
|
|
271
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
237
272
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AccountDTOFromJSON)(jsonValue));
|
|
238
273
|
}
|
|
239
274
|
/**
|
|
@@ -245,10 +280,9 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
245
280
|
return await response.value();
|
|
246
281
|
}
|
|
247
282
|
/**
|
|
248
|
-
*
|
|
249
|
-
* Create a new application
|
|
283
|
+
* Creates request options for createApplication without sending the request
|
|
250
284
|
*/
|
|
251
|
-
async
|
|
285
|
+
async createApplicationRequestOpts(requestParameters) {
|
|
252
286
|
if (requestParameters['createApplicationDTO'] == null) {
|
|
253
287
|
throw new runtime.RequiredError('createApplicationDTO', 'Required parameter "createApplicationDTO" was null or undefined when calling createApplication().');
|
|
254
288
|
}
|
|
@@ -256,13 +290,21 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
256
290
|
const headerParameters = {};
|
|
257
291
|
headerParameters['Content-Type'] = 'application/json';
|
|
258
292
|
let urlPath = `/applications`;
|
|
259
|
-
|
|
293
|
+
return {
|
|
260
294
|
path: urlPath,
|
|
261
295
|
method: 'POST',
|
|
262
296
|
headers: headerParameters,
|
|
263
297
|
query: queryParameters,
|
|
264
298
|
body: (0, index_1.CreateApplicationDTOToJSON)(requestParameters['createApplicationDTO']),
|
|
265
|
-
}
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Create a new application for the authenticated account
|
|
303
|
+
* Create a new application
|
|
304
|
+
*/
|
|
305
|
+
async createApplicationRaw(requestParameters, initOverrides) {
|
|
306
|
+
const requestOptions = await this.createApplicationRequestOpts(requestParameters);
|
|
307
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
266
308
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ApplicationDTOFromJSON)(jsonValue));
|
|
267
309
|
}
|
|
268
310
|
/**
|
|
@@ -274,10 +316,9 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
274
316
|
return await response.value();
|
|
275
317
|
}
|
|
276
318
|
/**
|
|
277
|
-
*
|
|
278
|
-
* Delete an application
|
|
319
|
+
* Creates request options for deleteApplication without sending the request
|
|
279
320
|
*/
|
|
280
|
-
async
|
|
321
|
+
async deleteApplicationRequestOpts(requestParameters) {
|
|
281
322
|
if (requestParameters['applicationId'] == null) {
|
|
282
323
|
throw new runtime.RequiredError('applicationId', 'Required parameter "applicationId" was null or undefined when calling deleteApplication().');
|
|
283
324
|
}
|
|
@@ -285,12 +326,20 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
285
326
|
const headerParameters = {};
|
|
286
327
|
let urlPath = `/applications/{applicationId}`;
|
|
287
328
|
urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
|
|
288
|
-
|
|
329
|
+
return {
|
|
289
330
|
path: urlPath,
|
|
290
331
|
method: 'DELETE',
|
|
291
332
|
headers: headerParameters,
|
|
292
333
|
query: queryParameters,
|
|
293
|
-
}
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Delete an application belonging to the authenticated account
|
|
338
|
+
* Delete an application
|
|
339
|
+
*/
|
|
340
|
+
async deleteApplicationRaw(requestParameters, initOverrides) {
|
|
341
|
+
const requestOptions = await this.deleteApplicationRequestOpts(requestParameters);
|
|
342
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
294
343
|
return new runtime.VoidApiResponse(response);
|
|
295
344
|
}
|
|
296
345
|
/**
|
|
@@ -301,10 +350,9 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
301
350
|
await this.deleteApplicationRaw(requestParameters, initOverrides);
|
|
302
351
|
}
|
|
303
352
|
/**
|
|
304
|
-
*
|
|
305
|
-
* Delete an template
|
|
353
|
+
* Creates request options for deleteTemplate without sending the request
|
|
306
354
|
*/
|
|
307
|
-
async
|
|
355
|
+
async deleteTemplateRequestOpts(requestParameters) {
|
|
308
356
|
if (requestParameters['id'] == null) {
|
|
309
357
|
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteTemplate().');
|
|
310
358
|
}
|
|
@@ -316,12 +364,20 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
316
364
|
let urlPath = `/applications/{applicationId}/templates/{id}`;
|
|
317
365
|
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
318
366
|
urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
|
|
319
|
-
|
|
367
|
+
return {
|
|
320
368
|
path: urlPath,
|
|
321
369
|
method: 'DELETE',
|
|
322
370
|
headers: headerParameters,
|
|
323
371
|
query: queryParameters,
|
|
324
|
-
}
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Delete an template
|
|
376
|
+
* Delete an template
|
|
377
|
+
*/
|
|
378
|
+
async deleteTemplateRaw(requestParameters, initOverrides) {
|
|
379
|
+
const requestOptions = await this.deleteTemplateRequestOpts(requestParameters);
|
|
380
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
325
381
|
return new runtime.VoidApiResponse(response);
|
|
326
382
|
}
|
|
327
383
|
/**
|
|
@@ -332,10 +388,9 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
332
388
|
await this.deleteTemplateRaw(requestParameters, initOverrides);
|
|
333
389
|
}
|
|
334
390
|
/**
|
|
335
|
-
*
|
|
336
|
-
* Get an application by applicationId
|
|
391
|
+
* Creates request options for getApplicationByID without sending the request
|
|
337
392
|
*/
|
|
338
|
-
async
|
|
393
|
+
async getApplicationByIDRequestOpts(requestParameters) {
|
|
339
394
|
if (requestParameters['applicationId'] == null) {
|
|
340
395
|
throw new runtime.RequiredError('applicationId', 'Required parameter "applicationId" was null or undefined when calling getApplicationByID().');
|
|
341
396
|
}
|
|
@@ -343,12 +398,20 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
343
398
|
const headerParameters = {};
|
|
344
399
|
let urlPath = `/applications/{applicationId}`;
|
|
345
400
|
urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
|
|
346
|
-
|
|
401
|
+
return {
|
|
347
402
|
path: urlPath,
|
|
348
403
|
method: 'GET',
|
|
349
404
|
headers: headerParameters,
|
|
350
405
|
query: queryParameters,
|
|
351
|
-
}
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Get a specific application belonging to the authenticated account
|
|
410
|
+
* Get an application by applicationId
|
|
411
|
+
*/
|
|
412
|
+
async getApplicationByIDRaw(requestParameters, initOverrides) {
|
|
413
|
+
const requestOptions = await this.getApplicationByIDRequestOpts(requestParameters);
|
|
414
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
352
415
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ApplicationDTOFromJSON)(jsonValue));
|
|
353
416
|
}
|
|
354
417
|
/**
|
|
@@ -360,10 +423,9 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
360
423
|
return await response.value();
|
|
361
424
|
}
|
|
362
425
|
/**
|
|
363
|
-
*
|
|
364
|
-
* Get all applications for the account
|
|
426
|
+
* Creates request options for getApplications without sending the request
|
|
365
427
|
*/
|
|
366
|
-
async
|
|
428
|
+
async getApplicationsRequestOpts(requestParameters) {
|
|
367
429
|
const queryParameters = {};
|
|
368
430
|
if (requestParameters['page'] != null) {
|
|
369
431
|
queryParameters['page'] = requestParameters['page'];
|
|
@@ -373,12 +435,20 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
373
435
|
}
|
|
374
436
|
const headerParameters = {};
|
|
375
437
|
let urlPath = `/applications`;
|
|
376
|
-
|
|
438
|
+
return {
|
|
377
439
|
path: urlPath,
|
|
378
440
|
method: 'GET',
|
|
379
441
|
headers: headerParameters,
|
|
380
442
|
query: queryParameters,
|
|
381
|
-
}
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Get all applications belonging to the authenticated account
|
|
447
|
+
* Get all applications for the account
|
|
448
|
+
*/
|
|
449
|
+
async getApplicationsRaw(requestParameters, initOverrides) {
|
|
450
|
+
const requestOptions = await this.getApplicationsRequestOpts(requestParameters);
|
|
451
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
382
452
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedApplicationsDTOFromJSON)(jsonValue));
|
|
383
453
|
}
|
|
384
454
|
/**
|
|
@@ -390,10 +460,9 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
390
460
|
return await response.value();
|
|
391
461
|
}
|
|
392
462
|
/**
|
|
393
|
-
*
|
|
394
|
-
* Return a template
|
|
463
|
+
* Creates request options for getTemplate without sending the request
|
|
395
464
|
*/
|
|
396
|
-
async
|
|
465
|
+
async getTemplateRequestOpts(requestParameters) {
|
|
397
466
|
if (requestParameters['id'] == null) {
|
|
398
467
|
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getTemplate().');
|
|
399
468
|
}
|
|
@@ -405,12 +474,20 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
405
474
|
let urlPath = `/applications/{applicationId}/templates/{id}`;
|
|
406
475
|
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
407
476
|
urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
|
|
408
|
-
|
|
477
|
+
return {
|
|
409
478
|
path: urlPath,
|
|
410
479
|
method: 'GET',
|
|
411
480
|
headers: headerParameters,
|
|
412
481
|
query: queryParameters,
|
|
413
|
-
}
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* Return a template
|
|
486
|
+
* Return a template
|
|
487
|
+
*/
|
|
488
|
+
async getTemplateRaw(requestParameters, initOverrides) {
|
|
489
|
+
const requestOptions = await this.getTemplateRequestOpts(requestParameters);
|
|
490
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
414
491
|
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
415
492
|
return new runtime.JSONApiResponse(response);
|
|
416
493
|
}
|
|
@@ -427,10 +504,9 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
427
504
|
return await response.value();
|
|
428
505
|
}
|
|
429
506
|
/**
|
|
430
|
-
*
|
|
431
|
-
* Return all templates
|
|
507
|
+
* Creates request options for getTemplates without sending the request
|
|
432
508
|
*/
|
|
433
|
-
async
|
|
509
|
+
async getTemplatesRequestOpts(requestParameters) {
|
|
434
510
|
if (requestParameters['applicationId'] == null) {
|
|
435
511
|
throw new runtime.RequiredError('applicationId', 'Required parameter "applicationId" was null or undefined when calling getTemplates().');
|
|
436
512
|
}
|
|
@@ -444,12 +520,20 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
444
520
|
const headerParameters = {};
|
|
445
521
|
let urlPath = `/applications/{applicationId}/templates`;
|
|
446
522
|
urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
|
|
447
|
-
|
|
523
|
+
return {
|
|
448
524
|
path: urlPath,
|
|
449
525
|
method: 'GET',
|
|
450
526
|
headers: headerParameters,
|
|
451
527
|
query: queryParameters,
|
|
452
|
-
}
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Return all templates
|
|
532
|
+
* Return all templates
|
|
533
|
+
*/
|
|
534
|
+
async getTemplatesRaw(requestParameters, initOverrides) {
|
|
535
|
+
const requestOptions = await this.getTemplatesRequestOpts(requestParameters);
|
|
536
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
453
537
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedEmailTemplateDTOFromJSON)(jsonValue));
|
|
454
538
|
}
|
|
455
539
|
/**
|
|
@@ -461,10 +545,9 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
461
545
|
return await response.value();
|
|
462
546
|
}
|
|
463
547
|
/**
|
|
464
|
-
*
|
|
465
|
-
* Send an email
|
|
548
|
+
* Creates request options for sendEmail without sending the request
|
|
466
549
|
*/
|
|
467
|
-
async
|
|
550
|
+
async sendEmailRequestOpts(requestParameters) {
|
|
468
551
|
if (requestParameters['applicationId'] == null) {
|
|
469
552
|
throw new runtime.RequiredError('applicationId', 'Required parameter "applicationId" was null or undefined when calling sendEmail().');
|
|
470
553
|
}
|
|
@@ -520,13 +603,21 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
520
603
|
}
|
|
521
604
|
let urlPath = `/applications/{applicationId}/emails/send`;
|
|
522
605
|
urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
|
|
523
|
-
|
|
606
|
+
return {
|
|
524
607
|
path: urlPath,
|
|
525
608
|
method: 'POST',
|
|
526
609
|
headers: headerParameters,
|
|
527
610
|
query: queryParameters,
|
|
528
611
|
body: formParams,
|
|
529
|
-
}
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
/**
|
|
615
|
+
* Send an email
|
|
616
|
+
* Send an email
|
|
617
|
+
*/
|
|
618
|
+
async sendEmailRaw(requestParameters, initOverrides) {
|
|
619
|
+
const requestOptions = await this.sendEmailRequestOpts(requestParameters);
|
|
620
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
530
621
|
return new runtime.VoidApiResponse(response);
|
|
531
622
|
}
|
|
532
623
|
/**
|
|
@@ -537,10 +628,9 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
537
628
|
await this.sendEmailRaw(requestParameters, initOverrides);
|
|
538
629
|
}
|
|
539
630
|
/**
|
|
540
|
-
*
|
|
541
|
-
* Update an application
|
|
631
|
+
* Creates request options for updateApplication without sending the request
|
|
542
632
|
*/
|
|
543
|
-
async
|
|
633
|
+
async updateApplicationRequestOpts(requestParameters) {
|
|
544
634
|
if (requestParameters['applicationId'] == null) {
|
|
545
635
|
throw new runtime.RequiredError('applicationId', 'Required parameter "applicationId" was null or undefined when calling updateApplication().');
|
|
546
636
|
}
|
|
@@ -552,13 +642,21 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
552
642
|
headerParameters['Content-Type'] = 'application/json';
|
|
553
643
|
let urlPath = `/applications/{applicationId}`;
|
|
554
644
|
urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
|
|
555
|
-
|
|
645
|
+
return {
|
|
556
646
|
path: urlPath,
|
|
557
647
|
method: 'PATCH',
|
|
558
648
|
headers: headerParameters,
|
|
559
649
|
query: queryParameters,
|
|
560
650
|
body: (0, index_1.UpdateApplicationDTOToJSON)(requestParameters['updateApplicationDTO']),
|
|
561
|
-
}
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
/**
|
|
654
|
+
* Update an application belonging to the authenticated account
|
|
655
|
+
* Update an application
|
|
656
|
+
*/
|
|
657
|
+
async updateApplicationRaw(requestParameters, initOverrides) {
|
|
658
|
+
const requestOptions = await this.updateApplicationRequestOpts(requestParameters);
|
|
659
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
562
660
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ApplicationDTOFromJSON)(jsonValue));
|
|
563
661
|
}
|
|
564
662
|
/**
|
|
@@ -570,10 +668,9 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
570
668
|
return await response.value();
|
|
571
669
|
}
|
|
572
670
|
/**
|
|
573
|
-
*
|
|
574
|
-
* Update a template
|
|
671
|
+
* Creates request options for updateTemplate without sending the request
|
|
575
672
|
*/
|
|
576
|
-
async
|
|
673
|
+
async updateTemplateRequestOpts(requestParameters) {
|
|
577
674
|
if (requestParameters['applicationId'] == null) {
|
|
578
675
|
throw new runtime.RequiredError('applicationId', 'Required parameter "applicationId" was null or undefined when calling updateTemplate().');
|
|
579
676
|
}
|
|
@@ -606,13 +703,21 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
606
703
|
let urlPath = `/applications/{applicationId}/templates/{id}`;
|
|
607
704
|
urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
|
|
608
705
|
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
|
|
609
|
-
|
|
706
|
+
return {
|
|
610
707
|
path: urlPath,
|
|
611
708
|
method: 'PATCH',
|
|
612
709
|
headers: headerParameters,
|
|
613
710
|
query: queryParameters,
|
|
614
711
|
body: formParams,
|
|
615
|
-
}
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* Update a template
|
|
716
|
+
* Update a template
|
|
717
|
+
*/
|
|
718
|
+
async updateTemplateRaw(requestParameters, initOverrides) {
|
|
719
|
+
const requestOptions = await this.updateTemplateRequestOpts(requestParameters);
|
|
720
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
616
721
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UpdateEmailTemplateDTOFromJSON)(jsonValue));
|
|
617
722
|
}
|
|
618
723
|
/**
|
|
@@ -624,10 +729,9 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
624
729
|
return await response.value();
|
|
625
730
|
}
|
|
626
731
|
/**
|
|
627
|
-
*
|
|
628
|
-
* Upload a template
|
|
732
|
+
* Creates request options for uploadTemplate without sending the request
|
|
629
733
|
*/
|
|
630
|
-
async
|
|
734
|
+
async uploadTemplateRequestOpts(requestParameters) {
|
|
631
735
|
if (requestParameters['applicationId'] == null) {
|
|
632
736
|
throw new runtime.RequiredError('applicationId', 'Required parameter "applicationId" was null or undefined when calling uploadTemplate().');
|
|
633
737
|
}
|
|
@@ -662,13 +766,21 @@ class ClientApi extends runtime.BaseAPI {
|
|
|
662
766
|
}
|
|
663
767
|
let urlPath = `/applications/{applicationId}/templates`;
|
|
664
768
|
urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
|
|
665
|
-
|
|
769
|
+
return {
|
|
666
770
|
path: urlPath,
|
|
667
771
|
method: 'POST',
|
|
668
772
|
headers: headerParameters,
|
|
669
773
|
query: queryParameters,
|
|
670
774
|
body: formParams,
|
|
671
|
-
}
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* Upload a template
|
|
779
|
+
* Upload a template
|
|
780
|
+
*/
|
|
781
|
+
async uploadTemplateRaw(requestParameters, initOverrides) {
|
|
782
|
+
const requestOptions = await this.uploadTemplateRequestOpts(requestParameters);
|
|
783
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
672
784
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmailTemplateDTOFromJSON)(jsonValue));
|
|
673
785
|
}
|
|
674
786
|
/**
|