@easyedu/js-lsm-api 1.129.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 (103) hide show
  1. package/.openapi-generator/FILES +28 -0
  2. package/README.md +19 -2
  3. package/dist/apis/MarketingApi.d.ts +34 -0
  4. package/dist/apis/MarketingApi.js +74 -0
  5. package/dist/apis/ReportingApi.d.ts +52 -0
  6. package/dist/apis/ReportingApi.js +131 -0
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +1 -0
  9. package/dist/esm/apis/MarketingApi.d.ts +34 -0
  10. package/dist/esm/apis/MarketingApi.js +70 -0
  11. package/dist/esm/apis/ReportingApi.d.ts +52 -0
  12. package/dist/esm/apis/ReportingApi.js +131 -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/GetReportCatalog.d.ts +40 -0
  16. package/dist/esm/models/GetReportCatalog.js +49 -0
  17. package/dist/esm/models/GetReportQueryResult.d.ts +84 -0
  18. package/dist/esm/models/GetReportQueryResult.js +77 -0
  19. package/dist/esm/models/PostDemoRequest.d.ts +100 -0
  20. package/dist/esm/models/PostDemoRequest.js +83 -0
  21. package/dist/esm/models/PostDemoRequestResponse.d.ts +38 -0
  22. package/dist/esm/models/PostDemoRequestResponse.js +47 -0
  23. package/dist/esm/models/PostReportExport.d.ts +54 -0
  24. package/dist/esm/models/PostReportExport.js +56 -0
  25. package/dist/esm/models/PostReportQuery.d.ts +52 -0
  26. package/dist/esm/models/PostReportQuery.js +49 -0
  27. package/dist/esm/models/ReportCategory.d.ts +50 -0
  28. package/dist/esm/models/ReportCategory.js +58 -0
  29. package/dist/esm/models/ReportColumn.d.ts +59 -0
  30. package/dist/esm/models/ReportColumn.js +64 -0
  31. package/dist/esm/models/ReportDefinition.d.ts +89 -0
  32. package/dist/esm/models/ReportDefinition.js +85 -0
  33. package/dist/esm/models/ReportFilterDefinition.d.ts +94 -0
  34. package/dist/esm/models/ReportFilterDefinition.js +91 -0
  35. package/dist/esm/models/ReportFilterOption.d.ts +38 -0
  36. package/dist/esm/models/ReportFilterOption.js +47 -0
  37. package/dist/esm/models/ReportFilters.d.ts +105 -0
  38. package/dist/esm/models/ReportFilters.js +65 -0
  39. package/dist/esm/models/ReportSort.d.ts +46 -0
  40. package/dist/esm/models/ReportSort.js +54 -0
  41. package/dist/esm/models/index.d.ts +13 -0
  42. package/dist/esm/models/index.js +13 -0
  43. package/dist/models/GetReportCatalog.d.ts +40 -0
  44. package/dist/models/GetReportCatalog.js +56 -0
  45. package/dist/models/GetReportQueryResult.d.ts +84 -0
  46. package/dist/models/GetReportQueryResult.js +84 -0
  47. package/dist/models/PostDemoRequest.d.ts +100 -0
  48. package/dist/models/PostDemoRequest.js +91 -0
  49. package/dist/models/PostDemoRequestResponse.d.ts +38 -0
  50. package/dist/models/PostDemoRequestResponse.js +54 -0
  51. package/dist/models/PostReportExport.d.ts +54 -0
  52. package/dist/models/PostReportExport.js +64 -0
  53. package/dist/models/PostReportQuery.d.ts +52 -0
  54. package/dist/models/PostReportQuery.js +56 -0
  55. package/dist/models/ReportCategory.d.ts +50 -0
  56. package/dist/models/ReportCategory.js +66 -0
  57. package/dist/models/ReportColumn.d.ts +59 -0
  58. package/dist/models/ReportColumn.js +72 -0
  59. package/dist/models/ReportDefinition.d.ts +89 -0
  60. package/dist/models/ReportDefinition.js +93 -0
  61. package/dist/models/ReportFilterDefinition.d.ts +94 -0
  62. package/dist/models/ReportFilterDefinition.js +99 -0
  63. package/dist/models/ReportFilterOption.d.ts +38 -0
  64. package/dist/models/ReportFilterOption.js +54 -0
  65. package/dist/models/ReportFilters.d.ts +105 -0
  66. package/dist/models/ReportFilters.js +72 -0
  67. package/dist/models/ReportSort.d.ts +46 -0
  68. package/dist/models/ReportSort.js +62 -0
  69. package/dist/models/index.d.ts +13 -0
  70. package/dist/models/index.js +13 -0
  71. package/docs/GetReportCatalog.md +37 -0
  72. package/docs/GetReportQueryResult.md +50 -0
  73. package/docs/MarketingApi.md +78 -0
  74. package/docs/PostDemoRequest.md +50 -0
  75. package/docs/PostDemoRequestResponse.md +36 -0
  76. package/docs/PostReportExport.md +38 -0
  77. package/docs/PostReportQuery.md +40 -0
  78. package/docs/ReportCategory.md +36 -0
  79. package/docs/ReportColumn.md +39 -0
  80. package/docs/ReportDefinition.md +48 -0
  81. package/docs/ReportFilterDefinition.md +45 -0
  82. package/docs/ReportFilterOption.md +36 -0
  83. package/docs/ReportFilters.md +59 -0
  84. package/docs/ReportSort.md +36 -0
  85. package/docs/ReportingApi.md +207 -0
  86. package/package.json +1 -1
  87. package/src/apis/MarketingApi.ts +83 -0
  88. package/src/apis/ReportingApi.ts +181 -0
  89. package/src/apis/index.ts +1 -0
  90. package/src/models/GetReportCatalog.ts +90 -0
  91. package/src/models/GetReportQueryResult.ts +153 -0
  92. package/src/models/PostDemoRequest.ts +157 -0
  93. package/src/models/PostDemoRequestResponse.ts +75 -0
  94. package/src/models/PostReportExport.ts +108 -0
  95. package/src/models/PostReportQuery.ts +104 -0
  96. package/src/models/ReportCategory.ts +90 -0
  97. package/src/models/ReportColumn.ts +102 -0
  98. package/src/models/ReportDefinition.ts +166 -0
  99. package/src/models/ReportFilterDefinition.ts +154 -0
  100. package/src/models/ReportFilterOption.ts +75 -0
  101. package/src/models/ReportFilters.ts +162 -0
  102. package/src/models/ReportSort.ts +86 -0
  103. package/src/models/index.ts +13 -0
