tuix-email-service-client 0.3.0 → 0.5.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.
@@ -1 +1 @@
1
- 7.17.0
1
+ 7.23.0
package/apis/ClientApi.js CHANGED
@@ -48,16 +48,26 @@ var __importStar = (this && this.__importStar) || (function () {
48
48
  Object.defineProperty(exports, "__esModule", { value: true });
49
49
  exports.ClientApi = void 0;
50
50
  const runtime = __importStar(require("../runtime"));
51
- const index_1 = require("../models/index");
51
+ const AccountDTO_1 = require("../models/AccountDTO");
52
+ const ApplicationDTO_1 = require("../models/ApplicationDTO");
53
+ const CreateAPIKeyRequestDTO_1 = require("../models/CreateAPIKeyRequestDTO");
54
+ const CreateAPIKeyResponseDTO_1 = require("../models/CreateAPIKeyResponseDTO");
55
+ const CreateAccountDTO_1 = require("../models/CreateAccountDTO");
56
+ const CreateApplicationDTO_1 = require("../models/CreateApplicationDTO");
57
+ const EmailTemplateDTO_1 = require("../models/EmailTemplateDTO");
58
+ const GetAPIKeysResponseDTO_1 = require("../models/GetAPIKeysResponseDTO");
59
+ const PaginatedApplicationsDTO_1 = require("../models/PaginatedApplicationsDTO");
60
+ const PaginatedEmailTemplateDTO_1 = require("../models/PaginatedEmailTemplateDTO");
61
+ const UpdateApplicationDTO_1 = require("../models/UpdateApplicationDTO");
62
+ const UpdateEmailTemplateDTO_1 = require("../models/UpdateEmailTemplateDTO");
52
63
  /**
53
64
  *
54
65
  */
55
66
  class ClientApi extends runtime.BaseAPI {
56
67
  /**
57
- * Retrieve all API keys associated with the authenticated user\'s account with pagination.
58
- * Get all API keys for the authenticated user
68
+ * Creates request options for apiKeysGet without sending the request
59
69
  */
60
- async apiKeysGetRaw(requestParameters, initOverrides) {
70
+ async apiKeysGetRequestOpts(requestParameters) {
61
71
  const queryParameters = {};
62
72
  if (requestParameters['page'] != null) {
63
73
  queryParameters['page'] = requestParameters['page'];
@@ -67,13 +77,21 @@ class ClientApi extends runtime.BaseAPI {
67
77
  }
68
78
  const headerParameters = {};
69
79
  let urlPath = `/api-keys`;
70
- const response = await this.request({
80
+ return {
71
81
  path: urlPath,
72
82
  method: 'GET',
73
83
  headers: headerParameters,
74
84
  query: queryParameters,
75
- }, initOverrides);
76
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetAPIKeysResponseDTOFromJSON)(jsonValue));
85
+ };
86
+ }
87
+ /**
88
+ * Retrieve all API keys associated with the authenticated user\'s account with pagination.
89
+ * Get all API keys for the authenticated user
90
+ */
91
+ async apiKeysGetRaw(requestParameters, initOverrides) {
92
+ const requestOptions = await this.apiKeysGetRequestOpts(requestParameters);
93
+ const response = await this.request(requestOptions, initOverrides);
94
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetAPIKeysResponseDTO_1.GetAPIKeysResponseDTOFromJSON)(jsonValue));
77
95
  }
78
96
  /**
79
97
  * Retrieve all API keys associated with the authenticated user\'s account with pagination.
@@ -84,23 +102,30 @@ class ClientApi extends runtime.BaseAPI {
84
102
  return await response.value();
85
103
  }
86
104
  /**
87
- * Delete a specific API key belonging to the authenticated user.
88
- * Delete an API key
105
+ * Creates request options for apiKeysIdDelete without sending the request
89
106
  */
90
- async apiKeysIdDeleteRaw(requestParameters, initOverrides) {
107
+ async apiKeysIdDeleteRequestOpts(requestParameters) {
91
108
  if (requestParameters['id'] == null) {
92
109
  throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiKeysIdDelete().');
93
110
  }
94
111
  const queryParameters = {};
95
112
  const headerParameters = {};
96
113
  let urlPath = `/api-keys/{id}`;
97
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
98
- const response = await this.request({
114
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
115
+ return {
99
116
  path: urlPath,
100
117
  method: 'DELETE',
101
118
  headers: headerParameters,
102
119
  query: queryParameters,
103
- }, initOverrides);
120
+ };
121
+ }
122
+ /**
123
+ * Delete a specific API key belonging to the authenticated user.
124
+ * Delete an API key
125
+ */
126
+ async apiKeysIdDeleteRaw(requestParameters, initOverrides) {
127
+ const requestOptions = await this.apiKeysIdDeleteRequestOpts(requestParameters);
128
+ const response = await this.request(requestOptions, initOverrides);
104
129
  return new runtime.VoidApiResponse(response);
105
130
  }
106
131
  /**
@@ -111,10 +136,9 @@ class ClientApi extends runtime.BaseAPI {
111
136
  await this.apiKeysIdDeleteRaw(requestParameters, initOverrides);
112
137
  }
113
138
  /**
114
- * Create a new API key for accessing the RAG service.
115
- * Create a new API key
139
+ * Creates request options for apiKeysPost without sending the request
116
140
  */
117
- async apiKeysPostRaw(requestParameters, initOverrides) {
141
+ async apiKeysPostRequestOpts(requestParameters) {
118
142
  if (requestParameters['createAPIKeyRequestDTO'] == null) {
119
143
  throw new runtime.RequiredError('createAPIKeyRequestDTO', 'Required parameter "createAPIKeyRequestDTO" was null or undefined when calling apiKeysPost().');
120
144
  }
@@ -122,14 +146,22 @@ class ClientApi extends runtime.BaseAPI {
122
146
  const headerParameters = {};
123
147
  headerParameters['Content-Type'] = 'application/json';
124
148
  let urlPath = `/api-keys`;
125
- const response = await this.request({
149
+ return {
126
150
  path: urlPath,
127
151
  method: 'POST',
128
152
  headers: headerParameters,
129
153
  query: queryParameters,
130
- body: (0, index_1.CreateAPIKeyRequestDTOToJSON)(requestParameters['createAPIKeyRequestDTO']),
131
- }, initOverrides);
132
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateAPIKeyResponseDTOFromJSON)(jsonValue));
154
+ body: (0, CreateAPIKeyRequestDTO_1.CreateAPIKeyRequestDTOToJSON)(requestParameters['createAPIKeyRequestDTO']),
155
+ };
156
+ }
157
+ /**
158
+ * Create a new API key for accessing the RAG service.
159
+ * Create a new API key
160
+ */
161
+ async apiKeysPostRaw(requestParameters, initOverrides) {
162
+ const requestOptions = await this.apiKeysPostRequestOpts(requestParameters);
163
+ const response = await this.request(requestOptions, initOverrides);
164
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, CreateAPIKeyResponseDTO_1.CreateAPIKeyResponseDTOFromJSON)(jsonValue));
133
165
  }
