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