@@ -4,12 +4,87 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
+ | [**exportReport**](ReportingApi.md#exportreport) | **POST** /reporting/reports/{reportKey}/export | Export all rows of a report as CSV or XLSX |
7
8
  | [**getCourseVersionReporting**](ReportingApi.md#getcourseversionreporting) | **GET** /courses/{courseId}/versions/{courseVersionId}/reporting | Get instructor reporting for one explicit course version |
8
9
  | [**getCourseVersionSectionReporting**](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 |
9
10
  | [**getPortalManagementDashboard**](ReportingApi.md#getportalmanagementdashboard) | **GET** /reporting/portal/dashboard | Get the selected portal\'s management dashboard reporting |
11
+ | [**getReportCatalog**](ReportingApi.md#getreportcatalog) | **GET** /reporting/reports | List the reports the caller can run in the selected portal |
12
+ | [**queryReport**](ReportingApi.md#queryreport) | **POST** /reporting/reports/{reportKey}/query | Run a report and return one page of rows |
10
13
 
11
14
 
12
15
 
16
+ ## exportReport
17
+
18
+ > Blob exportReport(reportKey, postReportExport)
19
+
20
+ Export all rows of a report as CSV or XLSX
21
+
22
+ ### Example
23
+
24
+ ```ts
25
+ import {
26
+ Configuration,
27
+ ReportingApi,
28
+ } from '@easyedu/js-lsm-api';
29
+ import type { ExportReportRequest } from '@easyedu/js-lsm-api';
30
+
31
+ async function example() {
32
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
33
+ const api = new ReportingApi();
34
+
35
+ const body = {
36
+ // string
37
+ reportKey: reportKey_example,
38
+ // PostReportExport
39
+ postReportExport: ...,
40
+ } satisfies ExportReportRequest;
41
+
42
+ try {
43
+ const data = await api.exportReport(body);
44
+ console.log(data);
45
+ } catch (error) {
46
+ console.error(error);
47
+ }
48
+ }
49
+
50
+ // Run the test
51
+ example().catch(console.error);
52
+ ```
53
+
54
+ ### Parameters
55
+
56
+
57
+ | Name | Type | Description | Notes |
58
+ |------------- | ------------- | ------------- | -------------|
59
+ | **reportKey** | `string` | | [Defaults to `undefined`] |
60
+ | **postReportExport** | [PostReportExport](PostReportExport.md) | | |
61
+
62
+ ### Return type
63
+
64
+ **Blob**
65
+
66
+ ### Authorization
67
+
68
+ No authorization required
69
+
70
+ ### HTTP request headers
71
+
72
+ - **Content-Type**: `application/json`
73
+ - **Accept**: `text/csv`, `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`
74
+
75
+
76
+ ### HTTP response details
77
+ | Status code | Description | Response headers |
78
+ |-------------|-------------|------------------|
79
+ | **200** | Report file | - |
80
+ | **400** | Unsupported filter, invalid filter value, or unknown sort column | - |
81
+ | **403** | Missing the report\'s permission | - |
82
+ | **404** | Unknown report | - |
83
+ | **422** | The export exceeds the maximum row count; narrow the filters | - |
84
+
85
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
86
+
87
+
13
88
  ## getCourseVersionReporting
14
89
 
15
90
  > GetCourseVersionReporting getCourseVersionReporting(courseId, courseVersionId)
@@ -216,3 +291,135 @@ No authorization required
216
291
 
217
292
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
218
293
 
294
+
295
+ ## getReportCatalog
296
+
297
+ > GetReportCatalog getReportCatalog()
298
+
299
+ List the reports the caller can run in the selected portal
300
+
301
+ 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.
302
+
303
+ ### Example
304
+
305
+ ```ts
306
+ import {
307
+ Configuration,
308
+ ReportingApi,
309
+ } from '@easyedu/js-lsm-api';
310
+ import type { GetReportCatalogRequest } from '@easyedu/js-lsm-api';
311
+
312
+ async function example() {
313
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
314
+ const api = new ReportingApi();
315
+
316
+ try {
317
+ const data = await api.getReportCatalog();
318
+ console.log(data);
319
+ } catch (error) {
320
+ console.error(error);
321
+ }
322
+ }
323
+
324
+ // Run the test
325
+ example().catch(console.error);
326
+ ```
327
+
328
+ ### Parameters
329
+
330
+ This endpoint does not need any parameter.
331
+
332
+ ### Return type
333
+
334
+ [**GetReportCatalog**](GetReportCatalog.md)
335
+
336
+ ### Authorization
337
+
338
+ No authorization required
339
+
340
+ ### HTTP request headers
341
+
342
+ - **Content-Type**: Not defined
343
+ - **Accept**: `application/json`
344
+
345
+
346
+ ### HTTP response details
347
+ | Status code | Description | Response headers |
348
+ |-------------|-------------|------------------|
349
+ | **200** | Report catalog | - |
350
+
351
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
352
+
353
+
354
+ ## queryReport
355
+
356
+ > GetReportQueryResult queryReport(reportKey, postReportQuery)
357
+
358
+ Run a report and return one page of rows
359
+
360
+ Read-only. POST is used because filters vary per report. Results are scoped to the selected portal and its team portals.
361
+
362
+ ### Example
363
+
364
+ ```ts
365
+ import {
366
+ Configuration,
367
+ ReportingApi,
368
+ } from '@easyedu/js-lsm-api';
369
+ import type { QueryReportRequest } from '@easyedu/js-lsm-api';
370
+
371
+ async function example() {
372
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
373
+ const api = new ReportingApi();
374
+
375
+ const body = {
376
+ // string
377
+ reportKey: reportKey_example,
378
+ // PostReportQuery
379
+ postReportQuery: ...,
380
+ } satisfies QueryReportRequest;
381
+
382
+ try {
383
+ const data = await api.queryReport(body);
384
+ console.log(data);
385
+ } catch (error) {
386
+ console.error(error);
387
+ }
388
+ }
389
+
390
+ // Run the test
391
+ example().catch(console.error);
392
+ ```
393
+
394
+ ### Parameters
395
+
396
+
397
+ | Name | Type | Description | Notes |
398
+ |------------- | ------------- | ------------- | -------------|
399
+ | **reportKey** | `string` | | [Defaults to `undefined`] |
400
+ | **postReportQuery** | [PostReportQuery](PostReportQuery.md) | | |
401
+
402
+ ### Return type
403
+
404
+ [**GetReportQueryResult**](GetReportQueryResult.md)
405
+
406
+ ### Authorization
407
+
408
+ No authorization required
409
+
410
+ ### HTTP request headers
411
+
412
+ - **Content-Type**: `application/json`
413
+ - **Accept**: `application/json`
414
+
415
+
416
+ ### HTTP response details
417
+ | Status code | Description | Response headers |
418
+ |-------------|-------------|------------------|
419
+ | **200** | One page of report rows | - |
420
+ | **400** | Unsupported filter, invalid filter value, or unknown sort column | - |
421
+ | **403** | Missing the report\'s permission | - |
422
+ | **404** | Unknown report | - |
423
+
424
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
425
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.129.0",
3
+ "version": "1.131.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -0,0 +1,83 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import * as runtime from '../runtime';
16
+ import {
17
+ type PostDemoRequest,
18
+ PostDemoRequestFromJSON,
19
+ PostDemoRequestToJSON,
20
+ } from '../models/PostDemoRequest';
21
+ import {
22
+ type PostDemoRequestResponse,
23
+ PostDemoRequestResponseFromJSON,
24
+ PostDemoRequestResponseToJSON,
25
+ } from '../models/PostDemoRequestResponse';
26
+
27
+ export interface PostDemoRequestRequest {
28
+ postDemoRequest: PostDemoRequest;
29
+ }
30
+
31
+ /**
32
+ *
33
+ */
34
+ export class MarketingApi extends runtime.BaseAPI {
35
+
36
+ /**
37
+ * Creates request options for postDemoRequest without sending the request
38
+ */
39
+ async postDemoRequestRequestOpts(requestParameters: PostDemoRequestRequest): Promise<runtime.RequestOpts> {
40
+ if (requestParameters['postDemoRequest'] == null) {
41
+ throw new runtime.RequiredError(
42
+ 'postDemoRequest',
43
+ 'Required parameter "postDemoRequest" was null or undefined when calling postDemoRequest().'
44
+ );
45
+ }
46
+
47
+ const queryParameters: any = {};
48
+
49
+ const headerParameters: runtime.HTTPHeaders = {};
50
+
51
+ headerParameters['Content-Type'] = 'application/json';
52
+
53
+
54
+ let urlPath = `/mktg/demo-requests`;
55
+
56
+ return {
57
+ path: urlPath,
58
+ method: 'POST',
59
+ headers: headerParameters,
60
+ query: queryParameters,
61
+ body: PostDemoRequestToJSON(requestParameters['postDemoRequest']),
62
+ };
63
+ }
64
+
65
+ /**
66
+ * Save a demo or sales inquiry and notify sales
67
+ */
68
+ async postDemoRequestRaw(requestParameters: PostDemoRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostDemoRequestResponse>> {
69
+ const requestOptions = await this.postDemoRequestRequestOpts(requestParameters);
70
+ const response = await this.request(requestOptions, initOverrides);
71
+
72
+ return new runtime.JSONApiResponse(response, (jsonValue) => PostDemoRequestResponseFromJSON(jsonValue));
73
+ }
74
+
75
+ /**
76
+ * Save a demo or sales inquiry and notify sales
77
+ */
78
+ async postDemoRequest(requestParameters: PostDemoRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostDemoRequestResponse> {
79
+ const response = await this.postDemoRequestRaw(requestParameters, initOverrides);
80
+ return await response.value();
81
+ }
82
+
83
+ }
@@ -28,6 +28,31 @@ import {
28
28
  GetPortalManagementDashboardFromJSON,
29
29
  GetPortalManagementDashboardToJSON,
30
30
  } from '../models/GetPortalManagementDashboard';
31
+ import {
32
+ type GetReportCatalog,
33
+ GetReportCatalogFromJSON,
34
+ GetReportCatalogToJSON,
35
+ } from '../models/GetReportCatalog';
36
+ import {
37
+ type GetReportQueryResult,
38
+ GetReportQueryResultFromJSON,
39
+ GetReportQueryResultToJSON,
40
+ } from '../models/GetReportQueryResult';
41
+ import {
42
+ type PostReportExport,
43
+ PostReportExportFromJSON,
44
+ PostReportExportToJSON,
45
+ } from '../models/PostReportExport';
46
+ import {
47
+ type PostReportQuery,
48
+ PostReportQueryFromJSON,
49
+ PostReportQueryToJSON,
50
+ } from '../models/PostReportQuery';
51
+
52
+ export interface ExportReportRequest {
53
+ reportKey: string;
54
+ postReportExport: PostReportExport;
55
+ }
31
56
 
32
57
  export interface GetCourseVersionReportingRequest {
33
58
  courseId: string;
@@ -44,11 +69,71 @@ export interface GetPortalManagementDashboardRequest {
44
69
  days?: number;
45
70
  }
46
71
 
72
+ export interface QueryReportRequest {
73
+ reportKey: string;
74
+ postReportQuery: PostReportQuery;
75
+ }
76
+
47
77
  /**
48
78
  *
49
79
  */
50
80
  export class ReportingApi extends runtime.BaseAPI {
51
81
 
82
+ /**
83
+ * Creates request options for exportReport without sending the request
84
+ */
85
+ async exportReportRequestOpts(requestParameters: ExportReportRequest): Promise<runtime.RequestOpts> {
86
+ if (requestParameters['reportKey'] == null) {
87
+ throw new runtime.RequiredError(
88
+ 'reportKey',
89
+ 'Required parameter "reportKey" was null or undefined when calling exportReport().'
90
+ );
91
+ }
92
+
93
+ if (requestParameters['postReportExport'] == null) {
94
+ throw new runtime.RequiredError(
95
+ 'postReportExport',
96
+ 'Required parameter "postReportExport" was null or undefined when calling exportReport().'
97
+ );
98
+ }
99
+
100
+ const queryParameters: any = {};
101
+
102
+ const headerParameters: runtime.HTTPHeaders = {};
103
+
104
+ headerParameters['Content-Type'] = 'application/json';
105
+
106
+
107
+ let urlPath = `/reporting/reports/{reportKey}/export`;
108
+ urlPath = urlPath.replace('{reportKey}', encodeURIComponent(String(requestParameters['reportKey'])));
109
+
110
+ return {
111
+ path: urlPath,
112
+ method: 'POST',
113
+ headers: headerParameters,
114
+ query: queryParameters,
115
+ body: PostReportExportToJSON(requestParameters['postReportExport']),
116
+ };
117
+ }
118
+
119
+ /**
120
+ * Export all rows of a report as CSV or XLSX
121
+ */
122
+ async exportReportRaw(requestParameters: ExportReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
123
+ const requestOptions = await this.exportReportRequestOpts(requestParameters);
124
+ const response = await this.request(requestOptions, initOverrides);
125
+
126
+ return new runtime.BlobApiResponse(response);
127
+ }
128
+
129
+ /**
130
+ * Export all rows of a report as CSV or XLSX
131
+ */
132
+ async exportReport(requestParameters: ExportReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
133
+ const response = await this.exportReportRaw(requestParameters, initOverrides);
134
+ return await response.value();
135
+ }
136
+
52
137
  /**
53
138
  * Creates request options for getCourseVersionReporting without sending the request
54
139
  */
@@ -204,4 +289,100 @@ export class ReportingApi extends runtime.BaseAPI {
204
289
  return await response.value();
205
290
  }
206
291
 
292
+ /**
293
+ * Creates request options for getReportCatalog without sending the request
294
+ */
295
+ async getReportCatalogRequestOpts(): Promise<runtime.RequestOpts> {
296
+ const queryParameters: any = {};
297
+
298
+ const headerParameters: runtime.HTTPHeaders = {};
299
+
300
+
301
+ let urlPath = `/reporting/reports`;
302
+
303
+ return {
304
+ path: urlPath,
305
+ method: 'GET',
306
+ headers: headerParameters,
307
+ query: queryParameters,
308
+ };
309
+ }
310
+
311
+ /**
312
+ * 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.
313
+ * List the reports the caller can run in the selected portal
314
+ */
315
+ async getReportCatalogRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetReportCatalog>> {
316
+ const requestOptions = await this.getReportCatalogRequestOpts();
317
+ const response = await this.request(requestOptions, initOverrides);
318
+
319
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetReportCatalogFromJSON(jsonValue));
320
+ }
321
+
322
+ /**
323
+ * 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.
324
+ * List the reports the caller can run in the selected portal
325
+ */
326
+ async getReportCatalog(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetReportCatalog> {
327
+ const response = await this.getReportCatalogRaw(initOverrides);
328
+ return await response.value();
329
+ }
330
+
331
+ /**
332
+ * Creates request options for queryReport without sending the request
333
+ */
334
+ async queryReportRequestOpts(requestParameters: QueryReportRequest): Promise<runtime.RequestOpts> {
335
+ if (requestParameters['reportKey'] == null) {
336
+ throw new runtime.RequiredError(
337
+ 'reportKey',
338
+ 'Required parameter "reportKey" was null or undefined when calling queryReport().'
339
+ );
340
+ }
341
+
342
+ if (requestParameters['postReportQuery'] == null) {
343
+ throw new runtime.RequiredError(
344
+ 'postReportQuery',
345
+ 'Required parameter "postReportQuery" was null or undefined when calling queryReport().'
346
+ );
347
+ }
348
+
349
+ const queryParameters: any = {};
350
+
351
+ const headerParameters: runtime.HTTPHeaders = {};
352
+
353
+ headerParameters['Content-Type'] = 'application/json';
354
+
355
+
356
+ let urlPath = `/reporting/reports/{reportKey}/query`;
357
+ urlPath = urlPath.replace('{reportKey}', encodeURIComponent(String(requestParameters['reportKey'])));
358
+
359
+ return {
360
+ path: urlPath,
361
+ method: 'POST',
362
+ headers: headerParameters,
363
+ query: queryParameters,
364
+ body: PostReportQueryToJSON(requestParameters['postReportQuery']),
365
+ };
366
+ }
367
+
368
+ /**
369
+ * Read-only. POST is used because filters vary per report. Results are scoped to the selected portal and its team portals.
370
+ * Run a report and return one page of rows
371
+ */
372
+ async queryReportRaw(requestParameters: QueryReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetReportQueryResult>> {
373
+ const requestOptions = await this.queryReportRequestOpts(requestParameters);
374
+ const response = await this.request(requestOptions, initOverrides);
375
+
376
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetReportQueryResultFromJSON(jsonValue));
377
+ }
378
+
379
+ /**
380
+ * Read-only. POST is used because filters vary per report. Results are scoped to the selected portal and its team portals.
381
+ * Run a report and return one page of rows
382
+ */
383
+ async queryReport(requestParameters: QueryReportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetReportQueryResult> {
384
+ const response = await this.queryReportRaw(requestParameters, initOverrides);
385
+ return await response.value();
386
+ }
387
+
207
388
  }
package/src/apis/index.ts CHANGED
@@ -13,6 +13,7 @@ export * from './DispatchApi';
13
13
  export * from './EmailTemplateApi';
14
14
  export * from './IntegrationApi';
15
15
  export * from './LearnerExperienceApi';
16
+ export * from './MarketingApi';
16
17
  export * from './OtherApi';
17
18
  export * from './PlayerApi';
18
19
  export * from './PortalApi';
@@ -0,0 +1,90 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * LMS API
5
+ * LMS API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { ReportCategory } from './ReportCategory';
17
+ import {
18
+ ReportCategoryFromJSON,
19
+ ReportCategoryFromJSONTyped,
20
+ ReportCategoryToJSON,
21
+ ReportCategoryToJSONTyped,
22
+ } from './ReportCategory';
23
+ import type { ReportDefinition } from './ReportDefinition';
24
+ import {
25
+ ReportDefinitionFromJSON,
26
+ ReportDefinitionFromJSONTyped,
27
+ ReportDefinitionToJSON,
28
+ ReportDefinitionToJSONTyped,
29
+ } from './ReportDefinition';
30
+
31
+ /**
32
+ * Reports the caller may run in the selected portal.
33
+ * @export
34
+ * @interface GetReportCatalog
35
+ */
36
+ export interface GetReportCatalog {
37
+ /**
38
+ *
39
+ * @type {Array<ReportCategory>}
40
+ * @memberof GetReportCatalog
41
+ */
42
+ categories: Array<ReportCategory>;
43
+ /**
44
+ *
45
+ * @type {Array<ReportDefinition>}
46
+ * @memberof GetReportCatalog
47
+ */
48
+ reports: Array<ReportDefinition>;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the GetReportCatalog interface.
53
+ */
54
+ export function instanceOfGetReportCatalog(value: object): value is GetReportCatalog {
55
+ if (!('categories' in value) || value['categories'] === undefined) return false;
56
+ if (!('reports' in value) || value['reports'] === undefined) return false;
57
+ return true;
58
+ }
59
+
60
+ export function GetReportCatalogFromJSON(json: any): GetReportCatalog {
61
+ return GetReportCatalogFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function GetReportCatalogFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetReportCatalog {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'categories': ((json['categories'] as Array<any>).map(ReportCategoryFromJSON)),
71
+ 'reports': ((json['reports'] as Array<any>).map(ReportDefinitionFromJSON)),
72
+ };
73
+ }
74
+
75
+ export function GetReportCatalogToJSON(json: any): GetReportCatalog {
76
+ return GetReportCatalogToJSONTyped(json, false);
77
+ }
78
+
79
+ export function GetReportCatalogToJSONTyped(value?: GetReportCatalog | null, ignoreDiscriminator: boolean = false): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+
84
+ return {
85
+
86
+ 'categories': ((value['categories'] as Array<any>).map(ReportCategoryToJSON)),
87
+ 'reports': ((value['reports'] as Array<any>).map(ReportDefinitionToJSON)),
88
+ };
89
+ }
90
+