134
166
  /**
135
167
  * Create a new API key for accessing the RAG service.
@@ -140,10 +172,9 @@ class ClientApi extends runtime.BaseAPI {
140
172
  return await response.value();
141
173
  }
142
174
  /**
143
- * Send an email
144
- * Send an email
175
+ * Creates request options for apiSendEmail without sending the request
145
176
  */
146
- async apiSendEmailRaw(requestParameters, initOverrides) {
177
+ async apiSendEmailRequestOpts(requestParameters) {
147
178
  if (requestParameters['applicationId'] == null) {
148
179
  throw new runtime.RequiredError('applicationId', 'Required parameter "applicationId" was null or undefined when calling apiSendEmail().');
149
180
  }
@@ -198,14 +229,22 @@ class ClientApi extends runtime.BaseAPI {
198
229
  formParams.append('to', requestParameters['to']);
199
230
  }
200
231
  let urlPath = `/api/applications/{applicationId}/emails/send`;
201
- urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
202
- const response = await this.request({
232
+ urlPath = urlPath.replace('{applicationId}', encodeURIComponent(String(requestParameters['applicationId'])));
233
+ return {
203
234
  path: urlPath,
204
235
  method: 'POST',
205
236
  headers: headerParameters,
206
237
  query: queryParameters,
207
238
  body: formParams,
208
- }, initOverrides);
239
+ };
240
+ }
241
+ /**
242
+ * Send an email
243
+ * Send an email
244
+ */
245
+ async apiSendEmailRaw(requestParameters, initOverrides) {
246
+ const requestOptions = await this.apiSendEmailRequestOpts(requestParameters);
247
+ const response = await this.request(requestOptions, initOverrides);
209
248
  return new runtime.VoidApiResponse(response);
210
249
  }
211
250
  /**
@@ -216,10 +255,9 @@ class ClientApi extends runtime.BaseAPI {
216
255
  await this.apiSendEmailRaw(requestParameters, initOverrides);
217
256
  }
218
257
  /**
219
- * Create an account
220
- * Creates a new account
258
+ * Creates request options for createAccount without sending the request
221
259
  */
222
- async createAccountRaw(requestParameters, initOverrides) {
260
+ async createAccountRequestOpts(requestParameters) {
223
261
  if (requestParameters['createAccountDTO'] == null) {
224
262
  throw new runtime.RequiredError('createAccountDTO', 'Required parameter "createAccountDTO" was null or undefined when calling createAccount().');
225
263
  }
@@ -227,14 +265,22 @@ class ClientApi extends runtime.BaseAPI {
227
265
  const headerParameters = {};
228
266
  headerParameters['Content-Type'] = 'application/json';
229
267
  let urlPath = `/accounts`;
230
- const response = await this.request({
268
+ return {
231
269
  path: urlPath,
232
270
  method: 'POST',
233
271
  headers: headerParameters,
234
272
  query: queryParameters,
235
- body: (0, index_1.CreateAccountDTOToJSON)(requestParameters['createAccountDTO']),
236
- }, initOverrides);
237
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AccountDTOFromJSON)(jsonValue));
273
+ body: (0, CreateAccountDTO_1.CreateAccountDTOToJSON)(requestParameters['createAccountDTO']),
274
+ };
275
+ }
276
+ /**
277
+ * Create an account
278
+ * Creates a new account
279
+ */
280
+ async createAccountRaw(requestParameters, initOverrides) {
281
+ const requestOptions = await this.createAccountRequestOpts(requestParameters);
282
+ const response = await this.request(requestOptions, initOverrides);
283
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, AccountDTO_1.AccountDTOFromJSON)(jsonValue));
238
284
  }
