@easyedu/js-lsm-api 1.130.0 → 1.131.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 (80) hide show
  1. package/.openapi-generator/FILES +22 -0
  2. package/README.md +16 -2
  3. package/dist/apis/ReportingApi.d.ts +52 -0
  4. package/dist/apis/ReportingApi.js +131 -0
  5. package/dist/esm/apis/ReportingApi.d.ts +52 -0
  6. package/dist/esm/apis/ReportingApi.js +131 -0
  7. package/dist/esm/models/GetReportCatalog.d.ts +40 -0
  8. package/dist/esm/models/GetReportCatalog.js +49 -0
  9. package/dist/esm/models/GetReportQueryResult.d.ts +84 -0
  10. package/dist/esm/models/GetReportQueryResult.js +77 -0
  11. package/dist/esm/models/PostReportExport.d.ts +54 -0
  12. package/dist/esm/models/PostReportExport.js +56 -0
  13. package/dist/esm/models/PostReportQuery.d.ts +52 -0
  14. package/dist/esm/models/PostReportQuery.js +49 -0
  15. package/dist/esm/models/ReportCategory.d.ts +50 -0
  16. package/dist/esm/models/ReportCategory.js +58 -0
  17. package/dist/esm/models/ReportColumn.d.ts +59 -0
  18. package/dist/esm/models/ReportColumn.js +64 -0
  19. package/dist/esm/models/ReportDefinition.d.ts +89 -0
  20. package/dist/esm/models/ReportDefinition.js +85 -0
  21. package/dist/esm/models/ReportFilterDefinition.d.ts +94 -0
  22. package/dist/esm/models/ReportFilterDefinition.js +91 -0
  23. package/dist/esm/models/ReportFilterOption.d.ts +38 -0
  24. package/dist/esm/models/ReportFilterOption.js +47 -0
  25. package/dist/esm/models/ReportFilters.d.ts +105 -0
  26. package/dist/esm/models/ReportFilters.js +65 -0
  27. package/dist/esm/models/ReportSort.d.ts +46 -0
  28. package/dist/esm/models/ReportSort.js +54 -0
  29. package/dist/esm/models/index.d.ts +11 -0
  30. package/dist/esm/models/index.js +11 -0
  31. package/dist/models/GetReportCatalog.d.ts +40 -0
  32. package/dist/models/GetReportCatalog.js +56 -0
  33. package/dist/models/GetReportQueryResult.d.ts +84 -0
  34. package/dist/models/GetReportQueryResult.js +84 -0
  35. package/dist/models/PostReportExport.d.ts +54 -0
  36. package/dist/models/PostReportExport.js +64 -0
  37. package/dist/models/PostReportQuery.d.ts +52 -0
  38. package/dist/models/PostReportQuery.js +56 -0
  39. package/dist/models/ReportCategory.d.ts +50 -0
  40. package/dist/models/ReportCategory.js +66 -0
  41. package/dist/models/ReportColumn.d.ts +59 -0
  42. package/dist/models/ReportColumn.js +72 -0
  43. package/dist/models/ReportDefinition.d.ts +89 -0
  44. package/dist/models/ReportDefinition.js +93 -0
  45. package/dist/models/ReportFilterDefinition.d.ts +94 -0
  46. package/dist/models/ReportFilterDefinition.js +99 -0
  47. package/dist/models/ReportFilterOption.d.ts +38 -0
  48. package/dist/models/ReportFilterOption.js +54 -0
  49. package/dist/models/ReportFilters.d.ts +105 -0
  50. package/dist/models/ReportFilters.js +72 -0
  51. package/dist/models/ReportSort.d.ts +46 -0
  52. package/dist/models/ReportSort.js +62 -0
  53. package/dist/models/index.d.ts +11 -0
  54. package/dist/models/index.js +11 -0
  55. package/docs/GetReportCatalog.md +37 -0
  56. package/docs/GetReportQueryResult.md +50 -0
  57. package/docs/PostReportExport.md +38 -0
  58. package/docs/PostReportQuery.md +40 -0
  59. package/docs/ReportCategory.md +36 -0
  60. package/docs/ReportColumn.md +39 -0
  61. package/docs/ReportDefinition.md +48 -0
  62. package/docs/ReportFilterDefinition.md +45 -0
  63. package/docs/ReportFilterOption.md +36 -0
  64. package/docs/ReportFilters.md +59 -0
  65. package/docs/ReportSort.md +36 -0
  66. package/docs/ReportingApi.md +207 -0
  67. package/package.json +1 -1
  68. package/src/apis/ReportingApi.ts +181 -0
  69. package/src/models/GetReportCatalog.ts +90 -0
  70. package/src/models/GetReportQueryResult.ts +153 -0
  71. package/src/models/PostReportExport.ts +108 -0
  72. package/src/models/PostReportQuery.ts +104 -0
  73. package/src/models/ReportCategory.ts +90 -0
  74. package/src/models/ReportColumn.ts +102 -0
  75. package/src/models/ReportDefinition.ts +166 -0
  76. package/src/models/ReportFilterDefinition.ts +154 -0
  77. package/src/models/ReportFilterOption.ts +75 -0
  78. package/src/models/ReportFilters.ts +162 -0
  79. package/src/models/ReportSort.ts +86 -0
  80. package/src/models/index.ts +11 -0
