@easyedu/js-lsm-api 1.41.0 → 1.43.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 (91) hide show
  1. package/.openapi-generator/FILES +22 -0
  2. package/README.md +23 -2
  3. package/dist/apis/CourseApi.d.ts +32 -1
  4. package/dist/apis/CourseApi.js +99 -0
  5. package/dist/apis/SupportTicketApi.d.ts +191 -0
  6. package/dist/apis/SupportTicketApi.js +457 -0
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +1 -0
  9. package/dist/esm/apis/CourseApi.d.ts +32 -1
  10. package/dist/esm/apis/CourseApi.js +100 -1
  11. package/dist/esm/apis/SupportTicketApi.d.ts +191 -0
  12. package/dist/esm/apis/SupportTicketApi.js +453 -0
  13. package/dist/esm/apis/index.d.ts +1 -0
  14. package/dist/esm/apis/index.js +1 -0
  15. package/dist/esm/models/DownloadSupportTicketAttachment200Response.d.ts +32 -0
  16. package/dist/esm/models/DownloadSupportTicketAttachment200Response.js +43 -0
  17. package/dist/esm/models/GetCourseImageUpload.d.ts +32 -0
  18. package/dist/esm/models/GetCourseImageUpload.js +43 -0
  19. package/dist/esm/models/GetSupportTicket.d.ts +142 -0
  20. package/dist/esm/models/GetSupportTicket.js +120 -0
  21. package/dist/esm/models/GetSupportTicketAttachment.d.ts +62 -0
  22. package/dist/esm/models/GetSupportTicketAttachment.js +63 -0
  23. package/dist/esm/models/GetSupportTicketComment.d.ts +57 -0
  24. package/dist/esm/models/GetSupportTicketComment.js +60 -0
  25. package/dist/esm/models/GetSupportTicketList.d.ts +57 -0
  26. package/dist/esm/models/GetSupportTicketList.js +60 -0
  27. package/dist/esm/models/PostSupportTicket.d.ts +71 -0
  28. package/dist/esm/models/PostSupportTicket.js +74 -0
  29. package/dist/esm/models/PostSupportTicketComment.d.ts +38 -0
  30. package/dist/esm/models/PostSupportTicketComment.js +45 -0
  31. package/dist/esm/models/PutCourse.d.ts +0 -6
  32. package/dist/esm/models/PutCourse.js +0 -2
  33. package/dist/esm/models/PutSupportTicket.d.ts +63 -0
  34. package/dist/esm/models/PutSupportTicket.js +62 -0
  35. package/dist/esm/models/SupportTicketUser.d.ts +50 -0
  36. package/dist/esm/models/SupportTicketUser.js +55 -0
  37. package/dist/esm/models/index.d.ts +10 -0
  38. package/dist/esm/models/index.js +10 -0
  39. package/dist/models/DownloadSupportTicketAttachment200Response.d.ts +32 -0
  40. package/dist/models/DownloadSupportTicketAttachment200Response.js +50 -0
  41. package/dist/models/GetCourseImageUpload.d.ts +32 -0
  42. package/dist/models/GetCourseImageUpload.js +50 -0
  43. package/dist/models/GetSupportTicket.d.ts +142 -0
  44. package/dist/models/GetSupportTicket.js +128 -0
  45. package/dist/models/GetSupportTicketAttachment.d.ts +62 -0
  46. package/dist/models/GetSupportTicketAttachment.js +70 -0
  47. package/dist/models/GetSupportTicketComment.d.ts +57 -0
  48. package/dist/models/GetSupportTicketComment.js +67 -0
  49. package/dist/models/GetSupportTicketList.d.ts +57 -0
  50. package/dist/models/GetSupportTicketList.js +67 -0
  51. package/dist/models/PostSupportTicket.d.ts +71 -0
  52. package/dist/models/PostSupportTicket.js +82 -0
  53. package/dist/models/PostSupportTicketComment.d.ts +38 -0
  54. package/dist/models/PostSupportTicketComment.js +52 -0
  55. package/dist/models/PutCourse.d.ts +0 -6
  56. package/dist/models/PutCourse.js +0 -2
  57. package/dist/models/PutSupportTicket.d.ts +63 -0
  58. package/dist/models/PutSupportTicket.js +70 -0
  59. package/dist/models/SupportTicketUser.d.ts +50 -0
  60. package/dist/models/SupportTicketUser.js +62 -0
  61. package/dist/models/index.d.ts +10 -0
  62. package/dist/models/index.js +10 -0
  63. package/docs/CourseApi.md +138 -0
  64. package/docs/DownloadSupportTicketAttachment200Response.md +34 -0
  65. package/docs/GetCourseImageUpload.md +34 -0
  66. package/docs/GetSupportTicket.md +60 -0
  67. package/docs/GetSupportTicketAttachment.md +44 -0
  68. package/docs/GetSupportTicketComment.md +42 -0
  69. package/docs/GetSupportTicketList.md +42 -0
  70. package/docs/PostSupportTicket.md +40 -0
  71. package/docs/PostSupportTicketComment.md +36 -0
  72. package/docs/PutCourse.md +0 -2
  73. package/docs/PutSupportTicket.md +38 -0
  74. package/docs/SupportTicketApi.md +651 -0
  75. package/docs/SupportTicketUser.md +40 -0
  76. package/package.json +1 -1
  77. package/src/apis/CourseApi.ts +129 -0
  78. package/src/apis/SupportTicketApi.ts +599 -0
  79. package/src/apis/index.ts +1 -0
  80. package/src/models/DownloadSupportTicketAttachment200Response.ts +66 -0
  81. package/src/models/GetCourseImageUpload.ts +66 -0
  82. package/src/models/GetSupportTicket.ts +231 -0
  83. package/src/models/GetSupportTicketAttachment.ts +111 -0
  84. package/src/models/GetSupportTicketComment.ts +110 -0
  85. package/src/models/GetSupportTicketList.ts +110 -0
  86. package/src/models/PostSupportTicket.ts +118 -0
  87. package/src/models/PostSupportTicketComment.ts +74 -0
  88. package/src/models/PutCourse.ts +0 -8
  89. package/src/models/PutSupportTicket.ts +104 -0
  90. package/src/models/SupportTicketUser.ts +93 -0
  91. package/src/models/index.ts +10 -0