239
285
  /**
240
286
  * Create an account
@@ -245,10 +291,9 @@ class ClientApi extends runtime.BaseAPI {
245
291
  return await response.value();
246
292
  }
247
293
  /**
248
- * Create a new application for the authenticated account
249
- * Create a new application
294
+ * Creates request options for createApplication without sending the request
250
295
  */
251
- async createApplicationRaw(requestParameters, initOverrides) {
296
+ async createApplicationRequestOpts(requestParameters) {
252
297
  if (requestParameters['createApplicationDTO'] == null) {
253
298
  throw new runtime.RequiredError('createApplicationDTO', 'Required parameter "createApplicationDTO" was null or undefined when calling createApplication().');
254
299
  }
@@ -256,14 +301,22 @@ class ClientApi extends runtime.BaseAPI {
256
301
  const headerParameters = {};
257
302
  headerParameters['Content-Type'] = 'application/json';
258
303
  let urlPath = `/applications`;
259
- const response = await this.request({
304
+ return {
260
305
  path: urlPath,
261
306
  method: 'POST',
262
307
  headers: headerParameters,
263
308
  query: queryParameters,
264
- body: (0, index_1.CreateApplicationDTOToJSON)(requestParameters['createApplicationDTO']),
265
- }, initOverrides);
266
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ApplicationDTOFromJSON)(jsonValue));
309
+ body: (0, CreateApplicationDTO_1.CreateApplicationDTOToJSON)(requestParameters['createApplicationDTO']),
310
+ };
311
+ }
312
+ /**
313
+ * Create a new application for the authenticated account
314
+ * Create a new application
315
+ */
316
+ async createApplicationRaw(requestParameters, initOverrides) {
317
+ const requestOptions = await this.createApplicationRequestOpts(requestParameters);
318
+ const response = await this.request(requestOptions, initOverrides);
319
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ApplicationDTO_1.ApplicationDTOFromJSON)(jsonValue));
267
320
  }
