@easyedu/js-lsm-api 1.41.0 → 1.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/.openapi-generator/FILES +20 -0
  2. package/README.md +20 -2
  3. package/dist/apis/SupportTicketApi.d.ts +191 -0
  4. package/dist/apis/SupportTicketApi.js +457 -0
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +1 -0
  7. package/dist/esm/apis/SupportTicketApi.d.ts +191 -0
  8. package/dist/esm/apis/SupportTicketApi.js +453 -0
  9. package/dist/esm/apis/index.d.ts +1 -0
  10. package/dist/esm/apis/index.js +1 -0
  11. package/dist/esm/models/DownloadSupportTicketAttachment200Response.d.ts +32 -0
  12. package/dist/esm/models/DownloadSupportTicketAttachment200Response.js +43 -0
  13. package/dist/esm/models/GetSupportTicket.d.ts +142 -0
  14. package/dist/esm/models/GetSupportTicket.js +120 -0
  15. package/dist/esm/models/GetSupportTicketAttachment.d.ts +62 -0
  16. package/dist/esm/models/GetSupportTicketAttachment.js +63 -0
  17. package/dist/esm/models/GetSupportTicketComment.d.ts +57 -0
  18. package/dist/esm/models/GetSupportTicketComment.js +60 -0
  19. package/dist/esm/models/GetSupportTicketList.d.ts +57 -0
  20. package/dist/esm/models/GetSupportTicketList.js +60 -0
  21. package/dist/esm/models/PostSupportTicket.d.ts +71 -0
  22. package/dist/esm/models/PostSupportTicket.js +74 -0
  23. package/dist/esm/models/PostSupportTicketComment.d.ts +38 -0
  24. package/dist/esm/models/PostSupportTicketComment.js +45 -0
  25. package/dist/esm/models/PutSupportTicket.d.ts +63 -0
  26. package/dist/esm/models/PutSupportTicket.js +62 -0
  27. package/dist/esm/models/SupportTicketUser.d.ts +50 -0
  28. package/dist/esm/models/SupportTicketUser.js +55 -0
  29. package/dist/esm/models/index.d.ts +9 -0
  30. package/dist/esm/models/index.js +9 -0
  31. package/dist/models/DownloadSupportTicketAttachment200Response.d.ts +32 -0
  32. package/dist/models/DownloadSupportTicketAttachment200Response.js +50 -0
  33. package/dist/models/GetSupportTicket.d.ts +142 -0
  34. package/dist/models/GetSupportTicket.js +128 -0
  35. package/dist/models/GetSupportTicketAttachment.d.ts +62 -0
  36. package/dist/models/GetSupportTicketAttachment.js +70 -0
  37. package/dist/models/GetSupportTicketComment.d.ts +57 -0
  38. package/dist/models/GetSupportTicketComment.js +67 -0
  39. package/dist/models/GetSupportTicketList.d.ts +57 -0
  40. package/dist/models/GetSupportTicketList.js +67 -0
  41. package/dist/models/PostSupportTicket.d.ts +71 -0
  42. package/dist/models/PostSupportTicket.js +82 -0
  43. package/dist/models/PostSupportTicketComment.d.ts +38 -0
  44. package/dist/models/PostSupportTicketComment.js +52 -0
  45. package/dist/models/PutSupportTicket.d.ts +63 -0
  46. package/dist/models/PutSupportTicket.js +70 -0
  47. package/dist/models/SupportTicketUser.d.ts +50 -0
  48. package/dist/models/SupportTicketUser.js +62 -0
  49. package/dist/models/index.d.ts +9 -0
  50. package/dist/models/index.js +9 -0
  51. package/docs/DownloadSupportTicketAttachment200Response.md +34 -0
  52. package/docs/GetSupportTicket.md +60 -0
  53. package/docs/GetSupportTicketAttachment.md +44 -0
  54. package/docs/GetSupportTicketComment.md +42 -0
  55. package/docs/GetSupportTicketList.md +42 -0
  56. package/docs/PostSupportTicket.md +40 -0
  57. package/docs/PostSupportTicketComment.md +36 -0
  58. package/docs/PutSupportTicket.md +38 -0
  59. package/docs/SupportTicketApi.md +651 -0
  60. package/docs/SupportTicketUser.md +40 -0
  61. package/package.json +1 -1
  62. package/src/apis/SupportTicketApi.ts +599 -0
  63. package/src/apis/index.ts +1 -0
  64. package/src/models/DownloadSupportTicketAttachment200Response.ts +66 -0
  65. package/src/models/GetSupportTicket.ts +231 -0
  66. package/src/models/GetSupportTicketAttachment.ts +111 -0
  67. package/src/models/GetSupportTicketComment.ts +110 -0
  68. package/src/models/GetSupportTicketList.ts +110 -0
  69. package/src/models/PostSupportTicket.ts +118 -0
  70. package/src/models/PostSupportTicketComment.ts +74 -0
  71. package/src/models/PutSupportTicket.ts +104 -0
  72. package/src/models/SupportTicketUser.ts +93 -0
  73. package/src/models/index.ts +9 -0