@@ -148,6 +148,8 @@ docs/GetQuestionAnswerChoicesInner.md
148
148
  docs/GetQuestionList.md
149
149
  docs/GetQuestionListFilters.md
150
150
  docs/GetQuestionQuizzesInner.md
151
+ docs/GetReportCatalog.md
152
+ docs/GetReportQueryResult.md
151
153
  docs/GetResource.md
152
154
  docs/GetResourceList.md
153
155
  docs/GetResourceSession.md
@@ -296,6 +298,8 @@ docs/PostQuestionImportCommit.md
296
298
  docs/PostQuestionImportCommitItem.md
297
299
  docs/PostQuestionImportCommitResponse.md
298
300
  docs/PostQuestionImportParseResponse.md
301
+ docs/PostReportExport.md
302
+ docs/PostReportQuery.md
299
303
  docs/PostResetPassword.md
300
304
  docs/PostResource.md
301
305
  docs/PostResourceSessionActivityEvent.md
@@ -373,6 +377,13 @@ docs/QuestionImportPreviewImage.md
373
377
  docs/QuestionImportSource.md
374
378
  docs/QuestionImportSourceSummary.md
375
379
  docs/QuestionSelectionMethod.md
380
+ docs/ReportCategory.md
381
+ docs/ReportColumn.md
382
+ docs/ReportDefinition.md
383
+ docs/ReportFilterDefinition.md
384
+ docs/ReportFilterOption.md
385
+ docs/ReportFilters.md
386
+ docs/ReportSort.md
376
387
  docs/ReportingApi.md
377
388
  docs/ResourceSessionEnvironment.md
378
389
  docs/ResourceSessionScormApiLogItem.md
@@ -570,6 +581,8 @@ src/models/GetQuestionAnswerChoicesInner.ts
570
581
  src/models/GetQuestionList.ts
571
582
  src/models/GetQuestionListFilters.ts
572
583
  src/models/GetQuestionQuizzesInner.ts
584
+ src/models/GetReportCatalog.ts
585
+ src/models/GetReportQueryResult.ts
573
586
  src/models/GetResource.ts
574
587
  src/models/GetResourceList.ts
575
588
  src/models/GetResourceSession.ts
@@ -711,6 +724,8 @@ src/models/PostQuestionImportCommit.ts
711
724
  src/models/PostQuestionImportCommitItem.ts
712
725
  src/models/PostQuestionImportCommitResponse.ts
713
726
  src/models/PostQuestionImportParseResponse.ts
727
+ src/models/PostReportExport.ts
728
+ src/models/PostReportQuery.ts
714
729
  src/models/PostResetPassword.ts
715
730
  src/models/PostResource.ts
716
731
  src/models/PostResourceSessionActivityEvent.ts
@@ -786,6 +801,13 @@ src/models/QuestionImportPreviewImage.ts
786
801
  src/models/QuestionImportSource.ts
787
802
  src/models/QuestionImportSourceSummary.ts
788
803
  src/models/QuestionSelectionMethod.ts
804
+ src/models/ReportCategory.ts
805
+ src/models/ReportColumn.ts
806
+ src/models/ReportDefinition.ts
807
+ src/models/ReportFilterDefinition.ts
808
+ src/models/ReportFilterOption.ts
809
+ src/models/ReportFilters.ts
810
+ src/models/ReportSort.ts
789
811
  src/models/ResourceSessionEnvironment.ts
790
812
  src/models/ResourceSessionScormApiLogItem.ts
791
813
  src/models/ResourceType.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @easyedu/js-lsm-api@1.130.0
1
+ # @easyedu/js-lsm-api@1.131.0
2
2
 
3
3
  A TypeScript SDK client for the sbzw93t49b.execute-api.us-east-2.amazonaws.com API.
4
4
 