268
321
  /**
269
322
  * Create a new application for the authenticated account
@@ -274,23 +327,30 @@ class ClientApi extends runtime.BaseAPI {
274
327
  return await response.value();
275
328
  }
276
329
  /**
277
- * Delete an application belonging to the authenticated account
278
- * Delete an application
330
+ * Creates request options for deleteApplication without sending the request
279
331
  */
280
- async deleteApplicationRaw(requestParameters, initOverrides) {
332
+ async deleteApplicationRequestOpts(requestParameters) {
281
333
  if (requestParameters['applicationId'] == null) {
282
334
  throw new runtime.RequiredError('applicationId', 'Required parameter "applicationId" was null or undefined when calling deleteApplication().');
283
335
  }
284
336
  const queryParameters = {};
285
337
  const headerParameters = {};
286
338
  let urlPath = `/applications/{applicationId}`;
287
- urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
288
- const response = await this.request({
339
+ urlPath = urlPath.replace('{applicationId}', encodeURIComponent(String(requestParameters['applicationId'])));
340
+ return {
289
341
  path: urlPath,
290
342
  method: 'DELETE',
291
343
  headers: headerParameters,
292
344
  query: queryParameters,
293
- }, initOverrides);
345
+ };
346
+ }
347
+ /**
348
+ * Delete an application belonging to the authenticated account
349
+ * Delete an application
350
+ */
351
+ async deleteApplicationRaw(requestParameters, initOverrides) {
352
+ const requestOptions = await this.deleteApplicationRequestOpts(requestParameters);
353
+ const response = await this.request(requestOptions, initOverrides);
294
354
  return new runtime.VoidApiResponse(response);
295
355
  }
296
356
  /**
@@ -301,10 +361,9 @@ class ClientApi extends runtime.BaseAPI {
301
361
  await this.deleteApplicationRaw(requestParameters, initOverrides);
302
362
  }
303
363
  /**
304
- * Delete an template
305
- * Delete an template
364
+ * Creates request options for deleteTemplate without sending the request
306
365
  */
307
- async deleteTemplateRaw(requestParameters, initOverrides) {
366
+ async deleteTemplateRequestOpts(requestParameters) {
308
367
  if (requestParameters['id'] == null) {
309
368
  throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteTemplate().');
310
369
  }
@@ -314,14 +373,22 @@ class ClientApi extends runtime.BaseAPI {
314
373
  const queryParameters = {};
315
374
  const headerParameters = {};
316
375
  let urlPath = `/applications/{applicationId}/templates/{id}`;
317
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
318
- urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
319
- const response = await this.request({
376
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
377
+ urlPath = urlPath.replace('{applicationId}', encodeURIComponent(String(requestParameters['applicationId'])));
378
+ return {
320
379
  path: urlPath,
321
380
  method: 'DELETE',
322
381
  headers: headerParameters,
323
382
  query: queryParameters,
324
- }, initOverrides);
383
+ };
384
+ }
385
+ /**
386
+ * Delete an template
387
+ * Delete an template
388
+ */
389
+ async deleteTemplateRaw(requestParameters, initOverrides) {
390
+ const requestOptions = await this.deleteTemplateRequestOpts(requestParameters);
391
+ const response = await this.request(requestOptions, initOverrides);
325
392
  return new runtime.VoidApiResponse(response);
326
393
  }
327
394
  /**
@@ -332,24 +399,31 @@ class ClientApi extends runtime.BaseAPI {
332
399
  await this.deleteTemplateRaw(requestParameters, initOverrides);
333
400
  }
334
401
  /**
335
- * Get a specific application belonging to the authenticated account
336
- * Get an application by applicationId
402
+ * Creates request options for getApplicationByID without sending the request
337
403
  */
338
- async getApplicationByIDRaw(requestParameters, initOverrides) {
404
+ async getApplicationByIDRequestOpts(requestParameters) {
339
405
  if (requestParameters['applicationId'] == null) {
340
406
  throw new runtime.RequiredError('applicationId', 'Required parameter "applicationId" was null or undefined when calling getApplicationByID().');
341
407
  }
342
408
  const queryParameters = {};
343
409
  const headerParameters = {};
344
410
  let urlPath = `/applications/{applicationId}`;
345
- urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
346
- const response = await this.request({
411
+ urlPath = urlPath.replace('{applicationId}', encodeURIComponent(String(requestParameters['applicationId'])));
412
+ return {
347
413
  path: urlPath,
348
414
  method: 'GET',
349
415
  headers: headerParameters,
350
416
  query: queryParameters,
351
- }, initOverrides);
352
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ApplicationDTOFromJSON)(jsonValue));
417
+ };
418
+ }
419
+ /**
420
+ * Get a specific application belonging to the authenticated account
421
+ * Get an application by applicationId
422
+ */
423
+ async getApplicationByIDRaw(requestParameters, initOverrides) {
424
+ const requestOptions = await this.getApplicationByIDRequestOpts(requestParameters);
425
+ const response = await this.request(requestOptions, initOverrides);
426
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ApplicationDTO_1.ApplicationDTOFromJSON)(jsonValue));
353
427
  }
