tuix-email-service-client 0.0.1

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 (82) hide show
  1. package/.openapi-generator/FILES +37 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +48 -0
  5. package/apis/ClientApi.js +684 -0
  6. package/apis/ClientApi.js.map +1 -0
  7. package/apis/ClientApi.ts +1037 -0
  8. package/apis/index.js +20 -0
  9. package/apis/index.js.map +1 -0
  10. package/apis/index.ts +3 -0
  11. package/docs/APIKeyDTO.md +40 -0
  12. package/docs/AccountDTO.md +34 -0
  13. package/docs/ApplicationDTO.md +42 -0
  14. package/docs/ApplicationWithApplicationCountDTO.md +44 -0
  15. package/docs/ClientApi.md +1235 -0
  16. package/docs/CreateAPIKeyRequestDTO.md +34 -0
  17. package/docs/CreateAPIKeyResponseDTO.md +42 -0
  18. package/docs/CreateAccountDTO.md +36 -0
  19. package/docs/CreateApplicationDTO.md +36 -0
  20. package/docs/EmailTemplateDTO.md +42 -0
  21. package/docs/ErrorDTO.md +34 -0
  22. package/docs/GetAPIKeysResponseDTO.md +42 -0
  23. package/docs/PaginatedApplicationsDTO.md +42 -0
  24. package/docs/PaginatedEmailTemplateDTO.md +42 -0
  25. package/docs/UpdateApplicationDTO.md +36 -0
  26. package/docs/UpdateEmailTemplateDTO.md +42 -0
  27. package/index.js +22 -0
  28. package/index.js.map +1 -0
  29. package/index.ts +5 -0
  30. package/models/APIKeyDTO.js +55 -0
  31. package/models/APIKeyDTO.js.map +1 -0
  32. package/models/APIKeyDTO.ts +89 -0
  33. package/models/AccountDTO.js +49 -0
  34. package/models/AccountDTO.js.map +1 -0
  35. package/models/AccountDTO.ts +65 -0
  36. package/models/ApplicationDTO.js +57 -0
  37. package/models/ApplicationDTO.js.map +1 -0
  38. package/models/ApplicationDTO.ts +97 -0
  39. package/models/ApplicationWithApplicationCountDTO.js +59 -0
  40. package/models/ApplicationWithApplicationCountDTO.js.map +1 -0
  41. package/models/ApplicationWithApplicationCountDTO.ts +105 -0
  42. package/models/CreateAPIKeyRequestDTO.js +51 -0
  43. package/models/CreateAPIKeyRequestDTO.js.map +1 -0
  44. package/models/CreateAPIKeyRequestDTO.ts +66 -0
  45. package/models/CreateAPIKeyResponseDTO.js +57 -0
  46. package/models/CreateAPIKeyResponseDTO.js.map +1 -0
  47. package/models/CreateAPIKeyResponseDTO.ts +97 -0
  48. package/models/CreateAccountDTO.js +55 -0
  49. package/models/CreateAccountDTO.js.map +1 -0
  50. package/models/CreateAccountDTO.ts +75 -0
  51. package/models/CreateApplicationDTO.js +55 -0
  52. package/models/CreateApplicationDTO.js.map +1 -0
  53. package/models/CreateApplicationDTO.ts +75 -0
  54. package/models/EmailTemplateDTO.js +57 -0
  55. package/models/EmailTemplateDTO.js.map +1 -0
  56. package/models/EmailTemplateDTO.ts +97 -0
  57. package/models/ErrorDTO.js +49 -0
  58. package/models/ErrorDTO.js.map +1 -0
  59. package/models/ErrorDTO.ts +65 -0
  60. package/models/GetAPIKeysResponseDTO.js +58 -0
  61. package/models/GetAPIKeysResponseDTO.js.map +1 -0
  62. package/models/GetAPIKeysResponseDTO.ts +105 -0
  63. package/models/PaginatedApplicationsDTO.js +68 -0
  64. package/models/PaginatedApplicationsDTO.js.map +1 -0
  65. package/models/PaginatedApplicationsDTO.ts +110 -0
  66. package/models/PaginatedEmailTemplateDTO.js +68 -0
  67. package/models/PaginatedEmailTemplateDTO.js.map +1 -0
  68. package/models/PaginatedEmailTemplateDTO.ts +110 -0
  69. package/models/UpdateApplicationDTO.js +51 -0
  70. package/models/UpdateApplicationDTO.js.map +1 -0
  71. package/models/UpdateApplicationDTO.ts +73 -0
  72. package/models/UpdateEmailTemplateDTO.js +57 -0
  73. package/models/UpdateEmailTemplateDTO.js.map +1 -0
  74. package/models/UpdateEmailTemplateDTO.ts +97 -0
  75. package/models/index.js +34 -0
  76. package/models/index.js.map +1 -0
  77. package/models/index.ts +17 -0
  78. package/package.json +17 -0
  79. package/runtime.js +330 -0
  80. package/runtime.js.map +1 -0
  81. package/runtime.ts +432 -0
  82. package/tsconfig.build.tsbuildinfo +1 -0