@@ -364,9 +364,12 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
364
364
  *QuestionApi* | [**putQuestion**](docs/QuestionApi.md#putquestion) | **PUT** /questions/{questionId} | Create the next version of a question
365
365
  *QuestionImportApi* | [**postQuestionImportCommit**](docs/QuestionImportApi.md#postquestionimportcommit) | **POST** /question-imports/commit | Validate and atomically create, version, or skip approved question drafts
366
366
  *QuestionImportApi* | [**postQuestionImportParse**](docs/QuestionImportApi.md#postquestionimportparse) | **POST** /question-imports/parse | Parse a question document into stateless review drafts
367
+ *ReportingApi* | [**exportReport**](docs/ReportingApi.md#exportreport) | **POST** /reporting/reports/{reportKey}/export | Export all rows of a report as CSV or XLSX
367
368
  *ReportingApi* | [**getCourseVersionReporting**](docs/ReportingApi.md#getcourseversionreporting) | **GET** /courses/{courseId}/versions/{courseVersionId}/reporting | Get instructor reporting for one explicit course version
368
369
  *ReportingApi* | [**getCourseVersionSectionReporting**](docs/ReportingApi.md#getcourseversionsectionreporting) | **GET** /courses/{courseId}/versions/{courseVersionId}/sections/{sectionId}/reporting | Get instructor reporting for one section and its descendants in an explicit course version
369
370
  *ReportingApi* | [**getPortalManagementDashboard**](docs/ReportingApi.md#getportalmanagementdashboard) | **GET** /reporting/portal/dashboard | Get the selected portal\'s management dashboard reporting
371
+ *ReportingApi* | [**getReportCatalog**](docs/ReportingApi.md#getreportcatalog) | **GET** /reporting/reports | List the reports the caller can run in the selected portal
372
+ *ReportingApi* | [**queryReport**](docs/ReportingApi.md#queryreport) | **POST** /reporting/reports/{reportKey}/query | Run a report and return one page of rows
370
373
  *RichTextApi* | [**getRichTextAsset**](docs/RichTextApi.md#getrichtextasset) | **GET** /rich-text/assets/{assetId} | Redirect to a signed rich text asset URL
371
374
  *RichTextApi* | [**postRichTextAssetComplete**](docs/RichTextApi.md#postrichtextassetcomplete) | **POST** /rich-text/assets/{assetId}/complete | Complete a pending rich text asset upload
372
375
  *RichTextApi* | [**postRichTextAssetUpload**](docs/RichTextApi.md#postrichtextassetupload) | **POST** /rich-text/assets/uploads | Create a pending rich text asset upload
@@ -550,6 +553,8 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
550
553
  - [GetQuestionList](docs/GetQuestionList.md)
551
554
  - [GetQuestionListFilters](docs/GetQuestionListFilters.md)
552
555
  - [GetQuestionQuizzesInner](docs/GetQuestionQuizzesInner.md)
556
+ - [GetReportCatalog](docs/GetReportCatalog.md)
557
+ - [GetReportQueryResult](docs/GetReportQueryResult.md)
553
558
  - [GetResource](docs/GetResource.md)
554
559
  - [GetResourceList](docs/GetResourceList.md)
555
560
  - [GetResourceSession](docs/GetResourceSession.md)
@@ -691,6 +696,8 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
691
696
  - [PostQuestionImportCommitItem](docs/PostQuestionImportCommitItem.md)
692
697
  - [PostQuestionImportCommitResponse](docs/PostQuestionImportCommitResponse.md)
693
698
  - [PostQuestionImportParseResponse](docs/PostQuestionImportParseResponse.md)
699
+ - [PostReportExport](docs/PostReportExport.md)
700
+ - [PostReportQuery](docs/PostReportQuery.md)
694
701
  - [PostResetPassword](docs/PostResetPassword.md)
695
702
  - [PostResource](docs/PostResource.md)
696
703
  - [PostResourceSessionActivityEvent](docs/PostResourceSessionActivityEvent.md)
@@ -766,6 +773,13 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
766
773
  - [QuestionImportSource](docs/QuestionImportSource.md)
767
774
  - [QuestionImportSourceSummary](docs/QuestionImportSourceSummary.md)
768
775
  - [QuestionSelectionMethod](docs/QuestionSelectionMethod.md)
776
+ - [ReportCategory](docs/ReportCategory.md)
777
+ - [ReportColumn](docs/ReportColumn.md)
778
+ - [ReportDefinition](docs/ReportDefinition.md)
779
+ - [ReportFilterDefinition](docs/ReportFilterDefinition.md)
780
+ - [ReportFilterOption](docs/ReportFilterOption.md)
781
+ - [ReportFilters](docs/ReportFilters.md)
782
+ - [ReportSort](docs/ReportSort.md)
769
783
  - [ResourceSessionEnvironment](docs/ResourceSessionEnvironment.md)
770
784
  - [ResourceSessionScormApiLogItem](docs/ResourceSessionScormApiLogItem.md)
771
785
  - [ResourceType](docs/ResourceType.md)
@@ -804,7 +818,7 @@ and is automatically generated by the
804
818
  [OpenAPI Generator](https://openapi-generator.tech) project:
805
819
 
806
820
  - API version: `1.0.0`
807
- - Package version: `1.130.0`
821
+ - Package version: `1.131.0`
808
822
  - Generator version: `7.22.0`
809
823
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
810
824
 
@@ -13,6 +13,14 @@ import * as runtime from '../runtime';
13
13
  import { type GetCourseVersionReporting } from '../models/GetCourseVersionReporting';
14
14
  import { type GetCourseVersionSectionReporting } from '../models/GetCourseVersionSectionReporting';
15
15
  import { type GetPortalManagementDashboard } from '../models/GetPortalManagementDashboard';
16
+ import { type GetReportCatalog } from '../models/GetReportCatalog';
17
+ import { type GetReportQueryResult } from '../models/GetReportQueryResult';
18
+ import { type PostReportExport } from '../models/PostReportExport';
19
+ import { type PostReportQuery } from '../models/PostReportQuery';
20
+ export interface ExportReportRequest {
21
+ reportKey: string;
22
+ postReportExport: PostReportExport;
23
+ }
16
24
  export interface GetCourseVersionReportingRequest {
17
25
  courseId: string;
18
26
  courseVersionId: string;
@@ -25,10 +33,26 @@ export interface GetCourseVersionSectionReportingRequest {
25
33
  export interface GetPortalManagementDashboardRequest {
26
34
  days?: number;
27
35
  }
36
+ export interface QueryReportRequest {
37
+ reportKey: string;
38
+ postReportQuery: PostReportQuery;
39
+ }
28
40
  /**
29
41
  *
30
42
  */
31
43
  export declare class ReportingApi extends runtime.BaseAPI {
44
+ /**
45
+ * Creates request options for exportReport without sending the request
46
+ */
47
+ exportReportRequestOpts(requestParameters: ExportReportRequest): Promise<runtime.RequestOpts>;
48
+ /**
49
+ * Export all rows of a report as CSV or XLSX
50
+ */
51
+ exportReportRaw(requestParameters: ExportReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
52
+ /**
53
+ * Export all rows of a report as CSV or XLSX
54
+ */
55
+ exportReport(requestParameters: ExportReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
32
56
  /**
33
57
  * Creates request options for getCourseVersionReporting without sending the request
34
58
  */
@@ -65,4 +89,32 @@ export declare class ReportingApi extends runtime.BaseAPI {
65
89
  * Get the selected portal\'s management dashboard reporting
66
90
  */
67
91
  getPortalManagementDashboard(requestParameters?: GetPortalManagementDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalManagementDashboard>;
92
+ /**
93
+ * Creates request options for getReportCatalog without sending the request
94
+ */
95
+ getReportCatalogRequestOpts(): Promise<runtime.RequestOpts>;
96
+ /**
97
+ * Returns report definitions with columns, supported filters, select options resolved for the selected portal, and default sort. Reports whose permission the caller lacks are omitted.
98
+ * List the reports the caller can run in the selected portal
99
+ */
100
+ getReportCatalogRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetReportCatalog>>;
101
+ /**
102
+ * Returns report definitions with columns, supported filters, select options resolved for the selected portal, and default sort. Reports whose permission the caller lacks are omitted.
103
+ * List the reports the caller can run in the selected portal
104
+ */
105
+ getReportCatalog(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetReportCatalog>;
106
+ /**
107
+ * Creates request options for queryReport without sending the request
108
+ */
109
+ queryReportRequestOpts(requestParameters: QueryReportRequest): Promise<runtime.RequestOpts>;
110
+ /**
111
+ * Read-only. POST is used because filters vary per report. Results are scoped to the selected portal and its team portals.
112
+ * Run a report and return one page of rows
113
+ */
114
+ queryReportRaw(requestParameters: QueryReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetReportQueryResult>>;
115
+ /**
116
+ * Read-only. POST is used because filters vary per report. Results are scoped to the selected portal and its team portals.
117
+ * Run a report and return one page of rows
118
+ */
119
+ queryReport(requestParameters: QueryReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetReportQueryResult>;
68
120
  }
@@ -27,10 +27,58 @@ const runtime = require("../runtime");
27
27
  const GetCourseVersionReporting_1 = require("../models/GetCourseVersionReporting");
28
28
  const GetCourseVersionSectionReporting_1 = require("../models/GetCourseVersionSectionReporting");
29
29
  const GetPortalManagementDashboard_1 = require("../models/GetPortalManagementDashboard");
30
+ const GetReportCatalog_1 = require("../models/GetReportCatalog");
31
+ const GetReportQueryResult_1 = require("../models/GetReportQueryResult");
32
+ const PostReportExport_1 = require("../models/PostReportExport");
33
+ const PostReportQuery_1 = require("../models/PostReportQuery");
30
34
  /**
31
35
  *
32
36
  */
33
37
  class ReportingApi extends runtime.BaseAPI {
38
+ /**
39
+ * Creates request options for exportReport without sending the request
40
+ */
41
+ exportReportRequestOpts(requestParameters) {
42
+ return __awaiter(this, void 0, void 0, function* () {
43
+ if (requestParameters['reportKey'] == null) {
44
+ throw new runtime.RequiredError('reportKey', 'Required parameter "reportKey" was null or undefined when calling exportReport().');
45
+ }
46
+ if (requestParameters['postReportExport'] == null) {
47
+ throw new runtime.RequiredError('postReportExport', 'Required parameter "postReportExport" was null or undefined when calling exportReport().');
48
+ }
49
+ const queryParameters = {};
50
+ const headerParameters = {};
51
+ headerParameters['Content-Type'] = 'application/json';
52
+ let urlPath = `/reporting/reports/{reportKey}/export`;
53
+ urlPath = urlPath.replace('{reportKey}', encodeURIComponent(String(requestParameters['reportKey'])));
54
+ return {
55
+ path: urlPath,
56
+ method: 'POST',
57
+ headers: headerParameters,
58
+ query: queryParameters,
59
+ body: (0, PostReportExport_1.PostReportExportToJSON)(requestParameters['postReportExport']),
60
+ };
61
+ });
62
+ }
63
+ /**
64
+ * Export all rows of a report as CSV or XLSX
65
+ */
66
+ exportReportRaw(requestParameters, initOverrides) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ const requestOptions = yield this.exportReportRequestOpts(requestParameters);
69
+ const response = yield this.request(requestOptions, initOverrides);
70
+ return new runtime.BlobApiResponse(response);
71
+ });
72
+ }
73
+ /**
74
+ * Export all rows of a report as CSV or XLSX
75
+ */
76
+ exportReport(requestParameters, initOverrides) {
77
+ return __awaiter(this, void 0, void 0, function* () {
78
+ const response = yield this.exportReportRaw(requestParameters, initOverrides);
79
+ return yield response.value();
80
+ });
81
+ }
34
82
  /**
35
83
  * Creates request options for getCourseVersionReporting without sending the request
36
84
  */
@@ -159,5 +207,88 @@ class ReportingApi extends runtime.BaseAPI {
159
207
  return yield response.value();
160
208
  });
161
209
  }
210
+ /**
211
+ * Creates request options for getReportCatalog without sending the request
212
+ */
213
+ getReportCatalogRequestOpts() {
214
+ return __awaiter(this, void 0, void 0, function* () {
215
+ const queryParameters = {};
216
+ const headerParameters = {};
217
+ let urlPath = `/reporting/reports`;
218
+ return {
219
+ path: urlPath,
220
+ method: 'GET',
221
+ headers: headerParameters,
222
+ query: queryParameters,
223
+ };
224
+ });
225
+ }
226
+ /**
227
+ * Returns report definitions with columns, supported filters, select options resolved for the selected portal, and default sort. Reports whose permission the caller lacks are omitted.
228
+ * List the reports the caller can run in the selected portal
229
+ */
230
+ getReportCatalogRaw(initOverrides) {
231
+ return __awaiter(this, void 0, void 0, function* () {
232
+ const requestOptions = yield this.getReportCatalogRequestOpts();
233
+ const response = yield this.request(requestOptions, initOverrides);
234
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetReportCatalog_1.GetReportCatalogFromJSON)(jsonValue));
235
+ });
236
+ }
237
+ /**
238
+ * Returns report definitions with columns, supported filters, select options resolved for the selected portal, and default sort. Reports whose permission the caller lacks are omitted.
239
+ * List the reports the caller can run in the selected portal
240
+ */
241
+ getReportCatalog(initOverrides) {
242
+ return __awaiter(this, void 0, void 0, function* () {
243
+ const response = yield this.getReportCatalogRaw(initOverrides);
244
+ return yield response.value();
245
+ });
246
+ }
247
+ /**
248
+ * Creates request options for queryReport without sending the request
249
+ */
250
+ queryReportRequestOpts(requestParameters) {
251
+ return __awaiter(this, void 0, void 0, function* () {
252
+ if (requestParameters['reportKey'] == null) {
253
+ throw new runtime.RequiredError('reportKey', 'Required parameter "reportKey" was null or undefined when calling queryReport().');
254
+ }
255
+ if (requestParameters['postReportQuery'] == null) {
256
+ throw new runtime.RequiredError('postReportQuery', 'Required parameter "postReportQuery" was null or undefined when calling queryReport().');
257
+ }
258
+ const queryParameters = {};
259
+ const headerParameters = {};
260
+ headerParameters['Content-Type'] = 'application/json';
261
+ let urlPath = `/reporting/reports/{reportKey}/query`;
262
+ urlPath = urlPath.replace('{reportKey}', encodeURIComponent(String(requestParameters['reportKey'])));
263
+ return {
264
+ path: urlPath,
265
+ method: 'POST',
266
+ headers: headerParameters,
267
+ query: queryParameters,
268
+ body: (0, PostReportQuery_1.PostReportQueryToJSON)(requestParameters['postReportQuery']),
269
+ };
270
+ });
271
+ }
272
+ /**
273
+ * Read-only. POST is used because filters vary per report. Results are scoped to the selected portal and its team portals.
274
+ * Run a report and return one page of rows
275
+ */
276
+ queryReportRaw(requestParameters, initOverrides) {
277
+ return __awaiter(this, void 0, void 0, function* () {
278
+ const requestOptions = yield this.queryReportRequestOpts(requestParameters);
279
+ const response = yield this.request(requestOptions, initOverrides);
280
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetReportQueryResult_1.GetReportQueryResultFromJSON)(jsonValue));
281
+ });
282
+ }
283
+ /**
284
+ * Read-only. POST is used because filters vary per report. Results are scoped to the selected portal and its team portals.
285
+ * Run a report and return one page of rows
286
+ */
287
+ queryReport(requestParameters, initOverrides) {
288
+ return __awaiter(this, void 0, void 0, function* () {
289
+ const response = yield this.queryReportRaw(requestParameters, initOverrides);
290
+ return yield response.value();
291
+ });
292
+ }
162
293
  }
163
294
  exports.ReportingApi = ReportingApi;
@@ -13,6 +13,14 @@ import * as runtime from '../runtime';
13
13
  import { type GetCourseVersionReporting } from '../models/GetCourseVersionReporting';
14
14
  import { type GetCourseVersionSectionReporting } from '../models/GetCourseVersionSectionReporting';
15
15
  import { type GetPortalManagementDashboard } from '../models/GetPortalManagementDashboard';
16
+ import { type GetReportCatalog } from '../models/GetReportCatalog';
17
+ import { type GetReportQueryResult } from '../models/GetReportQueryResult';
18
+ import { type PostReportExport } from '../models/PostReportExport';
19
+ import { type PostReportQuery } from '../models/PostReportQuery';
20
+ export interface ExportReportRequest {
21
+ reportKey: string;
22
+ postReportExport: PostReportExport;
23
+ }
16
24
  export interface GetCourseVersionReportingRequest {
17
25
  courseId: string;
18
26
  courseVersionId: string;
@@ -25,10 +33,26 @@ export interface GetCourseVersionSectionReportingRequest {
25
33
  export interface GetPortalManagementDashboardRequest {
26
34
  days?: number;
27
35
  }
36
+ export interface QueryReportRequest {
37
+ reportKey: string;
38
+ postReportQuery: PostReportQuery;
39
+ }
28
40
  /**
29
41
  *
30
42
  */
31
43
  export declare class ReportingApi extends runtime.BaseAPI {
44
+ /**
45
+ * Creates request options for exportReport without sending the request
46
+ */
47
+ exportReportRequestOpts(requestParameters: ExportReportRequest): Promise<runtime.RequestOpts>;
48
+ /**
49
+ * Export all rows of a report as CSV or XLSX
50
+ */
51
+ exportReportRaw(requestParameters: ExportReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
52
+ /**
53
+ * Export all rows of a report as CSV or XLSX
54
+ */
55
+ exportReport(requestParameters: ExportReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
32
56
  /**
33
57
  * Creates request options for getCourseVersionReporting without sending the request
34
58
  */
@@ -65,4 +89,32 @@ export declare class ReportingApi extends runtime.BaseAPI {
65
89
  * Get the selected portal\'s management dashboard reporting
66
90
  */
67
91
  getPortalManagementDashboard(requestParameters?: GetPortalManagementDashboardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalManagementDashboard>;
92
+ /**
93
+ * Creates request options for getReportCatalog without sending the request
94
+ */
95
+ getReportCatalogRequestOpts(): Promise<runtime.RequestOpts>;
96
+ /**
97
+ * Returns report definitions with columns, supported filters, select options resolved for the selected portal, and default sort. Reports whose permission the caller lacks are omitted.
98
+ * List the reports the caller can run in the selected portal
99
+ */
100
+ getReportCatalogRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetReportCatalog>>;
101
+ /**
102
+ * Returns report definitions with columns, supported filters, select options resolved for the selected portal, and default sort. Reports whose permission the caller lacks are omitted.
103
+ * List the reports the caller can run in the selected portal
104
+ */
105
+ getReportCatalog(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetReportCatalog>;
106
+ /**
107
+ * Creates request options for queryReport without sending the request
108
+ */
109
+ queryReportRequestOpts(requestParameters: QueryReportRequest): Promise<runtime.RequestOpts>;
110
+ /**
111
+ * Read-only. POST is used because filters vary per report. Results are scoped to the selected portal and its team portals.
112
+ * Run a report and return one page of rows
113
+ */
114
+ queryReportRaw(requestParameters: QueryReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetReportQueryResult>>;
115
+ /**
116
+ * Read-only. POST is used because filters vary per report. Results are scoped to the selected portal and its team portals.
117
+ * Run a report and return one page of rows
118
+ */
119
+ queryReport(requestParameters: QueryReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetReportQueryResult>;
68
120
  }
@@ -24,10 +24,58 @@ import * as runtime from '../runtime';
24
24
  import { GetCourseVersionReportingFromJSON, } from '../models/GetCourseVersionReporting';
25
25
  import { GetCourseVersionSectionReportingFromJSON, } from '../models/GetCourseVersionSectionReporting';
26
26
  import { GetPortalManagementDashboardFromJSON, } from '../models/GetPortalManagementDashboard';
27
+ import { GetReportCatalogFromJSON, } from '../models/GetReportCatalog';
28
+ import { GetReportQueryResultFromJSON, } from '../models/GetReportQueryResult';
29
+ import { PostReportExportToJSON, } from '../models/PostReportExport';
30
+ import { PostReportQueryToJSON, } from '../models/PostReportQuery';
27
31
  /**
28
32
  *
29
33
  */
30
34
  export class ReportingApi extends runtime.BaseAPI {
35
+ /**
36
+ * Creates request options for exportReport without sending the request
37
+ */
38
+ exportReportRequestOpts(requestParameters) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (requestParameters['reportKey'] == null) {
41
+ throw new runtime.RequiredError('reportKey', 'Required parameter "reportKey" was null or undefined when calling exportReport().');
42
+ }
43
+ if (requestParameters['postReportExport'] == null) {
44
+ throw new runtime.RequiredError('postReportExport', 'Required parameter "postReportExport" was null or undefined when calling exportReport().');
45
+ }
46
+ const queryParameters = {};
47
+ const headerParameters = {};
48
+ headerParameters['Content-Type'] = 'application/json';
49
+ let urlPath = `/reporting/reports/{reportKey}/export`;
50
+ urlPath = urlPath.replace('{reportKey}', encodeURIComponent(String(requestParameters['reportKey'])));
51
+ return {
52
+ path: urlPath,
53
+ method: 'POST',
54
+ headers: headerParameters,
55
+ query: queryParameters,
56
+ body: PostReportExportToJSON(requestParameters['postReportExport']),
57
+ };
58
+ });
59
+ }
60
+ /**
61
+ * Export all rows of a report as CSV or XLSX
62
+ */
63
+ exportReportRaw(requestParameters, initOverrides) {
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ const requestOptions = yield this.exportReportRequestOpts(requestParameters);
66
+ const response = yield this.request(requestOptions, initOverrides);
67
+ return new runtime.BlobApiResponse(response);
68
+ });
69
+ }
70
+ /**
71
+ * Export all rows of a report as CSV or XLSX
72
+ */
73
+ exportReport(requestParameters, initOverrides) {
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ const response = yield this.exportReportRaw(requestParameters, initOverrides);
76
+ return yield response.value();
77
+ });
78
+ }
31
79
  /**
32
80
  * Creates request options for getCourseVersionReporting without sending the request
33
81
  */
@@ -156,4 +204,87 @@ export class ReportingApi extends runtime.BaseAPI {
156
204
  return yield response.value();
157
205
  });
158
206
  }
207
+ /**
208
+ * Creates request options for getReportCatalog without sending the request
209
+ */
210
+ getReportCatalogRequestOpts() {
211
+ return __awaiter(this, void 0, void 0, function* () {
212
+ const queryParameters = {};
213
+ const headerParameters = {};
214
+ let urlPath = `/reporting/reports`;
215
+ return {
216
+ path: urlPath,
217
+ method: 'GET',
218
+ headers: headerParameters,
219
+ query: queryParameters,
220
+ };
221
+ });
222
+ }
223
+ /**
224
+ * Returns report definitions with columns, supported filters, select options resolved for the selected portal, and default sort. Reports whose permission the caller lacks are omitted.
225
+ * List the reports the caller can run in the selected portal
226
+ */
227
+ getReportCatalogRaw(initOverrides) {
228
+ return __awaiter(this, void 0, void 0, function* () {
229
+ const requestOptions = yield this.getReportCatalogRequestOpts();
230
+ const response = yield this.request(requestOptions, initOverrides);
231
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetReportCatalogFromJSON(jsonValue));
232
+ });
233
+ }
234
+ /**
235
+ * Returns report definitions with columns, supported filters, select options resolved for the selected portal, and default sort. Reports whose permission the caller lacks are omitted.
236
+ * List the reports the caller can run in the selected portal
237
+ */
238
+ getReportCatalog(initOverrides) {
239
+ return __awaiter(this, void 0, void 0, function* () {
240
+ const response = yield this.getReportCatalogRaw(initOverrides);
241
+ return yield response.value();
242
+ });
243
+ }
244
+ /**
245
+ * Creates request options for queryReport without sending the request
246
+ */
247
+ queryReportRequestOpts(requestParameters) {
248
+ return __awaiter(this, void 0, void 0, function* () {
249
+ if (requestParameters['reportKey'] == null) {
250
+ throw new runtime.RequiredError('reportKey', 'Required parameter "reportKey" was null or undefined when calling queryReport().');
251
+ }
252
+ if (requestParameters['postReportQuery'] == null) {
253
+ throw new runtime.RequiredError('postReportQuery', 'Required parameter "postReportQuery" was null or undefined when calling queryReport().');
254
+ }
255
+ const queryParameters = {};
256
+ const headerParameters = {};
257
+ headerParameters['Content-Type'] = 'application/json';
258
+ let urlPath = `/reporting/reports/{reportKey}/query`;
259
+ urlPath = urlPath.replace('{reportKey}', encodeURIComponent(String(requestParameters['reportKey'])));
260
+ return {
261
+ path: urlPath,
262
+ method: 'POST',
263
+ headers: headerParameters,
264
+ query: queryParameters,
265
+ body: PostReportQueryToJSON(requestParameters['postReportQuery']),
266
+ };
267
+ });
268
+ }
269
+ /**
270
+ * Read-only. POST is used because filters vary per report. Results are scoped to the selected portal and its team portals.
271
+ * Run a report and return one page of rows
272
+ */
273
+ queryReportRaw(requestParameters, initOverrides) {
274
+ return __awaiter(this, void 0, void 0, function* () {
275
+ const requestOptions = yield this.queryReportRequestOpts(requestParameters);
276
+ const response = yield this.request(requestOptions, initOverrides);
277
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetReportQueryResultFromJSON(jsonValue));
278
+ });
279
+ }
280
+ /**
281
+ * Read-only. POST is used because filters vary per report. Results are scoped to the selected portal and its team portals.
282
+ * Run a report and return one page of rows
283
+ */
284
+ queryReport(requestParameters, initOverrides) {
285
+ return __awaiter(this, void 0, void 0, function* () {
286
+ const response = yield this.queryReportRaw(requestParameters, initOverrides);
287
+ return yield response.value();
288
+ });
289
+ }
159
290
  }
@@ -0,0 +1,40 @@
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 type { ReportCategory } from './ReportCategory';
13
+ import type { ReportDefinition } from './ReportDefinition';
14
+ /**
15
+ * Reports the caller may run in the selected portal.
16
+ * @export
17
+ * @interface GetReportCatalog
18
+ */
19
+ export interface GetReportCatalog {
20
+ /**
21
+ *
22
+ * @type {Array<ReportCategory>}
23
+ * @memberof GetReportCatalog
24
+ */
25
+ categories: Array<ReportCategory>;
26
+ /**
27
+ *
28
+ * @type {Array<ReportDefinition>}
29
+ * @memberof GetReportCatalog
30
+ */
31
+ reports: Array<ReportDefinition>;
32
+ }
33
+ /**
34
+ * Check if a given object implements the GetReportCatalog interface.
35
+ */
36
+ export declare function instanceOfGetReportCatalog(value: object): value is GetReportCatalog;
37
+ export declare function GetReportCatalogFromJSON(json: any): GetReportCatalog;
38
+ export declare function GetReportCatalogFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetReportCatalog;
39
+ export declare function GetReportCatalogToJSON(json: any): GetReportCatalog;
40
+ export declare function GetReportCatalogToJSONTyped(value?: GetReportCatalog | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,49 @@
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
+ import { ReportCategoryFromJSON, ReportCategoryToJSON, } from './ReportCategory';
15
+ import { ReportDefinitionFromJSON, ReportDefinitionToJSON, } from './ReportDefinition';
16
+ /**
17
+ * Check if a given object implements the GetReportCatalog interface.
18
+ */
19
+ export function instanceOfGetReportCatalog(value) {
20
+ if (!('categories' in value) || value['categories'] === undefined)
21
+ return false;
22
+ if (!('reports' in value) || value['reports'] === undefined)
23
+ return false;
24
+ return true;
25
+ }
26
+ export function GetReportCatalogFromJSON(json) {
27
+ return GetReportCatalogFromJSONTyped(json, false);
28
+ }
29
+ export function GetReportCatalogFromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'categories': (json['categories'].map(ReportCategoryFromJSON)),
35
+ 'reports': (json['reports'].map(ReportDefinitionFromJSON)),
36
+ };
37
+ }
38
+ export function GetReportCatalogToJSON(json) {
39
+ return GetReportCatalogToJSONTyped(json, false);
40
+ }
41
+ export function GetReportCatalogToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'categories': (value['categories'].map(ReportCategoryToJSON)),
47
+ 'reports': (value['reports'].map(ReportDefinitionToJSON)),
48
+ };
49
+ }