@@ -0,0 +1,191 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { DownloadSupportTicketAttachment200Response, GetSupportTicket, GetSupportTicketAttachment, GetSupportTicketComment, GetSupportTicketList, PostSupportTicket, PostSupportTicketComment, PutSupportTicket } from '../models/index';
14
+ export interface CloseSupportTicketRequest {
15
+ ticketId: string;
16
+ }
17
+ export interface DownloadSupportTicketAttachmentRequest {
18
+ ticketId: string;
19
+ attachmentId: string;
20
+ }
21
+ export interface GetSupportTicketRequest {
22
+ ticketId: string;
23
+ }
24
+ export interface GetSupportTicketCommentsRequest {
25
+ ticketId: string;
26
+ }
27
+ export interface GetSupportTicketsRequest {
28
+ page?: number;
29
+ pageSize?: number;
30
+ status?: GetSupportTicketsStatusEnum;
31
+ priority?: GetSupportTicketsPriorityEnum;
32
+ category?: GetSupportTicketsCategoryEnum;
33
+ }
34
+ export interface PostSupportTicketRequest {
35
+ postSupportTicket: PostSupportTicket;
36
+ }
37
+ export interface PostSupportTicketAttachmentRequest {
38
+ ticketId: string;
39
+ file: Blob;
40
+ }
41
+ export interface PostSupportTicketCommentRequest {
42
+ ticketId: string;
43
+ postSupportTicketComment: PostSupportTicketComment;
44
+ }
45
+ export interface PutSupportTicketRequest {
46
+ ticketId: string;
47
+ putSupportTicket: PutSupportTicket;
48
+ }
49
+ /**
50
+ *
51
+ */
52
+ export declare class SupportTicketApi extends runtime.BaseAPI {
53
+ /**
54
+ * Creates request options for closeSupportTicket without sending the request
55
+ */
56
+ closeSupportTicketRequestOpts(requestParameters: CloseSupportTicketRequest): Promise<runtime.RequestOpts>;
57
+ /**
58
+ * Close a support ticket
59
+ */
60
+ closeSupportTicketRaw(requestParameters: CloseSupportTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
61
+ /**
62
+ * Close a support ticket
63
+ */
64
+ closeSupportTicket(requestParameters: CloseSupportTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
65
+ /**
66
+ * Creates request options for downloadSupportTicketAttachment without sending the request
67
+ */
68
+ downloadSupportTicketAttachmentRequestOpts(requestParameters: DownloadSupportTicketAttachmentRequest): Promise<runtime.RequestOpts>;
69
+ /**
70
+ * Download a ticket attachment
71
+ */
72
+ downloadSupportTicketAttachmentRaw(requestParameters: DownloadSupportTicketAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DownloadSupportTicketAttachment200Response>>;
73
+ /**
74
+ * Download a ticket attachment
75
+ */
76
+ downloadSupportTicketAttachment(requestParameters: DownloadSupportTicketAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DownloadSupportTicketAttachment200Response>;
77
+ /**
78
+ * Creates request options for getSupportTicket without sending the request
79
+ */
80
+ getSupportTicketRequestOpts(requestParameters: GetSupportTicketRequest): Promise<runtime.RequestOpts>;
81
+ /**
82
+ * Get support ticket details
83
+ */
84
+ getSupportTicketRaw(requestParameters: GetSupportTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSupportTicket>>;
85
+ /**
86
+ * Get support ticket details
87
+ */
88
+ getSupportTicket(requestParameters: GetSupportTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSupportTicket>;
89
+ /**
90
+ * Creates request options for getSupportTicketComments without sending the request
91
+ */
92
+ getSupportTicketCommentsRequestOpts(requestParameters: GetSupportTicketCommentsRequest): Promise<runtime.RequestOpts>;
93
+ /**
94
+ * Get comments for a ticket
95
+ */
96
+ getSupportTicketCommentsRaw(requestParameters: GetSupportTicketCommentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GetSupportTicketComment>>>;
97
+ /**
98
+ * Get comments for a ticket
99
+ */
100
+ getSupportTicketComments(requestParameters: GetSupportTicketCommentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GetSupportTicketComment>>;
101
+ /**
102
+ * Creates request options for getSupportTickets without sending the request
103
+ */
104
+ getSupportTicketsRequestOpts(requestParameters: GetSupportTicketsRequest): Promise<runtime.RequestOpts>;
105
+ /**
106
+ * List support tickets
107
+ */
108
+ getSupportTicketsRaw(requestParameters: GetSupportTicketsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSupportTicketList>>;
109
+ /**
110
+ * List support tickets
111
+ */
112
+ getSupportTickets(requestParameters?: GetSupportTicketsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSupportTicketList>;
113
+ /**
114
+ * Creates request options for postSupportTicket without sending the request
115
+ */
116
+ postSupportTicketRequestOpts(requestParameters: PostSupportTicketRequest): Promise<runtime.RequestOpts>;
117
+ /**
118
+ * Create a support ticket
119
+ */
120
+ postSupportTicketRaw(requestParameters: PostSupportTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSupportTicket>>;
121
+ /**
122
+ * Create a support ticket
123
+ */
124
+ postSupportTicket(requestParameters: PostSupportTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSupportTicket>;
125
+ /**
126
+ * Creates request options for postSupportTicketAttachment without sending the request
127
+ */
128
+ postSupportTicketAttachmentRequestOpts(requestParameters: PostSupportTicketAttachmentRequest): Promise<runtime.RequestOpts>;
129
+ /**
130
+ * Upload an attachment to a ticket
131
+ */
132
+ postSupportTicketAttachmentRaw(requestParameters: PostSupportTicketAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSupportTicketAttachment>>;
133
+ /**
134
+ * Upload an attachment to a ticket
135
+ */
136
+ postSupportTicketAttachment(requestParameters: PostSupportTicketAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSupportTicketAttachment>;
137
+ /**
138
+ * Creates request options for postSupportTicketComment without sending the request
139
+ */
140
+ postSupportTicketCommentRequestOpts(requestParameters: PostSupportTicketCommentRequest): Promise<runtime.RequestOpts>;
141
+ /**
142
+ * Add a comment to a ticket
143
+ */
144
+ postSupportTicketCommentRaw(requestParameters: PostSupportTicketCommentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSupportTicketComment>>;
145
+ /**
146
+ * Add a comment to a ticket
147
+ */
148
+ postSupportTicketComment(requestParameters: PostSupportTicketCommentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSupportTicketComment>;
149
+ /**
150
+ * Creates request options for putSupportTicket without sending the request
151
+ */
152
+ putSupportTicketRequestOpts(requestParameters: PutSupportTicketRequest): Promise<runtime.RequestOpts>;
153
+ /**
154
+ * Update a support ticket
155
+ */
156
+ putSupportTicketRaw(requestParameters: PutSupportTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
157
+ /**
158
+ * Update a support ticket
159
+ */
160
+ putSupportTicket(requestParameters: PutSupportTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
161
+ }
162
+ /**
163
+ * @export
164
+ */
165
+ export declare const GetSupportTicketsStatusEnum: {
166
+ readonly Open: "Open";
167
+ readonly InProgress: "InProgress";
168
+ readonly Closed: "Closed";
169
+ };
170
+ export type GetSupportTicketsStatusEnum = typeof GetSupportTicketsStatusEnum[keyof typeof GetSupportTicketsStatusEnum];
171
+ /**
172
+ * @export
173
+ */
174
+ export declare const GetSupportTicketsPriorityEnum: {
175
+ readonly Low: "Low";
176
+ readonly Medium: "Medium";
177
+ readonly High: "High";
178
+ readonly Critical: "Critical";
179
+ };
180
+ export type GetSupportTicketsPriorityEnum = typeof GetSupportTicketsPriorityEnum[keyof typeof GetSupportTicketsPriorityEnum];
181
+ /**
182
+ * @export
183
+ */
184
+ export declare const GetSupportTicketsCategoryEnum: {
185
+ readonly Bug: "Bug";
186
+ readonly FeatureRequest: "FeatureRequest";
187
+ readonly AccountIssue: "AccountIssue";
188
+ readonly ContentIssue: "ContentIssue";
189
+ readonly Other: "Other";
190
+ };
191
+ export type GetSupportTicketsCategoryEnum = typeof GetSupportTicketsCategoryEnum[keyof typeof GetSupportTicketsCategoryEnum];
@@ -0,0 +1,453 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { DownloadSupportTicketAttachment200ResponseFromJSON, GetSupportTicketFromJSON, GetSupportTicketAttachmentFromJSON, GetSupportTicketCommentFromJSON, GetSupportTicketListFromJSON, PostSupportTicketToJSON, PostSupportTicketCommentToJSON, PutSupportTicketToJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class SupportTicketApi extends runtime.BaseAPI {
29
+ /**
30
+ * Creates request options for closeSupportTicket without sending the request
31
+ */
32
+ closeSupportTicketRequestOpts(requestParameters) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters['ticketId'] == null) {
35
+ throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling closeSupportTicket().');
36
+ }
37
+ const queryParameters = {};
38
+ const headerParameters = {};
39
+ let urlPath = `/support/tickets/{ticketId}/close`;
40
+ urlPath = urlPath.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId'])));
41
+ return {
42
+ path: urlPath,
43
+ method: 'POST',
44
+ headers: headerParameters,
45
+ query: queryParameters,
46
+ };
47
+ });
48
+ }
49
+ /**
50
+ * Close a support ticket
51
+ */
52
+ closeSupportTicketRaw(requestParameters, initOverrides) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ const requestOptions = yield this.closeSupportTicketRequestOpts(requestParameters);
55
+ const response = yield this.request(requestOptions, initOverrides);
56
+ return new runtime.VoidApiResponse(response);
57
+ });
58
+ }
59
+ /**
60
+ * Close a support ticket
61
+ */
62
+ closeSupportTicket(requestParameters, initOverrides) {
63
+ return __awaiter(this, void 0, void 0, function* () {
64
+ yield this.closeSupportTicketRaw(requestParameters, initOverrides);
65
+ });
66
+ }
67
+ /**
68
+ * Creates request options for downloadSupportTicketAttachment without sending the request
69
+ */
70
+ downloadSupportTicketAttachmentRequestOpts(requestParameters) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ if (requestParameters['ticketId'] == null) {
73
+ throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling downloadSupportTicketAttachment().');
74
+ }
75
+ if (requestParameters['attachmentId'] == null) {
76
+ throw new runtime.RequiredError('attachmentId', 'Required parameter "attachmentId" was null or undefined when calling downloadSupportTicketAttachment().');
77
+ }
78
+ const queryParameters = {};
79
+ const headerParameters = {};
80
+ let urlPath = `/support/tickets/{ticketId}/attachments/{attachmentId}/download`;
81
+ urlPath = urlPath.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId'])));
82
+ urlPath = urlPath.replace(`{${"attachmentId"}}`, encodeURIComponent(String(requestParameters['attachmentId'])));
83
+ return {
84
+ path: urlPath,
85
+ method: 'GET',
86
+ headers: headerParameters,
87
+ query: queryParameters,
88
+ };
89
+ });
90
+ }
91
+ /**
92
+ * Download a ticket attachment
93
+ */
94
+ downloadSupportTicketAttachmentRaw(requestParameters, initOverrides) {
95
+ return __awaiter(this, void 0, void 0, function* () {
96
+ const requestOptions = yield this.downloadSupportTicketAttachmentRequestOpts(requestParameters);
97
+ const response = yield this.request(requestOptions, initOverrides);
98
+ return new runtime.JSONApiResponse(response, (jsonValue) => DownloadSupportTicketAttachment200ResponseFromJSON(jsonValue));
99
+ });
100
+ }
101
+ /**
102
+ * Download a ticket attachment
103
+ */
104
+ downloadSupportTicketAttachment(requestParameters, initOverrides) {
105
+ return __awaiter(this, void 0, void 0, function* () {
106
+ const response = yield this.downloadSupportTicketAttachmentRaw(requestParameters, initOverrides);
107
+ return yield response.value();
108
+ });
109
+ }
110
+ /**
111
+ * Creates request options for getSupportTicket without sending the request
112
+ */
113
+ getSupportTicketRequestOpts(requestParameters) {
114
+ return __awaiter(this, void 0, void 0, function* () {
115
+ if (requestParameters['ticketId'] == null) {
116
+ throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling getSupportTicket().');
117
+ }
118
+ const queryParameters = {};
119
+ const headerParameters = {};
120
+ let urlPath = `/support/tickets/{ticketId}`;
121
+ urlPath = urlPath.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId'])));
122
+ return {
123
+ path: urlPath,
124
+ method: 'GET',
125
+ headers: headerParameters,
126
+ query: queryParameters,
127
+ };
128
+ });
129
+ }
130
+ /**
131
+ * Get support ticket details
132
+ */
133
+ getSupportTicketRaw(requestParameters, initOverrides) {
134
+ return __awaiter(this, void 0, void 0, function* () {
135
+ const requestOptions = yield this.getSupportTicketRequestOpts(requestParameters);
136
+ const response = yield this.request(requestOptions, initOverrides);
137
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetSupportTicketFromJSON(jsonValue));
138
+ });
139
+ }
140
+ /**
141
+ * Get support ticket details
142
+ */
143
+ getSupportTicket(requestParameters, initOverrides) {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ const response = yield this.getSupportTicketRaw(requestParameters, initOverrides);
146
+ return yield response.value();
147
+ });
148
+ }
149
+ /**
150
+ * Creates request options for getSupportTicketComments without sending the request
151
+ */
152
+ getSupportTicketCommentsRequestOpts(requestParameters) {
153
+ return __awaiter(this, void 0, void 0, function* () {
154
+ if (requestParameters['ticketId'] == null) {
155
+ throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling getSupportTicketComments().');
156
+ }
157
+ const queryParameters = {};
158
+ const headerParameters = {};
159
+ let urlPath = `/support/tickets/{ticketId}/comments`;
160
+ urlPath = urlPath.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId'])));
161
+ return {
162
+ path: urlPath,
163
+ method: 'GET',
164
+ headers: headerParameters,
165
+ query: queryParameters,
166
+ };
167
+ });
168
+ }
169
+ /**
170
+ * Get comments for a ticket
171
+ */
172
+ getSupportTicketCommentsRaw(requestParameters, initOverrides) {
173
+ return __awaiter(this, void 0, void 0, function* () {
174
+ const requestOptions = yield this.getSupportTicketCommentsRequestOpts(requestParameters);
175
+ const response = yield this.request(requestOptions, initOverrides);
176
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GetSupportTicketCommentFromJSON));
177
+ });
178
+ }
179
+ /**
180
+ * Get comments for a ticket
181
+ */
182
+ getSupportTicketComments(requestParameters, initOverrides) {
183
+ return __awaiter(this, void 0, void 0, function* () {
184
+ const response = yield this.getSupportTicketCommentsRaw(requestParameters, initOverrides);
185
+ return yield response.value();
186
+ });
187
+ }
188
+ /**
189
+ * Creates request options for getSupportTickets without sending the request
190
+ */
191
+ getSupportTicketsRequestOpts(requestParameters) {
192
+ return __awaiter(this, void 0, void 0, function* () {
193
+ const queryParameters = {};
194
+ if (requestParameters['page'] != null) {
195
+ queryParameters['page'] = requestParameters['page'];
196
+ }
197
+ if (requestParameters['pageSize'] != null) {
198
+ queryParameters['pageSize'] = requestParameters['pageSize'];
199
+ }
200
+ if (requestParameters['status'] != null) {
201
+ queryParameters['status'] = requestParameters['status'];
202
+ }
203
+ if (requestParameters['priority'] != null) {
204
+ queryParameters['priority'] = requestParameters['priority'];
205
+ }
206
+ if (requestParameters['category'] != null) {
207
+ queryParameters['category'] = requestParameters['category'];
208
+ }
209
+ const headerParameters = {};
210
+ let urlPath = `/support/tickets`;
211
+ return {
212
+ path: urlPath,
213
+ method: 'GET',
214
+ headers: headerParameters,
215
+ query: queryParameters,
216
+ };
217
+ });
218
+ }
219
+ /**
220
+ * List support tickets
221
+ */
222
+ getSupportTicketsRaw(requestParameters, initOverrides) {
223
+ return __awaiter(this, void 0, void 0, function* () {
224
+ const requestOptions = yield this.getSupportTicketsRequestOpts(requestParameters);
225
+ const response = yield this.request(requestOptions, initOverrides);
226
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetSupportTicketListFromJSON(jsonValue));
227
+ });
228
+ }
229
+ /**
230
+ * List support tickets
231
+ */
232
+ getSupportTickets() {
233
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
234
+ const response = yield this.getSupportTicketsRaw(requestParameters, initOverrides);
235
+ return yield response.value();
236
+ });
237
+ }
238
+ /**
239
+ * Creates request options for postSupportTicket without sending the request
240
+ */
241
+ postSupportTicketRequestOpts(requestParameters) {
242
+ return __awaiter(this, void 0, void 0, function* () {
243
+ if (requestParameters['postSupportTicket'] == null) {
244
+ throw new runtime.RequiredError('postSupportTicket', 'Required parameter "postSupportTicket" was null or undefined when calling postSupportTicket().');
245
+ }
246
+ const queryParameters = {};
247
+ const headerParameters = {};
248
+ headerParameters['Content-Type'] = 'application/json';
249
+ let urlPath = `/support/tickets`;
250
+ return {
251
+ path: urlPath,
252
+ method: 'POST',
253
+ headers: headerParameters,
254
+ query: queryParameters,
255
+ body: PostSupportTicketToJSON(requestParameters['postSupportTicket']),
256
+ };
257
+ });
258
+ }
259
+ /**
260
+ * Create a support ticket
261
+ */
262
+ postSupportTicketRaw(requestParameters, initOverrides) {
263
+ return __awaiter(this, void 0, void 0, function* () {
264
+ const requestOptions = yield this.postSupportTicketRequestOpts(requestParameters);
265
+ const response = yield this.request(requestOptions, initOverrides);
266
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetSupportTicketFromJSON(jsonValue));
267
+ });
268
+ }
269
+ /**
270
+ * Create a support ticket
271
+ */
272
+ postSupportTicket(requestParameters, initOverrides) {
273
+ return __awaiter(this, void 0, void 0, function* () {
274
+ const response = yield this.postSupportTicketRaw(requestParameters, initOverrides);
275
+ return yield response.value();
276
+ });
277
+ }
278
+ /**
279
+ * Creates request options for postSupportTicketAttachment without sending the request
280
+ */
281
+ postSupportTicketAttachmentRequestOpts(requestParameters) {
282
+ return __awaiter(this, void 0, void 0, function* () {
283
+ if (requestParameters['ticketId'] == null) {
284
+ throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling postSupportTicketAttachment().');
285
+ }
286
+ if (requestParameters['file'] == null) {
287
+ throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling postSupportTicketAttachment().');
288
+ }
289
+ const queryParameters = {};
290
+ const headerParameters = {};
291
+ const consumes = [
292
+ { contentType: 'multipart/form-data' },
293
+ ];
294
+ // @ts-ignore: canConsumeForm may be unused
295
+ const canConsumeForm = runtime.canConsumeForm(consumes);
296
+ let formParams;
297
+ let useForm = false;
298
+ // use FormData to transmit files using content-type "multipart/form-data"
299
+ useForm = canConsumeForm;
300
+ if (useForm) {
301
+ formParams = new FormData();
302
+ }
303
+ else {
304
+ formParams = new URLSearchParams();
305
+ }
306
+ if (requestParameters['file'] != null) {
307
+ formParams.append('file', requestParameters['file']);
308
+ }
309
+ let urlPath = `/support/tickets/{ticketId}/attachments`;
310
+ urlPath = urlPath.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId'])));
311
+ return {
312
+ path: urlPath,
313
+ method: 'POST',
314
+ headers: headerParameters,
315
+ query: queryParameters,
316
+ body: formParams,
317
+ };
318
+ });
319
+ }
320
+ /**
321
+ * Upload an attachment to a ticket
322
+ */
323
+ postSupportTicketAttachmentRaw(requestParameters, initOverrides) {
324
+ return __awaiter(this, void 0, void 0, function* () {
325
+ const requestOptions = yield this.postSupportTicketAttachmentRequestOpts(requestParameters);
326
+ const response = yield this.request(requestOptions, initOverrides);
327
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetSupportTicketAttachmentFromJSON(jsonValue));
328
+ });
329
+ }
330
+ /**
331
+ * Upload an attachment to a ticket
332
+ */
333
+ postSupportTicketAttachment(requestParameters, initOverrides) {
334
+ return __awaiter(this, void 0, void 0, function* () {
335
+ const response = yield this.postSupportTicketAttachmentRaw(requestParameters, initOverrides);
336
+ return yield response.value();
337
+ });
338
+ }
339
+ /**
340
+ * Creates request options for postSupportTicketComment without sending the request
341
+ */
342
+ postSupportTicketCommentRequestOpts(requestParameters) {
343
+ return __awaiter(this, void 0, void 0, function* () {
344
+ if (requestParameters['ticketId'] == null) {
345
+ throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling postSupportTicketComment().');
346
+ }
347
+ if (requestParameters['postSupportTicketComment'] == null) {
348
+ throw new runtime.RequiredError('postSupportTicketComment', 'Required parameter "postSupportTicketComment" was null or undefined when calling postSupportTicketComment().');
349
+ }
350
+ const queryParameters = {};
351
+ const headerParameters = {};
352
+ headerParameters['Content-Type'] = 'application/json';
353
+ let urlPath = `/support/tickets/{ticketId}/comments`;
354
+ urlPath = urlPath.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId'])));
355
+ return {
356
+ path: urlPath,
357
+ method: 'POST',
358
+ headers: headerParameters,
359
+ query: queryParameters,
360
+ body: PostSupportTicketCommentToJSON(requestParameters['postSupportTicketComment']),
361
+ };
362
+ });
363
+ }
364
+ /**
365
+ * Add a comment to a ticket
366
+ */
367
+ postSupportTicketCommentRaw(requestParameters, initOverrides) {
368
+ return __awaiter(this, void 0, void 0, function* () {
369
+ const requestOptions = yield this.postSupportTicketCommentRequestOpts(requestParameters);
370
+ const response = yield this.request(requestOptions, initOverrides);
371
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetSupportTicketCommentFromJSON(jsonValue));
372
+ });
373
+ }
374
+ /**
375
+ * Add a comment to a ticket
376
+ */
377
+ postSupportTicketComment(requestParameters, initOverrides) {
378
+ return __awaiter(this, void 0, void 0, function* () {
379
+ const response = yield this.postSupportTicketCommentRaw(requestParameters, initOverrides);
380
+ return yield response.value();
381
+ });
382
+ }
383
+ /**
384
+ * Creates request options for putSupportTicket without sending the request
385
+ */
386
+ putSupportTicketRequestOpts(requestParameters) {
387
+ return __awaiter(this, void 0, void 0, function* () {
388
+ if (requestParameters['ticketId'] == null) {
389
+ throw new runtime.RequiredError('ticketId', 'Required parameter "ticketId" was null or undefined when calling putSupportTicket().');
390
+ }
391
+ if (requestParameters['putSupportTicket'] == null) {
392
+ throw new runtime.RequiredError('putSupportTicket', 'Required parameter "putSupportTicket" was null or undefined when calling putSupportTicket().');
393
+ }
394
+ const queryParameters = {};
395
+ const headerParameters = {};
396
+ headerParameters['Content-Type'] = 'application/json';
397
+ let urlPath = `/support/tickets/{ticketId}`;
398
+ urlPath = urlPath.replace(`{${"ticketId"}}`, encodeURIComponent(String(requestParameters['ticketId'])));
399
+ return {
400
+ path: urlPath,
401
+ method: 'PUT',
402
+ headers: headerParameters,
403
+ query: queryParameters,
404
+ body: PutSupportTicketToJSON(requestParameters['putSupportTicket']),
405
+ };
406
+ });
407
+ }
408
+ /**
409
+ * Update a support ticket
410
+ */
411
+ putSupportTicketRaw(requestParameters, initOverrides) {
412
+ return __awaiter(this, void 0, void 0, function* () {
413
+ const requestOptions = yield this.putSupportTicketRequestOpts(requestParameters);
414
+ const response = yield this.request(requestOptions, initOverrides);
415
+ return new runtime.VoidApiResponse(response);
416
+ });
417
+ }
418
+ /**
419
+ * Update a support ticket
420
+ */
421
+ putSupportTicket(requestParameters, initOverrides) {
422
+ return __awaiter(this, void 0, void 0, function* () {
423
+ yield this.putSupportTicketRaw(requestParameters, initOverrides);
424
+ });
425
+ }
426
+ }
427
+ /**
428
+ * @export
429
+ */
430
+ export const GetSupportTicketsStatusEnum = {
431
+ Open: 'Open',
432
+ InProgress: 'InProgress',
433
+ Closed: 'Closed'
434
+ };
435
+ /**
436
+ * @export
437
+ */
438
+ export const GetSupportTicketsPriorityEnum = {
439
+ Low: 'Low',
440
+ Medium: 'Medium',
441
+ High: 'High',
442
+ Critical: 'Critical'
443
+ };
444
+ /**
445
+ * @export
446
+ */
447
+ export const GetSupportTicketsCategoryEnum = {
448
+ Bug: 'Bug',
449
+ FeatureRequest: 'FeatureRequest',
450
+ AccountIssue: 'AccountIssue',
451
+ ContentIssue: 'ContentIssue',
452
+ Other: 'Other'
453
+ };
@@ -8,4 +8,5 @@ export * from './QuestionApi';
8
8
  export * from './QuizApi';
9
9
  export * from './ReportingApi';
10
10
  export * from './RoleApi';
11
+ export * from './SupportTicketApi';
11
12
  export * from './UserApi';
@@ -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';