354
428
  /**
355
429
  * Get a specific application belonging to the authenticated account
@@ -360,10 +434,9 @@ class ClientApi extends runtime.BaseAPI {
360
434
  return await response.value();
361
435
  }
362
436
  /**
363
- * Get all applications belonging to the authenticated account
364
- * Get all applications for the account
437
+ * Creates request options for getApplications without sending the request
365
438
  */
366
- async getApplicationsRaw(requestParameters, initOverrides) {
439
+ async getApplicationsRequestOpts(requestParameters) {
367
440
  const queryParameters = {};
368
441
  if (requestParameters['page'] != null) {
369
442
  queryParameters['page'] = requestParameters['page'];
@@ -373,13 +446,21 @@ class ClientApi extends runtime.BaseAPI {
373
446
  }
374
447
  const headerParameters = {};
375
448
  let urlPath = `/applications`;
376
- const response = await this.request({
449
+ return {
377
450
  path: urlPath,
378
451
  method: 'GET',
379
452
  headers: headerParameters,
380
453
  query: queryParameters,
381
- }, initOverrides);
382
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedApplicationsDTOFromJSON)(jsonValue));
454
+ };
455
+ }
456
+ /**
457
+ * Get all applications belonging to the authenticated account
458
+ * Get all applications for the account
459
+ */
460
+ async getApplicationsRaw(requestParameters, initOverrides) {
461
+ const requestOptions = await this.getApplicationsRequestOpts(requestParameters);
462
+ const response = await this.request(requestOptions, initOverrides);
463
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PaginatedApplicationsDTO_1.PaginatedApplicationsDTOFromJSON)(jsonValue));
383
464
  }
384
465
  /**
385
466
  * Get all applications belonging to the authenticated account
@@ -390,10 +471,9 @@ class ClientApi extends runtime.BaseAPI {
390
471
  return await response.value();
391
472
  }
392
473
  /**
393
- * Return a template
394
- * Return a template
474
+ * Creates request options for getTemplate without sending the request
395
475
  */