@@ -0,0 +1,1235 @@
1
+ # ClientApi
2
+
3
+ All URIs are relative to *http://0.0.0.0:3000/local*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**apiKeysGet**](ClientApi.md#apikeysget) | **GET** /api-keys | Get all API keys for the authenticated user |
8
+ | [**apiKeysIdDelete**](ClientApi.md#apikeysiddelete) | **DELETE** /api-keys/{id} | Delete an API key |
9
+ | [**apiKeysPost**](ClientApi.md#apikeyspost) | **POST** /api-keys | Create a new API key |
10
+ | [**apiSendEmail**](ClientApi.md#apisendemail) | **POST** /api/applications/{applicationId}/emails/send | Send an email |
11
+ | [**createAccount**](ClientApi.md#createaccount) | **POST** /accounts | Creates a new account |
12
+ | [**createApplication**](ClientApi.md#createapplication) | **POST** /applications | Create a new application |
13
+ | [**deleteApplication**](ClientApi.md#deleteapplication) | **DELETE** /applications/{applicationId} | Delete an application |
14
+ | [**deleteTemplate**](ClientApi.md#deletetemplate) | **DELETE** /applications/{applicationId}/templates/{id} | Delete an template |
15
+ | [**getApplicationByID**](ClientApi.md#getapplicationbyid) | **GET** /applications/{applicationId} | Get an application by applicationId |
16
+ | [**getApplications**](ClientApi.md#getapplications) | **GET** /applications | Get all applications for the account |
17
+ | [**getTemplate**](ClientApi.md#gettemplate) | **GET** /applications/{applicationId}/templates/{id} | Return a template |
18
+ | [**getTemplates**](ClientApi.md#gettemplates) | **GET** /applications/{applicationId}/templates | Return all templates |
19
+ | [**sendEmail**](ClientApi.md#sendemail) | **POST** /applications/{applicationId}/emails/send | Send an email |
20
+ | [**updateApplication**](ClientApi.md#updateapplication) | **PATCH** /applications/{applicationId} | Update an application |
21
+ | [**updateTemplate**](ClientApi.md#updatetemplate) | **PATCH** /applications/{applicationId}/templates/{id} | Update a template |
22
+ | [**uploadTemplate**](ClientApi.md#uploadtemplate) | **POST** /applications/{applicationId}/templates | Upload a template |
23
+
24
+
25
+
26
+ ## apiKeysGet
27
+
28
+ > GetAPIKeysResponseDTO apiKeysGet(page, pageSize)
29
+
30
+ Get all API keys for the authenticated user
31
+
32
+ Retrieve all API keys associated with the authenticated user\'s account with pagination.
33
+
34
+ ### Example
35
+
36
+ ```ts
37
+ import {
38
+ Configuration,
39
+ ClientApi,
40
+ } from '';
41
+ import type { ApiKeysGetRequest } from '';
42
+
43
+ async function example() {
44
+ console.log("🚀 Testing SDK...");
45
+ const api = new ClientApi();
46
+
47
+ const body = {
48
+ // number | Page number for pagination(default: 1) (optional)
49
+ page: 56,
50
+ // number | Limit number of items per page (default: 10) (optional)
51
+ pageSize: 56,
52
+ } satisfies ApiKeysGetRequest;
53
+
54
+ try {
55
+ const data = await api.apiKeysGet(body);
56
+ console.log(data);
57
+ } catch (error) {
58
+ console.error(error);
59
+ }
60
+ }
61
+
62
+ // Run the test
63
+ example().catch(console.error);
64
+ ```
65
+
66
+ ### Parameters
67
+
68
+
69
+ | Name | Type | Description | Notes |
70
+ |------------- | ------------- | ------------- | -------------|
71
+ | **page** | `number` | Page number for pagination(default: 1) | [Optional] [Defaults to `1`] |
72
+ | **pageSize** | `number` | Limit number of items per page (default: 10) | [Optional] [Defaults to `10`] |
73
+
74
+ ### Return type
75
+
76
+ [**GetAPIKeysResponseDTO**](GetAPIKeysResponseDTO.md)
77
+
78
+ ### Authorization
79
+
80
+ No authorization required
81
+
82
+ ### HTTP request headers
83
+
84
+ - **Content-Type**: Not defined
85
+ - **Accept**: `application/json`
86
+
87
+
88
+ ### HTTP response details
89
+ | Status code | Description | Response headers |
90
+ |-------------|-------------|------------------|
91
+ | **200** | Returns a paginated list of API keys | - |
92
+ | **401** | Unauthorized | - |
93
+ | **500** | Internal server error: Failed to retrieve API keys | - |
94
+
95
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
96
+
97
+
98
+ ## apiKeysIdDelete
99
+
100
+ > apiKeysIdDelete(id)
101
+
102
+ Delete an API key
103
+
104
+ Delete a specific API key belonging to the authenticated user.
105
+
106
+ ### Example
107
+
108
+ ```ts
109
+ import {
110
+ Configuration,
111
+ ClientApi,
112
+ } from '';
113
+ import type { ApiKeysIdDeleteRequest } from '';
114
+
115
+ async function example() {
116
+ console.log("🚀 Testing SDK...");
117
+ const api = new ClientApi();
118
+
119
+ const body = {
120
+ // string | API Key ID
121
+ id: id_example,
122
+ } satisfies ApiKeysIdDeleteRequest;
123
+
124
+ try {
125
+ const data = await api.apiKeysIdDelete(body);
126
+ console.log(data);
127
+ } catch (error) {
128
+ console.error(error);
129
+ }
130
+ }
131
+
132
+ // Run the test
133
+ example().catch(console.error);
134
+ ```
135
+
136
+ ### Parameters
137
+
138
+
139
+ | Name | Type | Description | Notes |
140
+ |------------- | ------------- | ------------- | -------------|
141
+ | **id** | `string` | API Key ID | [Defaults to `undefined`] |
142
+
143
+ ### Return type
144
+
145
+ `void` (Empty response body)
146
+
147
+ ### Authorization
148
+
149
+ No authorization required
150
+
151
+ ### HTTP request headers
152
+
153
+ - **Content-Type**: Not defined
154
+ - **Accept**: `application/json`
155
+
156
+
157
+ ### HTTP response details
158
+ | Status code | Description | Response headers |
159
+ |-------------|-------------|------------------|
160
+ | **204** | API key deleted successfully | - |
161
+ | **400** | Invalid key ID format | - |
162
+ | **401** | Unauthorized | - |
163
+ | **404** | API key not found | - |
164
+ | **500** | Internal server error: Failed to delete API key | - |
165
+
166
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
167
+
168
+
169
+ ## apiKeysPost
170
+
171
+ > CreateAPIKeyResponseDTO apiKeysPost(createAPIKeyRequestDTO)
172
+
173
+ Create a new API key
174
+
175
+ Create a new API key for accessing the RAG service.
176
+
177
+ ### Example
178
+
179
+ ```ts
180
+ import {
181
+ Configuration,
182
+ ClientApi,
183
+ } from '';
184
+ import type { ApiKeysPostRequest } from '';
185
+
186
+ async function example() {
187
+ console.log("🚀 Testing SDK...");
188
+ const api = new ClientApi();
189
+
190
+ const body = {
191
+ // CreateAPIKeyRequestDTO | Create API Key request
192
+ createAPIKeyRequestDTO: ...,
193
+ } satisfies ApiKeysPostRequest;
194
+
195
+ try {
196
+ const data = await api.apiKeysPost(body);
197
+ console.log(data);
198
+ } catch (error) {
199
+ console.error(error);
200
+ }
201
+ }
202
+
203
+ // Run the test
204
+ example().catch(console.error);
205
+ ```
206
+
207
+ ### Parameters
208
+
209
+
210
+ | Name | Type | Description | Notes |
211
+ |------------- | ------------- | ------------- | -------------|
212
+ | **createAPIKeyRequestDTO** | [CreateAPIKeyRequestDTO](CreateAPIKeyRequestDTO.md) | Create API Key request | |
213
+
214
+ ### Return type
215
+
216
+ [**CreateAPIKeyResponseDTO**](CreateAPIKeyResponseDTO.md)
217
+
218
+ ### Authorization
219
+
220
+ No authorization required
221
+
222
+ ### HTTP request headers
223
+
224
+ - **Content-Type**: `application/json`
225
+ - **Accept**: `application/json`
226
+
227
+
228
+ ### HTTP response details
229
+ | Status code | Description | Response headers |
230
+ |-------------|-------------|------------------|
231
+ | **201** | Create an API key and returns the created key | - |
232
+ | **400** | Invalid request format | - |
233
+ | **401** | Unauthorized | - |
234
+ | **500** | Server Error: Failed to create API key | - |
235
+
236
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
237
+
238
+
239
+ ## apiSendEmail
240
+
241
+ > apiSendEmail(applicationId, from, subject, templateUUID, to, body, data, file)
242
+
243
+ Send an email
244
+
245
+ Send an email
246
+
247
+ ### Example
248
+
249
+ ```ts
250
+ import {
251
+ Configuration,
252
+ ClientApi,
253
+ } from '';
254
+ import type { ApiSendEmailRequest } from '';
255
+
256
+ async function example() {
257
+ console.log("🚀 Testing SDK...");
258
+ const api = new ClientApi();
259
+
260
+ const body = {
261
+ // string | Application ID
262
+ applicationId: applicationId_example,
263
+ // string | From
264
+ from: from_example,
265
+ // string | Subject
266
+ subject: subject_example,
267
+ // string | TemplateUUID
268
+ templateUUID: templateUUID_example,
269
+ // string | To
270
+ to: to_example,
271
+ // string | Body (optional)
272
+ body: body_example,
273
+ // string | Data (optional)
274
+ data: data_example,
275
+ // Blob | File (optional)
276
+ file: BINARY_DATA_HERE,
277
+ } satisfies ApiSendEmailRequest;
278
+
279
+ try {
280
+ const data = await api.apiSendEmail(body);
281
+ console.log(data);
282
+ } catch (error) {
283
+ console.error(error);
284
+ }
285
+ }
286
+
287
+ // Run the test
288
+ example().catch(console.error);
289
+ ```
290
+
291
+ ### Parameters
292
+
293
+
294
+ | Name | Type | Description | Notes |
295
+ |------------- | ------------- | ------------- | -------------|
296
+ | **applicationId** | `string` | Application ID | [Defaults to `undefined`] |
297
+ | **from** | `string` | From | [Defaults to `undefined`] |
298
+ | **subject** | `string` | Subject | [Defaults to `undefined`] |
299
+ | **templateUUID** | `string` | TemplateUUID | [Defaults to `undefined`] |
300
+ | **to** | `string` | To | [Defaults to `undefined`] |
301
+ | **body** | `string` | Body | [Optional] [Defaults to `undefined`] |
302
+ | **data** | `string` | Data | [Optional] [Defaults to `undefined`] |
303
+ | **file** | `Blob` | File | [Optional] [Defaults to `undefined`] |
304
+
305
+ ### Return type
306
+
307
+ `void` (Empty response body)
308
+
309
+ ### Authorization
310
+
311
+ No authorization required
312
+
313
+ ### HTTP request headers
314
+
315
+ - **Content-Type**: `multipart/form-data`
316
+ - **Accept**: `application/json`
317
+
318
+
319
+ ### HTTP response details
320
+ | Status code | Description | Response headers |
321
+ |-------------|-------------|------------------|
322
+ | **202** | Email was sent | - |
323
+ | **400** | Return an error if there is a missing or invalid field | - |
324
+ | **401** | Return an error if the user is not authorized | - |
325
+ | **403** | Return an error if the user does not have the required permissions | - |
326
+ | **500** | Return an error if an internal error occurs | - |
327
+
328
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
329
+
330
+
331
+ ## createAccount
332
+
333
+ > AccountDTO createAccount(createAccountDTO)
334
+
335
+ Creates a new account
336
+
337
+ Create an account
338
+
339
+ ### Example
340
+
341
+ ```ts
342
+ import {
343
+ Configuration,
344
+ ClientApi,
345
+ } from '';
346
+ import type { CreateAccountRequest } from '';
347
+
348
+ async function example() {
349
+ console.log("🚀 Testing SDK...");
350
+ const api = new ClientApi();
351
+
352
+ const body = {
353
+ // CreateAccountDTO | Account creation data
354
+ createAccountDTO: ...,
355
+ } satisfies CreateAccountRequest;
356
+
357
+ try {
358
+ const data = await api.createAccount(body);
359
+ console.log(data);
360
+ } catch (error) {
361
+ console.error(error);
362
+ }
363
+ }
364
+
365
+ // Run the test
366
+ example().catch(console.error);
367
+ ```
368
+
369
+ ### Parameters
370
+
371
+
372
+ | Name | Type | Description | Notes |
373
+ |------------- | ------------- | ------------- | -------------|
374
+ | **createAccountDTO** | [CreateAccountDTO](CreateAccountDTO.md) | Account creation data | |
375
+
376
+ ### Return type
377
+
378
+ [**AccountDTO**](AccountDTO.md)
379
+
380
+ ### Authorization
381
+
382
+ No authorization required
383
+
384
+ ### HTTP request headers
385
+
386
+ - **Content-Type**: `application/json`
387
+ - **Accept**: `application/json`
388
+
389
+
390
+ ### HTTP response details
391
+ | Status code | Description | Response headers |
392
+ |-------------|-------------|------------------|
393
+ | **201** | Create an account and returns the created account | - |
394
+ | **400** | Return an error if there is a missing or invalid field | - |
395
+ | **401** | Return an error if the user is not authenticated | - |
396
+ | **403** | Return an error if the user does not have the required permissions | - |
397
+ | **500** | Return an error if the server finds an error | - |
398
+
399
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
400
+
401
+
402
+ ## createApplication
403
+
404
+ > ApplicationDTO createApplication(createApplicationDTO)
405
+
406
+ Create a new application
407
+
408
+ Create a new application for the authenticated account
409
+
410
+ ### Example
411
+
412
+ ```ts
413
+ import {
414
+ Configuration,
415
+ ClientApi,
416
+ } from '';
417
+ import type { CreateApplicationRequest } from '';
418
+
419
+ async function example() {
420
+ console.log("🚀 Testing SDK...");
421
+ const api = new ClientApi();
422
+
423
+ const body = {
424
+ // CreateApplicationDTO | Application creation data
425
+ createApplicationDTO: ...,
426
+ } satisfies CreateApplicationRequest;
427
+
428
+ try {
429
+ const data = await api.createApplication(body);
430
+ console.log(data);
431
+ } catch (error) {
432
+ console.error(error);
433
+ }
434
+ }
435
+
436
+ // Run the test
437
+ example().catch(console.error);
438
+ ```
439
+
440
+ ### Parameters
441
+
442
+
443
+ | Name | Type | Description | Notes |
444
+ |------------- | ------------- | ------------- | -------------|
445
+ | **createApplicationDTO** | [CreateApplicationDTO](CreateApplicationDTO.md) | Application creation data | |
446
+
447
+ ### Return type
448
+
449
+ [**ApplicationDTO**](ApplicationDTO.md)
450
+
451
+ ### Authorization
452
+
453
+ No authorization required
454
+
455
+ ### HTTP request headers
456
+
457
+ - **Content-Type**: `application/json`
458
+ - **Accept**: `application/json`
459
+
460
+
461
+ ### HTTP response details
462
+ | Status code | Description | Response headers |
463
+ |-------------|-------------|------------------|
464
+ | **201** | Create a application and returns the created application | - |
465
+ | **400** | Return an error if there is a missing or invalid field | - |
466
+ | **401** | Return an error if the user is not authenticated | - |
467
+ | **403** | Return an error if the user does not have the required permissions | - |
468
+ | **500** | Return an error if the server founds an error | - |
469
+
470
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
471
+
472
+
473
+ ## deleteApplication
474
+
475
+ > deleteApplication(applicationId)
476
+
477
+ Delete an application
478
+
479
+ Delete an application belonging to the authenticated account
480
+
481
+ ### Example
482
+
483
+ ```ts
484
+ import {
485
+ Configuration,
486
+ ClientApi,
487
+ } from '';
488
+ import type { DeleteApplicationRequest } from '';
489
+
490
+ async function example() {
491
+ console.log("🚀 Testing SDK...");
492
+ const api = new ClientApi();
493
+
494
+ const body = {
495
+ // string | Application ID
496
+ applicationId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
497
+ } satisfies DeleteApplicationRequest;
498
+
499
+ try {
500
+ const data = await api.deleteApplication(body);
501
+ console.log(data);
502
+ } catch (error) {
503
+ console.error(error);
504
+ }
505
+ }
506
+
507
+ // Run the test
508
+ example().catch(console.error);
509
+ ```
510
+
511
+ ### Parameters
512
+
513
+
514
+ | Name | Type | Description | Notes |
515
+ |------------- | ------------- | ------------- | -------------|
516
+ | **applicationId** | `string` | Application ID | [Defaults to `undefined`] |
517
+
518
+ ### Return type
519
+
520
+ `void` (Empty response body)
521
+
522
+ ### Authorization
523
+
524
+ No authorization required
525
+
526
+ ### HTTP request headers
527
+
528
+ - **Content-Type**: Not defined
529
+ - **Accept**: `application/json`
530
+
531
+
532
+ ### HTTP response details
533
+ | Status code | Description | Response headers |
534
+ |-------------|-------------|------------------|
535
+ | **204** | Application deleted | - |
536
+ | **400** | Return an error if provided ID is not a valid UUID | - |
537
+ | **401** | Return an error if the user is not authenticated | - |
538
+ | **403** | Return an error if the user does not have the required permissions | - |
539
+ | **500** | Return an error if the server founds an error | - |
540
+
541
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
542
+
543
+
544
+ ## deleteTemplate
545
+
546
+ > deleteTemplate(id, applicationId)
547
+
548
+ Delete an template
549
+
550
+ Delete an template
551
+
552
+ ### Example
553
+
554
+ ```ts
555
+ import {
556
+ Configuration,
557
+ ClientApi,
558
+ } from '';
559
+ import type { DeleteTemplateRequest } from '';
560
+
561
+ async function example() {
562
+ console.log("🚀 Testing SDK...");
563
+ const api = new ClientApi();
564
+
565
+ const body = {
566
+ // string | Template ID
567
+ id: id_example,
568
+ // string | Application ID
569
+ applicationId: applicationId_example,
570
+ } satisfies DeleteTemplateRequest;
571
+
572
+ try {
573
+ const data = await api.deleteTemplate(body);
574
+ console.log(data);
575
+ } catch (error) {
576
+ console.error(error);
577
+ }
578
+ }
579
+
580
+ // Run the test
581
+ example().catch(console.error);
582
+ ```
583
+
584
+ ### Parameters
585
+
586
+
587
+ | Name | Type | Description | Notes |
588
+ |------------- | ------------- | ------------- | -------------|
589
+ | **id** | `string` | Template ID | [Defaults to `undefined`] |
590
+ | **applicationId** | `string` | Application ID | [Defaults to `undefined`] |
591
+
592
+ ### Return type
593
+
594
+ `void` (Empty response body)
595
+
596
+ ### Authorization
597
+
598
+ No authorization required
599
+
600
+ ### HTTP request headers
601
+
602
+ - **Content-Type**: Not defined
603
+ - **Accept**: `application/json`
604
+
605
+
606
+ ### HTTP response details
607
+ | Status code | Description | Response headers |
608
+ |-------------|-------------|------------------|
609
+ | **204** | Template deleted successfully | - |
610
+ | **400** | Return an error if there is a missing or invalid field | - |
611
+ | **401** | Return an error if the user is not authorized | - |
612
+ | **404** | Return an error if subscription not found | - |
613
+ | **500** | Return an error if an internal error occurs | - |
614
+
615
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
616
+
617
+
618
+ ## getApplicationByID
619
+
620
+ > ApplicationDTO getApplicationByID(applicationId)
621
+
622
+ Get an application by applicationId
623
+
624
+ Get a specific application belonging to the authenticated account
625
+
626
+ ### Example
627
+
628
+ ```ts
629
+ import {
630
+ Configuration,
631
+ ClientApi,
632
+ } from '';
633
+ import type { GetApplicationByIDRequest } from '';
634
+
635
+ async function example() {
636
+ console.log("🚀 Testing SDK...");
637
+ const api = new ClientApi();
638
+
639
+ const body = {
640
+ // string | Application ID
641
+ applicationId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
642
+ } satisfies GetApplicationByIDRequest;
643
+
644
+ try {
645
+ const data = await api.getApplicationByID(body);
646
+ console.log(data);
647
+ } catch (error) {
648
+ console.error(error);
649
+ }
650
+ }
651
+
652
+ // Run the test
653
+ example().catch(console.error);
654
+ ```
655
+
656
+ ### Parameters
657
+
658
+
659
+ | Name | Type | Description | Notes |
660
+ |------------- | ------------- | ------------- | -------------|
661
+ | **applicationId** | `string` | Application ID | [Defaults to `undefined`] |
662
+
663
+ ### Return type
664
+
665
+ [**ApplicationDTO**](ApplicationDTO.md)
666
+
667
+ ### Authorization
668
+
669
+ No authorization required
670
+
671
+ ### HTTP request headers
672
+
673
+ - **Content-Type**: Not defined
674
+ - **Accept**: `application/json`
675
+
676
+
677
+ ### HTTP response details
678
+ | Status code | Description | Response headers |
679
+ |-------------|-------------|------------------|
680
+ | **200** | Return an application | - |
681
+ | **400** | Return an error if provided ID is not a valid UUID | - |
682
+ | **401** | Return an error if the user is not authenticated | - |
683
+ | **403** | Return an error if the user does not have the required permissions | - |
684
+ | **404** | Return an error if the application is not found | - |
685
+ | **500** | Return an error if the server founds an error | - |
686
+
687
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
688
+
689
+
690
+ ## getApplications
691
+
692
+ > PaginatedApplicationsDTO getApplications(page, pageSize)
693
+
694
+ Get all applications for the account
695
+
696
+ Get all applications belonging to the authenticated account
697
+
698
+ ### Example
699
+
700
+ ```ts
701
+ import {
702
+ Configuration,
703
+ ClientApi,
704
+ } from '';
705
+ import type { GetApplicationsRequest } from '';
706
+
707
+ async function example() {
708
+ console.log("🚀 Testing SDK...");
709
+ const api = new ClientApi();
710
+
711
+ const body = {
712
+ // number | Page number for pagination (optional)
713
+ page: 56,
714
+ // number | Limit number of items per page (optional)
715
+ pageSize: 56,
716
+ } satisfies GetApplicationsRequest;
717
+
718
+ try {
719
+ const data = await api.getApplications(body);
720
+ console.log(data);
721
+ } catch (error) {
722
+ console.error(error);
723
+ }
724
+ }
725
+
726
+ // Run the test
727
+ example().catch(console.error);
728
+ ```
729
+
730
+ ### Parameters
731
+
732
+
733
+ | Name | Type | Description | Notes |
734
+ |------------- | ------------- | ------------- | -------------|
735
+ | **page** | `number` | Page number for pagination | [Optional] [Defaults to `1`] |
736
+ | **pageSize** | `number` | Limit number of items per page | [Optional] [Defaults to `10`] |
737
+
738
+ ### Return type
739
+
740
+ [**PaginatedApplicationsDTO**](PaginatedApplicationsDTO.md)
741
+
742
+ ### Authorization
743
+
744
+ No authorization required
745
+
746
+ ### HTTP request headers
747
+
748
+ - **Content-Type**: Not defined
749
+ - **Accept**: `application/json`
750
+
751
+
752
+ ### HTTP response details
753
+ | Status code | Description | Response headers |
754
+ |-------------|-------------|------------------|
755
+ | **200** | Return a list of applications | - |
756
+ | **401** | Return an error if the user is not authenticated | - |
757
+ | **403** | Return an error if the user does not have the required permissions | - |
758
+ | **500** | Return an error if the server founds an error | - |
759
+
760
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
761
+
762
+
763
+ ## getTemplate
764
+
765
+ > string getTemplate(id, applicationId)
766
+
767
+ Return a template
768
+
769
+ Return a template
770
+
771
+ ### Example
772
+
773
+ ```ts
774
+ import {
775
+ Configuration,
776
+ ClientApi,
777
+ } from '';
778
+ import type { GetTemplateRequest } from '';
779
+
780
+ async function example() {
781
+ console.log("🚀 Testing SDK...");
782
+ const api = new ClientApi();
783
+
784
+ const body = {
785
+ // string | Email template ID
786
+ id: id_example,
787
+ // string | Application ID
788
+ applicationId: applicationId_example,
789
+ } satisfies GetTemplateRequest;
790
+
791
+ try {
792
+ const data = await api.getTemplate(body);
793
+ console.log(data);
794
+ } catch (error) {
795
+ console.error(error);
796
+ }
797
+ }
798
+
799
+ // Run the test
800
+ example().catch(console.error);
801
+ ```
802
+
803
+ ### Parameters
804
+
805
+
806
+ | Name | Type | Description | Notes |
807
+ |------------- | ------------- | ------------- | -------------|
808
+ | **id** | `string` | Email template ID | [Defaults to `undefined`] |
809
+ | **applicationId** | `string` | Application ID | [Defaults to `undefined`] |
810
+
811
+ ### Return type
812
+
813
+ **string**
814
+
815
+ ### Authorization
816
+
817
+ No authorization required
818
+
819
+ ### HTTP request headers
820
+
821
+ - **Content-Type**: Not defined
822
+ - **Accept**: `application/json`
823
+
824
+
825
+ ### HTTP response details
826
+ | Status code | Description | Response headers |
827
+ |-------------|-------------|------------------|
828
+ | **200** | Template content | - |
829
+ | **401** | Return an error if the user is not authorized | - |
830
+ | **403** | Return an error if the user does not have the required permissions | - |
831
+ | **404** | Return an error if template is not found | - |
832
+ | **500** | Return an error if an internal error occurs | - |
833
+
834
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
835
+
836
+
837
+ ## getTemplates
838
+
839
+ > PaginatedEmailTemplateDTO getTemplates(applicationId, page, pageSize)
840
+
841
+ Return all templates
842
+
843
+ Return all templates
844
+
845
+ ### Example
846
+
847
+ ```ts
848
+ import {
849
+ Configuration,
850
+ ClientApi,
851
+ } from '';
852
+ import type { GetTemplatesRequest } from '';
853
+
854
+ async function example() {
855
+ console.log("🚀 Testing SDK...");
856
+ const api = new ClientApi();
857
+
858
+ const body = {
859
+ // string | Application ID
860
+ applicationId: applicationId_example,
861
+ // number | Page number for pagination (optional)
862
+ page: 56,
863
+ // number | Limit number of items per page (optional)
864
+ pageSize: 56,
865
+ } satisfies GetTemplatesRequest;
866
+
867
+ try {
868
+ const data = await api.getTemplates(body);
869
+ console.log(data);
870
+ } catch (error) {
871
+ console.error(error);
872
+ }
873
+ }
874
+
875
+ // Run the test
876
+ example().catch(console.error);
877
+ ```
878
+
879
+ ### Parameters
880
+
881
+
882
+ | Name | Type | Description | Notes |
883
+ |------------- | ------------- | ------------- | -------------|
884
+ | **applicationId** | `string` | Application ID | [Defaults to `undefined`] |
885
+ | **page** | `number` | Page number for pagination | [Optional] [Defaults to `undefined`] |
886
+ | **pageSize** | `number` | Limit number of items per page | [Optional] [Defaults to `undefined`] |
887
+
888
+ ### Return type
889
+
890
+ [**PaginatedEmailTemplateDTO**](PaginatedEmailTemplateDTO.md)
891
+
892
+ ### Authorization
893
+
894
+ No authorization required
895
+
896
+ ### HTTP request headers
897
+
898
+ - **Content-Type**: Not defined
899
+ - **Accept**: `application/json`
900
+
901
+
902
+ ### HTTP response details
903
+ | Status code | Description | Response headers |
904
+ |-------------|-------------|------------------|
905
+ | **200** | OK | - |
906
+ | **401** | Return an error if the user is not authorized | - |
907
+ | **403** | Return an error if the user does not have the required permissions | - |
908
+ | **500** | Return an error if an internal error occurs | - |
909
+
910
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
911
+
912
+
913
+ ## sendEmail
914
+
915
+ > sendEmail(applicationId, from, subject, templateUUID, to, body, data, file)
916
+
917
+ Send an email
918
+
919
+ Send an email
920
+
921
+ ### Example
922
+
923
+ ```ts
924
+ import {
925
+ Configuration,
926
+ ClientApi,
927
+ } from '';
928
+ import type { SendEmailRequest } from '';
929
+
930
+ async function example() {
931
+ console.log("🚀 Testing SDK...");
932
+ const api = new ClientApi();
933
+
934
+ const body = {
935
+ // string | Application ID
936
+ applicationId: applicationId_example,
937
+ // string | From
938
+ from: from_example,
939
+ // string | Subject
940
+ subject: subject_example,
941
+ // string | TemplateUUID
942
+ templateUUID: templateUUID_example,
943
+ // string | To
944
+ to: to_example,
945
+ // string | Body (optional)
946
+ body: body_example,
947
+ // string | Data (optional)
948
+ data: data_example,
949
+ // Blob | File (optional)
950
+ file: BINARY_DATA_HERE,
951
+ } satisfies SendEmailRequest;
952
+
953
+ try {
954
+ const data = await api.sendEmail(body);
955
+ console.log(data);
956
+ } catch (error) {
957
+ console.error(error);
958
+ }
959
+ }
960
+
961
+ // Run the test
962
+ example().catch(console.error);
963
+ ```
964
+
965
+ ### Parameters
966
+
967
+
968
+ | Name | Type | Description | Notes |
969
+ |------------- | ------------- | ------------- | -------------|
970
+ | **applicationId** | `string` | Application ID | [Defaults to `undefined`] |
971
+ | **from** | `string` | From | [Defaults to `undefined`] |
972
+ | **subject** | `string` | Subject | [Defaults to `undefined`] |
973
+ | **templateUUID** | `string` | TemplateUUID | [Defaults to `undefined`] |
974
+ | **to** | `string` | To | [Defaults to `undefined`] |
975
+ | **body** | `string` | Body | [Optional] [Defaults to `undefined`] |
976
+ | **data** | `string` | Data | [Optional] [Defaults to `undefined`] |
977
+ | **file** | `Blob` | File | [Optional] [Defaults to `undefined`] |
978
+
979
+ ### Return type
980
+
981
+ `void` (Empty response body)
982
+
983
+ ### Authorization
984
+
985
+ No authorization required
986
+
987
+ ### HTTP request headers
988
+
989
+ - **Content-Type**: `multipart/form-data`
990
+ - **Accept**: `application/json`
991
+
992
+
993
+ ### HTTP response details
994
+ | Status code | Description | Response headers |
995
+ |-------------|-------------|------------------|
996
+ | **202** | Email was sent | - |
997
+ | **400** | Return an error if there is a missing or invalid field | - |
998
+ | **401** | Return an error if the user is not authorized | - |
999
+ | **403** | Return an error if the user does not have the required permissions | - |
1000
+ | **500** | Return an error if an internal error occurs | - |
1001
+
1002
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
1003
+
1004
+
1005
+ ## updateApplication
1006
+
1007
+ > ApplicationDTO updateApplication(applicationId, updateApplicationDTO)
1008
+
1009
+ Update an application
1010
+
1011
+ Update an application belonging to the authenticated account
1012
+
1013
+ ### Example
1014
+
1015
+ ```ts
1016
+ import {
1017
+ Configuration,
1018
+ ClientApi,
1019
+ } from '';
1020
+ import type { UpdateApplicationRequest } from '';
1021
+
1022
+ async function example() {
1023
+ console.log("🚀 Testing SDK...");
1024
+ const api = new ClientApi();
1025
+
1026
+ const body = {
1027
+ // string | Application ID
1028
+ applicationId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
1029
+ // UpdateApplicationDTO | Application update data
1030
+ updateApplicationDTO: ...,
1031
+ } satisfies UpdateApplicationRequest;
1032
+
1033
+ try {
1034
+ const data = await api.updateApplication(body);
1035
+ console.log(data);
1036
+ } catch (error) {
1037
+ console.error(error);
1038
+ }
1039
+ }
1040
+
1041
+ // Run the test
1042
+ example().catch(console.error);
1043
+ ```
1044
+
1045
+ ### Parameters
1046
+
1047
+
1048
+ | Name | Type | Description | Notes |
1049
+ |------------- | ------------- | ------------- | -------------|
1050
+ | **applicationId** | `string` | Application ID | [Defaults to `undefined`] |
1051
+ | **updateApplicationDTO** | [UpdateApplicationDTO](UpdateApplicationDTO.md) | Application update data | |
1052
+
1053
+ ### Return type
1054
+
1055
+ [**ApplicationDTO**](ApplicationDTO.md)
1056
+
1057
+ ### Authorization
1058
+
1059
+ No authorization required
1060
+
1061
+ ### HTTP request headers
1062
+
1063
+ - **Content-Type**: `application/json`
1064
+ - **Accept**: `application/json`
1065
+
1066
+
1067
+ ### HTTP response details
1068
+ | Status code | Description | Response headers |
1069
+ |-------------|-------------|------------------|
1070
+ | **200** | Updates an application and return an updated application if the ID exists | - |
1071
+ | **400** | Return an error if provided ID is not a valid UUID | - |
1072
+ | **401** | Return an error if the user is not authenticated | - |
1073
+ | **403** | Return an error if the user does not have the required permissions | - |
1074
+ | **404** | Return an error if the application is not found | - |
1075
+ | **500** | Return an error if the server founds an error | - |
1076
+
1077
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
1078
+
1079
+
1080
+ ## updateTemplate
1081
+
1082
+ > UpdateEmailTemplateDTO updateTemplate(applicationId, id, file, name)
1083
+
1084
+ Update a template
1085
+
1086
+ Update a template
1087
+
1088
+ ### Example
1089
+
1090
+ ```ts
1091
+ import {
1092
+ Configuration,
1093
+ ClientApi,
1094
+ } from '';
1095
+ import type { UpdateTemplateRequest } from '';
1096
+
1097
+ async function example() {
1098
+ console.log("🚀 Testing SDK...");
1099
+ const api = new ClientApi();
1100
+
1101
+ const body = {
1102
+ // string | Application ID
1103
+ applicationId: applicationId_example,
1104
+ // string | Template ID
1105
+ id: id_example,
1106
+ // Blob | file (optional)
1107
+ file: BINARY_DATA_HERE,
1108
+ // string | Name (optional)
1109
+ name: name_example,
1110
+ } satisfies UpdateTemplateRequest;
1111
+
1112
+ try {
1113
+ const data = await api.updateTemplate(body);
1114
+ console.log(data);
1115
+ } catch (error) {
1116
+ console.error(error);
1117
+ }
1118
+ }
1119
+
1120
+ // Run the test
1121
+ example().catch(console.error);
1122
+ ```
1123
+
1124
+ ### Parameters
1125
+
1126
+
1127
+ | Name | Type | Description | Notes |
1128
+ |------------- | ------------- | ------------- | -------------|
1129
+ | **applicationId** | `string` | Application ID | [Defaults to `undefined`] |
1130
+ | **id** | `string` | Template ID | [Defaults to `undefined`] |
1131
+ | **file** | `Blob` | file | [Optional] [Defaults to `undefined`] |
1132
+ | **name** | `string` | Name | [Optional] [Defaults to `undefined`] |
1133
+
1134
+ ### Return type
1135
+
1136
+ [**UpdateEmailTemplateDTO**](UpdateEmailTemplateDTO.md)
1137
+
1138
+ ### Authorization
1139
+
1140
+ No authorization required
1141
+
1142
+ ### HTTP request headers
1143
+
1144
+ - **Content-Type**: `multipart/form-data`
1145
+ - **Accept**: `application/json`
1146
+
1147
+
1148
+ ### HTTP response details
1149
+ | Status code | Description | Response headers |
1150
+ |-------------|-------------|------------------|
1151
+ | **200** | Template updated successfully | - |
1152
+ | **400** | Return an error if input is invalid | - |
1153
+ | **401** | Unauthorized | - |
1154
+ | **403** | Forbidden | - |
1155
+ | **500** | Internal error | - |
1156
+
1157
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
1158
+
1159
+
1160
+ ## uploadTemplate
1161
+
1162
+ > EmailTemplateDTO uploadTemplate(applicationId, file, name)
1163
+
1164
+ Upload a template
1165
+
1166
+ Upload a template
1167
+
1168
+ ### Example
1169
+
1170
+ ```ts
1171
+ import {
1172
+ Configuration,
1173
+ ClientApi,
1174
+ } from '';
1175
+ import type { UploadTemplateRequest } from '';
1176
+
1177
+ async function example() {
1178
+ console.log("🚀 Testing SDK...");
1179
+ const api = new ClientApi();
1180
+
1181
+ const body = {
1182
+ // string | Application ID
1183
+ applicationId: applicationId_example,
1184
+ // Blob | file
1185
+ file: BINARY_DATA_HERE,
1186
+ // string | Name
1187
+ name: name_example,
1188
+ } satisfies UploadTemplateRequest;
1189
+
1190
+ try {
1191
+ const data = await api.uploadTemplate(body);
1192
+ console.log(data);
1193
+ } catch (error) {
1194
+ console.error(error);
1195
+ }
1196
+ }
1197
+
1198
+ // Run the test
1199
+ example().catch(console.error);
1200
+ ```
1201
+
1202
+ ### Parameters
1203
+
1204
+
1205
+ | Name | Type | Description | Notes |
1206
+ |------------- | ------------- | ------------- | -------------|
1207
+ | **applicationId** | `string` | Application ID | [Defaults to `undefined`] |
1208
+ | **file** | `Blob` | file | [Defaults to `undefined`] |
1209
+ | **name** | `string` | Name | [Defaults to `undefined`] |
1210
+
1211
+ ### Return type
1212
+
1213
+ [**EmailTemplateDTO**](EmailTemplateDTO.md)
1214
+
1215
+ ### Authorization
1216
+
1217
+ No authorization required
1218
+
1219
+ ### HTTP request headers
1220
+
1221
+ - **Content-Type**: `multipart/form-data`
1222
+ - **Accept**: `application/json`
1223
+
1224
+
1225
+ ### HTTP response details
1226
+ | Status code | Description | Response headers |
1227
+ |-------------|-------------|------------------|
1228
+ | **201** | Upload a template | - |
1229
+ | **400** | Return an error if there is a missing or invalid field | - |
1230
+ | **401** | Return an error if the user is not authorized | - |
1231
+ | **403** | Return an error if the user does not have the required permissions | - |
1232
+ | **500** | Return an error if an internal error occurs | - |
1233
+
1234
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
1235
+