@@ -0,0 +1,40 @@
1
+
2
+ # SupportTicketUser
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `id` | string
10
+ `email` | string
11
+ `firstName` | string
12
+ `lastName` | string
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { SupportTicketUser } from '@easyedu/js-lsm-api'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "id": null,
22
+ "email": null,
23
+ "firstName": null,
24
+ "lastName": null,
25
+ } satisfies SupportTicketUser
26
+
27
+ console.log(example)
28
+
29
+ // Convert the instance to a JSON string
30
+ const exampleJSON: string = JSON.stringify(example)
31
+ console.log(exampleJSON)
32
+
33
+ // Parse the JSON string back to an object
34
+ const exampleParsed = JSON.parse(exampleJSON) as SupportTicketUser
35
+ console.log(exampleParsed)
36
+ ```
37
+
38
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
39
+
40
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.41.0",
3
+ "version": "1.42.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -0,0 +1,599 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ DownloadSupportTicketAttachment200Response,
19
+ GetSupportTicket,
20
+ GetSupportTicketAttachment,
21
+ GetSupportTicketComment,
22
+ GetSupportTicketList,
23
+ PostSupportTicket,
24
+ PostSupportTicketComment,
25
+ PutSupportTicket,
26
+ } from '../models/index';
27
+ import {
28
+ DownloadSupportTicketAttachment200ResponseFromJSON,
29
+ DownloadSupportTicketAttachment200ResponseToJSON,
30
+ GetSupportTicketFromJSON,
31
+ GetSupportTicketToJSON,
32
+ GetSupportTicketAttachmentFromJSON,
33
+ GetSupportTicketAttachmentToJSON,
34
+ GetSupportTicketCommentFromJSON,
35
+ GetSupportTicketCommentToJSON,
36
+ GetSupportTicketListFromJSON,
37
+ GetSupportTicketListToJSON,
38
+ PostSupportTicketFromJSON,
39
+ PostSupportTicketToJSON,
40
+ PostSupportTicketCommentFromJSON,
41
+ PostSupportTicketCommentToJSON,
42
+ PutSupportTicketFromJSON,
43
+ PutSupportTicketToJSON,
44
+ } from '../models/index';
45
+
46
+ export interface CloseSupportTicketRequest {
47
+ ticketId: string;
48
+ }
49
+
50
+ export interface DownloadSupportTicketAttachmentRequest {
51
+ ticketId: string;
52
+ attachmentId: string;
53
+ }
54
+
55
+ export interface GetSupportTicketRequest {
56
+ ticketId: string;
57
+ }
58
+
59
+ export interface GetSupportTicketCommentsRequest {
60
+ ticketId: string;
61
+ }
62
+
63
+ export interface GetSupportTicketsRequest {
64
+ page?: number;
65
+ pageSize?: number;
66
+ status?: GetSupportTicketsStatusEnum;
67
+ priority?: GetSupportTicketsPriorityEnum;
68
+ category?: GetSupportTicketsCategoryEnum;
69
+ }
70
+
71
+ export interface PostSupportTicketRequest {
72
+ postSupportTicket: PostSupportTicket;
73
+ }
74
+
75
+ export interface PostSupportTicketAttachmentRequest {
76
+ ticketId: string;
77
+ file: Blob;
78
+ }
79
+
80
+ export interface PostSupportTicketCommentRequest {
81
+ ticketId: string;
82
+ postSupportTicketComment: PostSupportTicketComment;
83
+ }
84
+
85
+ export interface PutSupportTicketRequest {
86
+ ticketId: string;
87
+ putSupportTicket: PutSupportTicket;
88
+ }
89
+
90
+ /**
91
+ *
92
+ */
93
+ export class SupportTicketApi extends runtime.BaseAPI {
94
+
95
+ /**
96
+ * Creates request options for closeSupportTicket without sending the request
97
+ */
98
+ async closeSupportTicketRequestOpts(requestParameters: CloseSupportTicketRequest): Promise<runtime.RequestOpts> {
99
+ if (requestParameters['ticketId'] == null) {
100
+ throw new runtime.RequiredError(
101
+ 'ticketId',
102
+ 'Required parameter "ticketId" was null or undefined when calling closeSupportTicket().'
103
+ );
104
+ }
105
+
106
+ const queryParameters: any = {};
107
+
108
+ const headerParameters: runtime.HTTPHeaders = {};
109
+
110
+
111
+ let urlPath = `/support/tickets/{ticketId}/close`;
112
+ urlPath = urlPath.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId'])));
113
+
114
+ return {
115
+ path: urlPath,
116
+ method: 'POST',
117
+ headers: headerParameters,
118
+ query: queryParameters,
119
+ };
120
+ }
121
+
122
+ /**
123
+ * Close a support ticket
124
+ */
125
+ async closeSupportTicketRaw(requestParameters: CloseSupportTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
126
+ const requestOptions = await this.closeSupportTicketRequestOpts(requestParameters);
127
+ const response = await this.request(requestOptions, initOverrides);
128
+
129
+ return new runtime.VoidApiResponse(response);
130
+ }
131
+
132
+ /**
133
+ * Close a support ticket
134
+ */
135
+ async closeSupportTicket(requestParameters: CloseSupportTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
136
+ await this.closeSupportTicketRaw(requestParameters, initOverrides);
137
+ }
138
+
139
+ /**
140
+ * Creates request options for downloadSupportTicketAttachment without sending the request
141
+ */
142
+ async downloadSupportTicketAttachmentRequestOpts(requestParameters: DownloadSupportTicketAttachmentRequest): Promise<runtime.RequestOpts> {
143
+ if (requestParameters['ticketId'] == null) {
144
+ throw new runtime.RequiredError(
145
+ 'ticketId',
146
+ 'Required parameter "ticketId" was null or undefined when calling downloadSupportTicketAttachment().'
147
+ );
148
+ }
149
+
150
+ if (requestParameters['attachmentId'] == null) {
151
+ throw new runtime.RequiredError(
152
+ 'attachmentId',
153
+ 'Required parameter "attachmentId" was null or undefined when calling downloadSupportTicketAttachment().'
154
+ );
155
+ }
156
+
157
+ const queryParameters: any = {};
158
+
159
+ const headerParameters: runtime.HTTPHeaders = {};
160
+
161
+
162
+ let urlPath = `/support/tickets/{ticketId}/attachments/{attachmentId}/download`;
163
+ urlPath = urlPath.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId'])));
164
+ urlPath = urlPath.replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId'])));
165
+
166
+ return {
167
+ path: urlPath,
168
+ method: 'GET',
169
+ headers: headerParameters,
170
+ query: queryParameters,
171
+ };
172
+ }
173
+
174
+ /**
175
+ * Download a ticket attachment
176
+ */
177
+ async downloadSupportTicketAttachmentRaw(requestParameters: DownloadSupportTicketAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DownloadSupportTicketAttachment200Response>> {
178
+ const requestOptions = await this.downloadSupportTicketAttachmentRequestOpts(requestParameters);
179
+ const response = await this.request(requestOptions, initOverrides);
180
+
181
+ return new runtime.JSONApiResponse(response, (jsonValue) => DownloadSupportTicketAttachment200ResponseFromJSON(jsonValue));
182
+ }
183
+
184
+ /**
185
+ * Download a ticket attachment
186
+ */
187
+ async downloadSupportTicketAttachment(requestParameters: DownloadSupportTicketAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DownloadSupportTicketAttachment200Response> {
188
+ const response = await this.downloadSupportTicketAttachmentRaw(requestParameters, initOverrides);
189
+ return await response.value();
190
+ }
191
+
192
+ /**
193
+ * Creates request options for getSupportTicket without sending the request
194
+ */
195
+ async getSupportTicketRequestOpts(requestParameters: GetSupportTicketRequest): Promise<runtime.RequestOpts> {
196
+ if (requestParameters['ticketId'] == null) {
197
+ throw new runtime.RequiredError(
198
+ 'ticketId',
199
+ 'Required parameter "ticketId" was null or undefined when calling getSupportTicket().'
200
+ );
201
+ }
202
+
203
+ const queryParameters: any = {};
204
+
205
+ const headerParameters: runtime.HTTPHeaders = {};
206
+
207
+
208
+ let urlPath = `/support/tickets/{ticketId}`;
209
+ urlPath = urlPath.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId'])));
210
+
211
+ return {
212
+ path: urlPath,
213
+ method: 'GET',
214
+ headers: headerParameters,
215
+ query: queryParameters,
216
+ };
217
+ }
218
+
219
+ /**
220
+ * Get support ticket details
221
+ */
222
+ async getSupportTicketRaw(requestParameters: GetSupportTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSupportTicket>> {
223
+ const requestOptions = await this.getSupportTicketRequestOpts(requestParameters);
224
+ const response = await this.request(requestOptions, initOverrides);
225
+
226
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetSupportTicketFromJSON(jsonValue));
227
+ }
228
+
229
+ /**
230
+ * Get support ticket details
231
+ */
232
+ async getSupportTicket(requestParameters: GetSupportTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSupportTicket> {
233
+ const response = await this.getSupportTicketRaw(requestParameters, initOverrides);
234
+ return await response.value();
235
+ }
236
+
237
+ /**
238
+ * Creates request options for getSupportTicketComments without sending the request
239
+ */
240
+ async getSupportTicketCommentsRequestOpts(requestParameters: GetSupportTicketCommentsRequest): Promise<runtime.RequestOpts> {
241
+ if (requestParameters['ticketId'] == null) {
242
+ throw new runtime.RequiredError(
243
+ 'ticketId',
244
+ 'Required parameter "ticketId" was null or undefined when calling getSupportTicketComments().'
245
+ );
246
+ }
247
+
248
+ const queryParameters: any = {};
249
+
250
+ const headerParameters: runtime.HTTPHeaders = {};
251
+
252
+
253
+ let urlPath = `/support/tickets/{ticketId}/comments`;
254
+ urlPath = urlPath.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId'])));
255
+
256
+ return {
257
+ path: urlPath,
258
+ method: 'GET',
259
+ headers: headerParameters,
260
+ query: queryParameters,
261
+ };
262
+ }
263
+
264
+ /**
265
+ * Get comments for a ticket
266
+ */
267
+ async getSupportTicketCommentsRaw(requestParameters: GetSupportTicketCommentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GetSupportTicketComment>>> {
268
+ const requestOptions = await this.getSupportTicketCommentsRequestOpts(requestParameters);
269
+ const response = await this.request(requestOptions, initOverrides);
270
+
271
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GetSupportTicketCommentFromJSON));
272
+ }
273
+
274
+ /**
275
+ * Get comments for a ticket
276
+ */
277
+ async getSupportTicketComments(requestParameters: GetSupportTicketCommentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GetSupportTicketComment>> {
278
+ const response = await this.getSupportTicketCommentsRaw(requestParameters, initOverrides);
279
+ return await response.value();
280
+ }
281
+
282
+ /**
283
+ * Creates request options for getSupportTickets without sending the request
284
+ */
285
+ async getSupportTicketsRequestOpts(requestParameters: GetSupportTicketsRequest): Promise<runtime.RequestOpts> {
286
+ const queryParameters: any = {};
287
+
288
+ if (requestParameters['page'] != null) {
289
+ queryParameters['page'] = requestParameters['page'];
290
+ }
291
+
292
+ if (requestParameters['pageSize'] != null) {
293
+ queryParameters['pageSize'] = requestParameters['pageSize'];
294
+ }
295
+
296
+ if (requestParameters['status'] != null) {
297
+ queryParameters['status'] = requestParameters['status'];
298
+ }
299
+
300
+ if (requestParameters['priority'] != null) {
301
+ queryParameters['priority'] = requestParameters['priority'];
302
+ }
303
+
304
+ if (requestParameters['category'] != null) {
305
+ queryParameters['category'] = requestParameters['category'];
306
+ }
307
+
308
+ const headerParameters: runtime.HTTPHeaders = {};
309
+
310
+
311
+ let urlPath = `/support/tickets`;
312
+
313
+ return {
314
+ path: urlPath,
315
+ method: 'GET',
316
+ headers: headerParameters,
317
+ query: queryParameters,
318
+ };
319
+ }
320
+
321
+ /**
322
+ * List support tickets
323
+ */
324
+ async getSupportTicketsRaw(requestParameters: GetSupportTicketsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSupportTicketList>> {
325
+ const requestOptions = await this.getSupportTicketsRequestOpts(requestParameters);
326
+ const response = await this.request(requestOptions, initOverrides);
327
+
328
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetSupportTicketListFromJSON(jsonValue));
329
+ }
330
+
331
+ /**
332
+ * List support tickets
333
+ */
334
+ async getSupportTickets(requestParameters: GetSupportTicketsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSupportTicketList> {
335
+ const response = await this.getSupportTicketsRaw(requestParameters, initOverrides);
336
+ return await response.value();
337
+ }
338
+
339
+ /**
340
+ * Creates request options for postSupportTicket without sending the request
341
+ */
342
+ async postSupportTicketRequestOpts(requestParameters: PostSupportTicketRequest): Promise<runtime.RequestOpts> {
343
+ if (requestParameters['postSupportTicket'] == null) {
344
+ throw new runtime.RequiredError(
345
+ 'postSupportTicket',
346
+ 'Required parameter "postSupportTicket" was null or undefined when calling postSupportTicket().'
347
+ );
348
+ }
349
+
350
+ const queryParameters: any = {};
351
+
352
+ const headerParameters: runtime.HTTPHeaders = {};
353
+
354
+ headerParameters['Content-Type'] = 'application/json';
355
+
356
+
357
+ let urlPath = `/support/tickets`;
358
+
359
+ return {
360
+ path: urlPath,
361
+ method: 'POST',
362
+ headers: headerParameters,
363
+ query: queryParameters,
364
+ body: PostSupportTicketToJSON(requestParameters['postSupportTicket']),
365
+ };
366
+ }
367
+
368
+ /**
369
+ * Create a support ticket
370
+ */
371
+ async postSupportTicketRaw(requestParameters: PostSupportTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSupportTicket>> {
372
+ const requestOptions = await this.postSupportTicketRequestOpts(requestParameters);
373
+ const response = await this.request(requestOptions, initOverrides);
374
+
375
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetSupportTicketFromJSON(jsonValue));
376
+ }
377
+
378
+ /**
379
+ * Create a support ticket
380
+ */
381
+ async postSupportTicket(requestParameters: PostSupportTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSupportTicket> {
382
+ const response = await this.postSupportTicketRaw(requestParameters, initOverrides);
383
+ return await response.value();
384
+ }
385
+
386
+ /**
387
+ * Creates request options for postSupportTicketAttachment without sending the request
388
+ */
389
+ async postSupportTicketAttachmentRequestOpts(requestParameters: PostSupportTicketAttachmentRequest): Promise<runtime.RequestOpts> {
390
+ if (requestParameters['ticketId'] == null) {
391
+ throw new runtime.RequiredError(
392
+ 'ticketId',
393
+ 'Required parameter "ticketId" was null or undefined when calling postSupportTicketAttachment().'
394
+ );
395
+ }
396
+
397
+ if (requestParameters['file'] == null) {
398
+ throw new runtime.RequiredError(
399
+ 'file',
400
+ 'Required parameter "file" was null or undefined when calling postSupportTicketAttachment().'
401
+ );
402
+ }
403
+
404
+ const queryParameters: any = {};
405
+
406
+ const headerParameters: runtime.HTTPHeaders = {};
407
+
408
+ const consumes: runtime.Consume[] = [
409
+ { contentType: 'multipart/form-data' },
410
+ ];
411
+ // @ts-ignore: canConsumeForm may be unused
412
+ const canConsumeForm = runtime.canConsumeForm(consumes);
413
+
414
+ let formParams: { append(param: string, value: any): any };
415
+ let useForm = false;
416
+ // use FormData to transmit files using content-type "multipart/form-data"
417
+ useForm = canConsumeForm;
418
+ if (useForm) {
419
+ formParams = new FormData();
420
+ } else {
421
+ formParams = new URLSearchParams();
422
+ }
423
+
424
+ if (requestParameters['file'] != null) {
425
+ formParams.append('file', requestParameters['file'] as any);
426
+ }
427
+
428
+
429
+ let urlPath = `/support/tickets/{ticketId}/attachments`;
430
+ urlPath = urlPath.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId'])));
431
+
432
+ return {
433
+ path: urlPath,
434
+ method: 'POST',
435
+ headers: headerParameters,
436
+ query: queryParameters,
437
+ body: formParams,
438
+ };
439
+ }
440
+
441
+ /**
442
+ * Upload an attachment to a ticket
443
+ */
444
+ async postSupportTicketAttachmentRaw(requestParameters: PostSupportTicketAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSupportTicketAttachment>> {
445
+ const requestOptions = await this.postSupportTicketAttachmentRequestOpts(requestParameters);
446
+ const response = await this.request(requestOptions, initOverrides);
447
+
448
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetSupportTicketAttachmentFromJSON(jsonValue));
449
+ }
450
+
451
+ /**
452
+ * Upload an attachment to a ticket
453
+ */
454
+ async postSupportTicketAttachment(requestParameters: PostSupportTicketAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSupportTicketAttachment> {
455
+ const response = await this.postSupportTicketAttachmentRaw(requestParameters, initOverrides);
456
+ return await response.value();
457
+ }
458
+
459
+ /**
460
+ * Creates request options for postSupportTicketComment without sending the request
461
+ */
462
+ async postSupportTicketCommentRequestOpts(requestParameters: PostSupportTicketCommentRequest): Promise<runtime.RequestOpts> {
463
+ if (requestParameters['ticketId'] == null) {
464
+ throw new runtime.RequiredError(
465
+ 'ticketId',
466
+ 'Required parameter "ticketId" was null or undefined when calling postSupportTicketComment().'
467
+ );
468
+ }
469
+
470
+ if (requestParameters['postSupportTicketComment'] == null) {
471
+ throw new runtime.RequiredError(
472
+ 'postSupportTicketComment',
473
+ 'Required parameter "postSupportTicketComment" was null or undefined when calling postSupportTicketComment().'
474
+ );
475
+ }
476
+
477
+ const queryParameters: any = {};
478
+
479
+ const headerParameters: runtime.HTTPHeaders = {};
480
+
481
+ headerParameters['Content-Type'] = 'application/json';
482
+
483
+
484
+ let urlPath = `/support/tickets/{ticketId}/comments`;
485
+ urlPath = urlPath.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId'])));
486
+
487
+ return {
488
+ path: urlPath,
489
+ method: 'POST',
490
+ headers: headerParameters,
491
+ query: queryParameters,
492
+ body: PostSupportTicketCommentToJSON(requestParameters['postSupportTicketComment']),
493
+ };
494
+ }
495
+
496
+ /**
497
+ * Add a comment to a ticket
498
+ */
499
+ async postSupportTicketCommentRaw(requestParameters: PostSupportTicketCommentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSupportTicketComment>> {
500
+ const requestOptions = await this.postSupportTicketCommentRequestOpts(requestParameters);
501
+ const response = await this.request(requestOptions, initOverrides);
502
+
503
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetSupportTicketCommentFromJSON(jsonValue));
504
+ }
505
+
506
+ /**
507
+ * Add a comment to a ticket
508
+ */
509
+ async postSupportTicketComment(requestParameters: PostSupportTicketCommentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSupportTicketComment> {
510
+ const response = await this.postSupportTicketCommentRaw(requestParameters, initOverrides);
511
+ return await response.value();
512
+ }
513
+
514
+ /**
515
+ * Creates request options for putSupportTicket without sending the request
516
+ */
517
+ async putSupportTicketRequestOpts(requestParameters: PutSupportTicketRequest): Promise<runtime.RequestOpts> {
518
+ if (requestParameters['ticketId'] == null) {
519
+ throw new runtime.RequiredError(
520
+ 'ticketId',
521
+ 'Required parameter "ticketId" was null or undefined when calling putSupportTicket().'
522
+ );
523
+ }
524
+
525
+ if (requestParameters['putSupportTicket'] == null) {
526
+ throw new runtime.RequiredError(
527
+ 'putSupportTicket',
528
+ 'Required parameter "putSupportTicket" was null or undefined when calling putSupportTicket().'
529
+ );
530
+ }
531
+
532
+ const queryParameters: any = {};
533
+
534
+ const headerParameters: runtime.HTTPHeaders = {};
535
+
536
+ headerParameters['Content-Type'] = 'application/json';
537
+
538
+
539
+ let urlPath = `/support/tickets/{ticketId}`;
540
+ urlPath = urlPath.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId'])));
541
+
542
+ return {
543
+ path: urlPath,
544
+ method: 'PUT',
545
+ headers: headerParameters,
546
+ query: queryParameters,
547
+ body: PutSupportTicketToJSON(requestParameters['putSupportTicket']),
548
+ };
549
+ }
550
+
551
+ /**
552
+ * Update a support ticket
553
+ */
554
+ async putSupportTicketRaw(requestParameters: PutSupportTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
555
+ const requestOptions = await this.putSupportTicketRequestOpts(requestParameters);
556
+ const response = await this.request(requestOptions, initOverrides);
557
+
558
+ return new runtime.VoidApiResponse(response);
559
+ }
560
+
561
+ /**
562
+ * Update a support ticket
563
+ */
564
+ async putSupportTicket(requestParameters: PutSupportTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
565
+ await this.putSupportTicketRaw(requestParameters, initOverrides);
566
+ }
567
+
568
+ }
569
+
570
+ /**
571
+ * @export
572
+ */
573
+ export const GetSupportTicketsStatusEnum = {
574
+ Open: 'Open',
575
+ InProgress: 'InProgress',
576
+ Closed: 'Closed'
577
+ } as const;
578
+ export type GetSupportTicketsStatusEnum = typeof GetSupportTicketsStatusEnum[keyof typeof GetSupportTicketsStatusEnum];
579
+ /**
580
+ * @export
581
+ */
582
+ export const GetSupportTicketsPriorityEnum = {
583
+ Low: 'Low',
584
+ Medium: 'Medium',
585
+ High: 'High',
586
+ Critical: 'Critical'
587
+ } as const;
588
+ export type GetSupportTicketsPriorityEnum = typeof GetSupportTicketsPriorityEnum[keyof typeof GetSupportTicketsPriorityEnum];
589
+ /**
590
+ * @export
591
+ */
592
+ export const GetSupportTicketsCategoryEnum = {
593
+ Bug: 'Bug',
594
+ FeatureRequest: 'FeatureRequest',
595
+ AccountIssue: 'AccountIssue',
596
+ ContentIssue: 'ContentIssue',
597
+ Other: 'Other'
598
+ } as const;
599
+ export type GetSupportTicketsCategoryEnum = typeof GetSupportTicketsCategoryEnum[keyof typeof GetSupportTicketsCategoryEnum];
package/src/apis/index.ts CHANGED
@@ -10,4 +10,5 @@ export * from './QuestionApi';
10
10
  export * from './QuizApi';
11
11
  export * from './ReportingApi';
12
12
  export * from './RoleApi';
13
+ export * from './SupportTicketApi';
13
14
  export * from './UserApi';