396
- async getTemplateRaw(requestParameters, initOverrides) {
476
+ async getTemplateRequestOpts(requestParameters) {
397
477
  if (requestParameters['id'] == null) {
398
478
  throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getTemplate().');
399
479
  }
@@ -403,14 +483,22 @@ class ClientApi extends runtime.BaseAPI {
403
483
  const queryParameters = {};
404
484
  const headerParameters = {};
405
485
  let urlPath = `/applications/{applicationId}/templates/{id}`;
406
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
407
- urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
408
- const response = await this.request({
486
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
487
+ urlPath = urlPath.replace('{applicationId}', encodeURIComponent(String(requestParameters['applicationId'])));
488
+ return {
409
489
  path: urlPath,
410
490
  method: 'GET',
411
491
  headers: headerParameters,
412
492
  query: queryParameters,
413
- }, initOverrides);
493
+ };
494
+ }
495
+ /**
496
+ * Return a template
497
+ * Return a template
498
+ */
499
+ async getTemplateRaw(requestParameters, initOverrides) {
500
+ const requestOptions = await this.getTemplateRequestOpts(requestParameters);
501
+ const response = await this.request(requestOptions, initOverrides);
414
502
  if (this.isJsonMime(response.headers.get('content-type'))) {
415
503
  return new runtime.JSONApiResponse(response);
416
504
  }
@@ -427,10 +515,9 @@ class ClientApi extends runtime.BaseAPI {
427
515
  return await response.value();
428
516
  }
429
517
  /**
430
- * Return all templates
431
- * Return all templates
518
+ * Creates request options for getTemplates without sending the request
432
519
  */
433
- async getTemplatesRaw(requestParameters, initOverrides) {
520
+ async getTemplatesRequestOpts(requestParameters) {
434
521
  if (requestParameters['applicationId'] == null) {
435
522
  throw new runtime.RequiredError('applicationId', 'Required parameter "applicationId" was null or undefined when calling getTemplates().');
436
523
  }
@@ -443,14 +530,22 @@ class ClientApi extends runtime.BaseAPI {
443
530
  }
444
531
  const headerParameters = {};
445
532
  let urlPath = `/applications/{applicationId}/templates`;
446
- urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
447
- const response = await this.request({
533
+ urlPath = urlPath.replace('{applicationId}', encodeURIComponent(String(requestParameters['applicationId'])));
534
+ return {
448
535
  path: urlPath,
449
536
  method: 'GET',
450
537
  headers: headerParameters,
451
538
  query: queryParameters,
452
- }, initOverrides);
453
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedEmailTemplateDTOFromJSON)(jsonValue));
539
+ };
540
+ }
541
+ /**
542
+ * Return all templates
543
+ * Return all templates
544
+ */
545
+ async getTemplatesRaw(requestParameters, initOverrides) {
546
+ const requestOptions = await this.getTemplatesRequestOpts(requestParameters);
547
+ const response = await this.request(requestOptions, initOverrides);
548
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, PaginatedEmailTemplateDTO_1.PaginatedEmailTemplateDTOFromJSON)(jsonValue));
454
549
  }
455
550
  /**
456
551
  * Return all templates
@@ -461,10 +556,9 @@ class ClientApi extends runtime.BaseAPI {
461
556
  return await response.value();
462
557
  }
463
558
  /**
464
- * Send an email
465
- * Send an email
559
+ * Creates request options for sendEmail without sending the request
466
560
  */
467
- async sendEmailRaw(requestParameters, initOverrides) {
561
+ async sendEmailRequestOpts(requestParameters) {
468
562
  if (requestParameters['applicationId'] == null) {
469
563
  throw new runtime.RequiredError('applicationId', 'Required parameter "applicationId" was null or undefined when calling sendEmail().');
470
564
  }
@@ -519,14 +613,22 @@ class ClientApi extends runtime.BaseAPI {
519
613
  formParams.append('to', requestParameters['to']);
520
614
  }
521
615
  let urlPath = `/applications/{applicationId}/emails/send`;
522
- urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
523
- const response = await this.request({
616
+ urlPath = urlPath.replace('{applicationId}', encodeURIComponent(String(requestParameters['applicationId'])));
617
+ return {
524
618
  path: urlPath,
525
619
  method: 'POST',
526
620
  headers: headerParameters,
527
621
  query: queryParameters,
528
622
  body: formParams,
529
- }, initOverrides);
623
+ };
624
+ }
625
+ /**
626
+ * Send an email
627
+ * Send an email
628
+ */
629
+ async sendEmailRaw(requestParameters, initOverrides) {
630
+ const requestOptions = await this.sendEmailRequestOpts(requestParameters);
631
+ const response = await this.request(requestOptions, initOverrides);
530
632
  return new runtime.VoidApiResponse(response);
531
633
  }
532
634
  /**
@@ -537,10 +639,9 @@ class ClientApi extends runtime.BaseAPI {
537
639
  await this.sendEmailRaw(requestParameters, initOverrides);
538
640
  }
539
641
  /**
540
- * Update an application belonging to the authenticated account
541
- * Update an application
642
+ * Creates request options for updateApplication without sending the request
542
643
  */
543
- async updateApplicationRaw(requestParameters, initOverrides) {
644
+ async updateApplicationRequestOpts(requestParameters) {
544
645
  if (requestParameters['applicationId'] == null) {
545
646
  throw new runtime.RequiredError('applicationId', 'Required parameter "applicationId" was null or undefined when calling updateApplication().');
546
647
  }
@@ -551,15 +652,23 @@ class ClientApi extends runtime.BaseAPI {
551
652
  const headerParameters = {};
552
653
  headerParameters['Content-Type'] = 'application/json';
553
654
  let urlPath = `/applications/{applicationId}`;
554
- urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
555
- const response = await this.request({
655
+ urlPath = urlPath.replace('{applicationId}', encodeURIComponent(String(requestParameters['applicationId'])));
656
+ return {
556
657
  path: urlPath,
557
658
  method: 'PATCH',
558
659
  headers: headerParameters,
559
660
  query: queryParameters,
560
- body: (0, index_1.UpdateApplicationDTOToJSON)(requestParameters['updateApplicationDTO']),
561
- }, initOverrides);
562
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ApplicationDTOFromJSON)(jsonValue));
661
+ body: (0, UpdateApplicationDTO_1.UpdateApplicationDTOToJSON)(requestParameters['updateApplicationDTO']),
662
+ };
663
+ }
664
+ /**
665
+ * Update an application belonging to the authenticated account
666
+ * Update an application
667
+ */
668
+ async updateApplicationRaw(requestParameters, initOverrides) {
669
+ const requestOptions = await this.updateApplicationRequestOpts(requestParameters);
670
+ const response = await this.request(requestOptions, initOverrides);
671
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ApplicationDTO_1.ApplicationDTOFromJSON)(jsonValue));
563
672
  }
564
673
  /**
565
674
  * Update an application belonging to the authenticated account
@@ -570,10 +679,9 @@ class ClientApi extends runtime.BaseAPI {
570
679
  return await response.value();
571
680
  }
572
681
  /**
573
- * Update a template
574
- * Update a template
682
+ * Creates request options for updateTemplate without sending the request
575
683
  */
576
- async updateTemplateRaw(requestParameters, initOverrides) {
684
+ async updateTemplateRequestOpts(requestParameters) {
577
685
  if (requestParameters['applicationId'] == null) {
578
686
  throw new runtime.RequiredError('applicationId', 'Required parameter "applicationId" was null or undefined when calling updateTemplate().');
579
687
  }
@@ -597,6 +705,9 @@ class ClientApi extends runtime.BaseAPI {
597
705
  else {
598
706
  formParams = new URLSearchParams();
599
707
  }
708
+ if (requestParameters['defaultEmail'] != null) {
709
+ formParams.append('defaultEmail', requestParameters['defaultEmail']);
710
+ }
600
711
  if (requestParameters['file'] != null) {
601
712
  formParams.append('file', requestParameters['file']);
602
713
  }
@@ -604,16 +715,24 @@ class ClientApi extends runtime.BaseAPI {
604
715
  formParams.append('name', requestParameters['name']);
605
716
  }
606
717
  let urlPath = `/applications/{applicationId}/templates/{id}`;
607
- urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
608
- urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
609
- const response = await this.request({
718
+ urlPath = urlPath.replace('{applicationId}', encodeURIComponent(String(requestParameters['applicationId'])));
719
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
720
+ return {
610
721
  path: urlPath,
611
722
  method: 'PATCH',
612
723
  headers: headerParameters,
613
724
  query: queryParameters,
614
725
  body: formParams,
615
- }, initOverrides);
616
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UpdateEmailTemplateDTOFromJSON)(jsonValue));
726
+ };
727
+ }
728
+ /**
729
+ * Update a template
730
+ * Update a template
731
+ */
732
+ async updateTemplateRaw(requestParameters, initOverrides) {
733
+ const requestOptions = await this.updateTemplateRequestOpts(requestParameters);
734
+ const response = await this.request(requestOptions, initOverrides);
735
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, UpdateEmailTemplateDTO_1.UpdateEmailTemplateDTOFromJSON)(jsonValue));
617
736
  }
618
737
  /**
619
738
  * Update a template
@@ -624,10 +743,9 @@ class ClientApi extends runtime.BaseAPI {
624
743
  return await response.value();
625
744
  }
626
745
  /**
627
- * Upload a template
628
- * Upload a template
746
+ * Creates request options for uploadTemplate without sending the request
629
747
  */
630
- async uploadTemplateRaw(requestParameters, initOverrides) {
748
+ async uploadTemplateRequestOpts(requestParameters) {
631
749
  if (requestParameters['applicationId'] == null) {
632
750
  throw new runtime.RequiredError('applicationId', 'Required parameter "applicationId" was null or undefined when calling uploadTemplate().');
633
751
  }
@@ -654,6 +772,9 @@ class ClientApi extends runtime.BaseAPI {
654
772
  else {
655
773
  formParams = new URLSearchParams();
656
774
  }
775
+ if (requestParameters['defaultEmail'] != null) {
776
+ formParams.append('defaultEmail', requestParameters['defaultEmail']);
777
+ }
657
778
  if (requestParameters['file'] != null) {
658
779
  formParams.append('file', requestParameters['file']);
659
780
  }
@@ -661,15 +782,23 @@ class ClientApi extends runtime.BaseAPI {
661
782
  formParams.append('name', requestParameters['name']);
662
783
  }
663
784
  let urlPath = `/applications/{applicationId}/templates`;
664
- urlPath = urlPath.replace(`{${"applicationId"}}`, encodeURIComponent(String(requestParameters['applicationId'])));
665
- const response = await this.request({
785
+ urlPath = urlPath.replace('{applicationId}', encodeURIComponent(String(requestParameters['applicationId'])));
786
+ return {
666
787
  path: urlPath,
667
788
  method: 'POST',
668
789
  headers: headerParameters,
669
790
  query: queryParameters,
670
791
  body: formParams,
671
- }, initOverrides);
672
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EmailTemplateDTOFromJSON)(jsonValue));
792
+ };
793
+ }
794
+ /**
795
+ * Upload a template
796
+ * Upload a template
797
+ */
798
+ async uploadTemplateRaw(requestParameters, initOverrides) {
799
+ const requestOptions = await this.uploadTemplateRequestOpts(requestParameters);
800
+ const response = await this.request(requestOptions, initOverrides);
801
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, EmailTemplateDTO_1.EmailTemplateDTOFromJSON)(jsonValue));
673
802
  }
674
803
  /**
675
804
  * Upload a template