@iblai/iblai-api 3.45.8-core → 3.45.9-core
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/dist/index.cjs.js +355 -467
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +355 -467
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +355 -467
- package/dist/index.umd.js.map +1 -1
- package/dist/types/index.d.ts +10 -1
- package/dist/types/models/CatalogAutoIncrementResponse.d.ts +11 -11
- package/dist/types/models/CourseReviewPaginatedResponse.d.ts +18 -0
- package/dist/types/models/CourseReviewRequest.d.ts +37 -0
- package/dist/types/models/CourseReviewResponse.d.ts +40 -0
- package/dist/types/models/PaginatedSkill.d.ts +7 -0
- package/dist/types/models/ProgramEnrollmentSearchResponse.d.ts +22 -0
- package/dist/types/models/ProgramMetadataRequest.d.ts +29 -0
- package/dist/types/models/ProgramMetadataResponse.d.ts +29 -0
- package/dist/types/models/ProgramReview.d.ts +41 -0
- package/dist/types/models/ProgramReviewPaginatedResponse.d.ts +22 -0
- package/dist/types/models/ProgramReviewRequest.d.ts +37 -0
- package/dist/types/services/CatalogService.d.ts +168 -458
- package/package.json +1 -1
- package/src/core/OpenAPI.ts +1 -1
- package/src/index.ts +10 -1
- package/src/models/CatalogAutoIncrementResponse.ts +11 -11
- package/src/models/CourseReviewPaginatedResponse.ts +23 -0
- package/src/models/CourseReviewRequest.ts +42 -0
- package/src/models/CourseReviewResponse.ts +45 -0
- package/src/models/PaginatedSkill.ts +12 -0
- package/src/models/ProgramEnrollmentSearchResponse.ts +27 -0
- package/src/models/ProgramMetadataRequest.ts +34 -0
- package/src/models/ProgramMetadataResponse.ts +34 -0
- package/src/models/ProgramReview.ts +46 -0
- package/src/models/ProgramReviewPaginatedResponse.ts +27 -0
- package/src/models/ProgramReviewRequest.ts +42 -0
- package/src/services/CatalogService.ts +3415 -3417
- package/dist/types/models/CourseEligibilityCheckResponse.d.ts +0 -25
- package/src/models/CourseEligibilityCheckResponse.ts +0 -30
package/dist/index.cjs.js
CHANGED
|
@@ -110,7 +110,7 @@ class CancelablePromise {
|
|
|
110
110
|
|
|
111
111
|
const OpenAPI = {
|
|
112
112
|
BASE: 'https://base.manager.iblai.app',
|
|
113
|
-
VERSION: '3.45.
|
|
113
|
+
VERSION: '3.45.9-core',
|
|
114
114
|
WITH_CREDENTIALS: false,
|
|
115
115
|
CREDENTIALS: 'include',
|
|
116
116
|
TOKEN: undefined,
|
|
@@ -1898,7 +1898,7 @@ class CatalogService {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
/**
|
|
1900
1900
|
* Remove a course from the database.
|
|
1901
|
-
* @param courseId
|
|
1901
|
+
* @param courseId The unique identifier for the course to be deleted
|
|
1902
1902
|
* @param org Filter courses by their associated organization
|
|
1903
1903
|
* @param slug Filter courses by their slug (case-insensitive)
|
|
1904
1904
|
* @returns CourseDeleteResponse
|
|
@@ -1949,7 +1949,7 @@ class CatalogService {
|
|
|
1949
1949
|
* @param org Organization of the course
|
|
1950
1950
|
* @param userId User ID to check eligibility for
|
|
1951
1951
|
* @param username Username to check eligibility for
|
|
1952
|
-
* @returns
|
|
1952
|
+
* @returns any
|
|
1953
1953
|
* @throws ApiError
|
|
1954
1954
|
*/
|
|
1955
1955
|
static catalogEligibilityCoursesCheckRetrieve(courseId, localOnly, org, userId, username) {
|
|
@@ -2383,7 +2383,7 @@ class CatalogService {
|
|
|
2383
2383
|
* @param sort Field to sort results by
|
|
2384
2384
|
* @param userId Filter enrollments by user ID
|
|
2385
2385
|
* @param username Filter enrollments by username
|
|
2386
|
-
* @returns
|
|
2386
|
+
* @returns ProgramEnrollmentSearchResponse
|
|
2387
2387
|
* @throws ApiError
|
|
2388
2388
|
*/
|
|
2389
2389
|
static catalogEnrollmentProgramsSearchRetrieve(includeDefaultPlatform, org, page, pageSize, platformKey, programId, programType, slug, sort = '-id', userId, username) {
|
|
@@ -2480,13 +2480,19 @@ class CatalogService {
|
|
|
2480
2480
|
}
|
|
2481
2481
|
/**
|
|
2482
2482
|
* Retrieve auto increment information for a specific platform.
|
|
2483
|
+
* @param key Platform key identifier
|
|
2484
|
+
* @param org Platform organization identifier
|
|
2483
2485
|
* @returns CatalogAutoIncrementResponse
|
|
2484
2486
|
* @throws ApiError
|
|
2485
2487
|
*/
|
|
2486
|
-
static catalogIncrementRetrieve() {
|
|
2488
|
+
static catalogIncrementRetrieve(key, org) {
|
|
2487
2489
|
return request(OpenAPI, {
|
|
2488
2490
|
method: 'GET',
|
|
2489
2491
|
url: '/api/catalog/increment/',
|
|
2492
|
+
query: {
|
|
2493
|
+
'key': key,
|
|
2494
|
+
'org': org
|
|
2495
|
+
},
|
|
2490
2496
|
errors: {
|
|
2491
2497
|
404: `No response body`
|
|
2492
2498
|
}
|
|
@@ -2495,7 +2501,7 @@ class CatalogService {
|
|
|
2495
2501
|
/**
|
|
2496
2502
|
* Update auto increment information and retrieve a new ID for a specific platform.
|
|
2497
2503
|
* @param requestBody
|
|
2498
|
-
* @returns
|
|
2504
|
+
* @returns number
|
|
2499
2505
|
* @throws ApiError
|
|
2500
2506
|
*/
|
|
2501
2507
|
static catalogIncrementCreate(requestBody) {
|
|
@@ -2503,11 +2509,7 @@ class CatalogService {
|
|
|
2503
2509
|
method: 'POST',
|
|
2504
2510
|
url: '/api/catalog/increment/',
|
|
2505
2511
|
body: requestBody,
|
|
2506
|
-
mediaType: 'application/json'
|
|
2507
|
-
errors: {
|
|
2508
|
-
400: `No response body`,
|
|
2509
|
-
500: `No response body`
|
|
2510
|
-
}
|
|
2512
|
+
mediaType: 'application/json'
|
|
2511
2513
|
});
|
|
2512
2514
|
}
|
|
2513
2515
|
/**
|
|
@@ -4849,184 +4851,178 @@ class CatalogService {
|
|
|
4849
4851
|
});
|
|
4850
4852
|
}
|
|
4851
4853
|
/**
|
|
4852
|
-
*
|
|
4853
|
-
*
|
|
4854
|
-
*
|
|
4855
|
-
*
|
|
4856
|
-
*
|
|
4857
|
-
*
|
|
4858
|
-
* If the program cannot be found, a 404 status code is returned.
|
|
4859
|
-
*
|
|
4860
|
-
* Params:
|
|
4861
|
-
* program_id: The unique identifier for the program.
|
|
4862
|
-
* org: The organization associated with the program.
|
|
4863
|
-
*
|
|
4864
|
-
* Returns:
|
|
4865
|
-
* A JSON response containing the program metadata if successful, or an
|
|
4866
|
-
* appropriate error status code.
|
|
4867
|
-
*
|
|
4868
|
-
* TODO: program-key compatibility
|
|
4869
|
-
* @returns any No response body
|
|
4854
|
+
* Retrieve metadata for a specified program
|
|
4855
|
+
* @param programId The unique identifier for the program
|
|
4856
|
+
* @param org The organization associated with the program
|
|
4857
|
+
* @param platformKey Platform key identifier (alternative to org)
|
|
4858
|
+
* @param programKey Program key (alternative to program_id + org)
|
|
4859
|
+
* @returns ProgramMetadataResponse
|
|
4870
4860
|
* @throws ApiError
|
|
4871
4861
|
*/
|
|
4872
|
-
static catalogMetadataProgramRetrieve() {
|
|
4862
|
+
static catalogMetadataProgramRetrieve(programId, org, platformKey, programKey) {
|
|
4873
4863
|
return request(OpenAPI, {
|
|
4874
4864
|
method: 'GET',
|
|
4875
|
-
url: '/api/catalog/metadata/program/'
|
|
4865
|
+
url: '/api/catalog/metadata/program/',
|
|
4866
|
+
query: {
|
|
4867
|
+
'org': org,
|
|
4868
|
+
'platform_key': platformKey,
|
|
4869
|
+
'program_id': programId,
|
|
4870
|
+
'program_key': programKey
|
|
4871
|
+
},
|
|
4872
|
+
errors: {
|
|
4873
|
+
400: `Missing or invalid parameters`,
|
|
4874
|
+
401: `Unauthorized`,
|
|
4875
|
+
403: `Permission denied`,
|
|
4876
|
+
404: `Program not found`
|
|
4877
|
+
}
|
|
4876
4878
|
});
|
|
4877
4879
|
}
|
|
4878
4880
|
/**
|
|
4879
|
-
*
|
|
4880
|
-
*
|
|
4881
|
-
*
|
|
4882
|
-
*
|
|
4883
|
-
*
|
|
4884
|
-
*
|
|
4885
|
-
*
|
|
4886
|
-
* field parameter is provided, a 404 status code is returned as field
|
|
4887
|
-
* updates are not supported.
|
|
4888
|
-
*
|
|
4889
|
-
* Params:
|
|
4890
|
-
* program_id: The unique identifier for the program.
|
|
4891
|
-
* org: The organization associated with the program.
|
|
4892
|
-
* metadata: The new metadata to update the program with.
|
|
4893
|
-
* update (optional): A flag indicating whether to update the metadata.
|
|
4894
|
-
*
|
|
4895
|
-
* Returns:
|
|
4896
|
-
* A JSON response containing the updated program metadata if successful,
|
|
4897
|
-
* or an appropriate error status code.
|
|
4898
|
-
*
|
|
4899
|
-
* TODO: program-key compatibility
|
|
4900
|
-
* @returns any No response body
|
|
4881
|
+
* Update metadata for a specified program
|
|
4882
|
+
* @param programId The unique identifier for the program
|
|
4883
|
+
* @param requestBody
|
|
4884
|
+
* @param org The organization associated with the program
|
|
4885
|
+
* @param platformKey Platform key identifier (alternative to org)
|
|
4886
|
+
* @param programKey Program key (alternative to program_id + org)
|
|
4887
|
+
* @returns ProgramMetadataResponse
|
|
4901
4888
|
* @throws ApiError
|
|
4902
4889
|
*/
|
|
4903
|
-
static catalogMetadataProgramCreate() {
|
|
4890
|
+
static catalogMetadataProgramCreate(programId, requestBody, org, platformKey, programKey) {
|
|
4904
4891
|
return request(OpenAPI, {
|
|
4905
4892
|
method: 'POST',
|
|
4906
|
-
url: '/api/catalog/metadata/program/'
|
|
4893
|
+
url: '/api/catalog/metadata/program/',
|
|
4894
|
+
query: {
|
|
4895
|
+
'org': org,
|
|
4896
|
+
'platform_key': platformKey,
|
|
4897
|
+
'program_id': programId,
|
|
4898
|
+
'program_key': programKey
|
|
4899
|
+
},
|
|
4900
|
+
body: requestBody,
|
|
4901
|
+
mediaType: 'application/json',
|
|
4902
|
+
errors: {
|
|
4903
|
+
400: `Missing or invalid parameters`,
|
|
4904
|
+
401: `Unauthorized`,
|
|
4905
|
+
403: `Permission denied`,
|
|
4906
|
+
404: `Program not found`
|
|
4907
|
+
}
|
|
4907
4908
|
});
|
|
4908
4909
|
}
|
|
4909
4910
|
/**
|
|
4910
|
-
*
|
|
4911
|
-
*
|
|
4912
|
-
*
|
|
4913
|
-
*
|
|
4914
|
-
*
|
|
4915
|
-
*
|
|
4916
|
-
*
|
|
4917
|
-
* Params:
|
|
4918
|
-
* - program_id: The unique identifier for the program.
|
|
4919
|
-
* - org: The organization associated with the program.
|
|
4920
|
-
*
|
|
4921
|
-
* Returns:
|
|
4922
|
-
* - 200: Successfully retrieved the program metadata.
|
|
4923
|
-
* - 400: Bad request if the program ID is not provided.
|
|
4924
|
-
* - 404: Not found if the program or its metadata cannot be retrieved.
|
|
4925
|
-
*
|
|
4926
|
-
* TODO: Implement program-key compatibility for enhanced querying.
|
|
4927
|
-
* @returns any No response body
|
|
4911
|
+
* Retrieve public metadata for a specified program
|
|
4912
|
+
* @param programId The unique identifier for the program
|
|
4913
|
+
* @param org The organization associated with the program
|
|
4914
|
+
* @param platformKey Platform key identifier (alternative to org)
|
|
4915
|
+
* @param programKey Program key (alternative to program_id + org)
|
|
4916
|
+
* @returns ProgramMetadataResponse
|
|
4928
4917
|
* @throws ApiError
|
|
4929
4918
|
*/
|
|
4930
|
-
static catalogMetadataProgramPublicRetrieve() {
|
|
4919
|
+
static catalogMetadataProgramPublicRetrieve(programId, org, platformKey, programKey) {
|
|
4931
4920
|
return request(OpenAPI, {
|
|
4932
4921
|
method: 'GET',
|
|
4933
|
-
url: '/api/catalog/metadata/program-public/'
|
|
4922
|
+
url: '/api/catalog/metadata/program-public/',
|
|
4923
|
+
query: {
|
|
4924
|
+
'org': org,
|
|
4925
|
+
'platform_key': platformKey,
|
|
4926
|
+
'program_id': programId,
|
|
4927
|
+
'program_key': programKey
|
|
4928
|
+
},
|
|
4929
|
+
errors: {
|
|
4930
|
+
400: `Missing or invalid parameters`,
|
|
4931
|
+
404: `Program not found or no public metadata available`
|
|
4932
|
+
}
|
|
4934
4933
|
});
|
|
4935
4934
|
}
|
|
4936
4935
|
/**
|
|
4937
|
-
*
|
|
4938
|
-
* Query public program metadata.
|
|
4939
|
-
*
|
|
4940
|
-
* This method retrieves public metadata for a specified program. It requires
|
|
4941
|
-
* a program ID and optionally an organization to identify the program. The
|
|
4942
|
-
* metadata is filtered to include only public fields.
|
|
4943
|
-
*
|
|
4944
|
-
* Params:
|
|
4945
|
-
* - program_id: The unique identifier for the program.
|
|
4946
|
-
* - org: The organization associated with the program.
|
|
4947
|
-
*
|
|
4948
|
-
* Returns:
|
|
4949
|
-
* - 200: Successfully retrieved the program metadata.
|
|
4950
|
-
* - 400: Bad request if the program ID is not provided.
|
|
4951
|
-
* - 404: Not found if the program or its metadata cannot be retrieved.
|
|
4952
|
-
*
|
|
4953
|
-
* TODO: Implement program-key compatibility for enhanced querying.
|
|
4936
|
+
* Retrieve public metadata for a specified program
|
|
4954
4937
|
* @param field
|
|
4955
|
-
* @
|
|
4938
|
+
* @param programId The unique identifier for the program
|
|
4939
|
+
* @param org The organization associated with the program
|
|
4940
|
+
* @param platformKey Platform key identifier (alternative to org)
|
|
4941
|
+
* @param programKey Program key (alternative to program_id + org)
|
|
4942
|
+
* @returns ProgramMetadataResponse
|
|
4956
4943
|
* @throws ApiError
|
|
4957
4944
|
*/
|
|
4958
|
-
static catalogMetadataProgramPublicRetrieve2(field) {
|
|
4945
|
+
static catalogMetadataProgramPublicRetrieve2(field, programId, org, platformKey, programKey) {
|
|
4959
4946
|
return request(OpenAPI, {
|
|
4960
4947
|
method: 'GET',
|
|
4961
4948
|
url: '/api/catalog/metadata/program-public/{field}/',
|
|
4962
4949
|
path: {
|
|
4963
4950
|
'field': field
|
|
4951
|
+
},
|
|
4952
|
+
query: {
|
|
4953
|
+
'org': org,
|
|
4954
|
+
'platform_key': platformKey,
|
|
4955
|
+
'program_id': programId,
|
|
4956
|
+
'program_key': programKey
|
|
4957
|
+
},
|
|
4958
|
+
errors: {
|
|
4959
|
+
400: `Missing or invalid parameters`,
|
|
4960
|
+
404: `Program not found or no public metadata available`
|
|
4964
4961
|
}
|
|
4965
4962
|
});
|
|
4966
4963
|
}
|
|
4967
4964
|
/**
|
|
4968
|
-
*
|
|
4969
|
-
* Query program metadata.
|
|
4970
|
-
*
|
|
4971
|
-
* This method retrieves metadata for a specified program. The program is
|
|
4972
|
-
* identified by its program_id and organization (org). If the program_id
|
|
4973
|
-
* is not provided, a 400 status code is returned indicating a bad request.
|
|
4974
|
-
* If the program cannot be found, a 404 status code is returned.
|
|
4975
|
-
*
|
|
4976
|
-
* Params:
|
|
4977
|
-
* program_id: The unique identifier for the program.
|
|
4978
|
-
* org: The organization associated with the program.
|
|
4979
|
-
*
|
|
4980
|
-
* Returns:
|
|
4981
|
-
* A JSON response containing the program metadata if successful, or an
|
|
4982
|
-
* appropriate error status code.
|
|
4983
|
-
*
|
|
4984
|
-
* TODO: program-key compatibility
|
|
4965
|
+
* Retrieve metadata for a specified program
|
|
4985
4966
|
* @param field
|
|
4986
|
-
* @
|
|
4967
|
+
* @param programId The unique identifier for the program
|
|
4968
|
+
* @param org The organization associated with the program
|
|
4969
|
+
* @param platformKey Platform key identifier (alternative to org)
|
|
4970
|
+
* @param programKey Program key (alternative to program_id + org)
|
|
4971
|
+
* @returns ProgramMetadataResponse
|
|
4987
4972
|
* @throws ApiError
|
|
4988
4973
|
*/
|
|
4989
|
-
static catalogMetadataProgramRetrieve2(field) {
|
|
4974
|
+
static catalogMetadataProgramRetrieve2(field, programId, org, platformKey, programKey) {
|
|
4990
4975
|
return request(OpenAPI, {
|
|
4991
4976
|
method: 'GET',
|
|
4992
4977
|
url: '/api/catalog/metadata/program/{field}/',
|
|
4993
4978
|
path: {
|
|
4994
4979
|
'field': field
|
|
4980
|
+
},
|
|
4981
|
+
query: {
|
|
4982
|
+
'org': org,
|
|
4983
|
+
'platform_key': platformKey,
|
|
4984
|
+
'program_id': programId,
|
|
4985
|
+
'program_key': programKey
|
|
4986
|
+
},
|
|
4987
|
+
errors: {
|
|
4988
|
+
400: `Missing or invalid parameters`,
|
|
4989
|
+
401: `Unauthorized`,
|
|
4990
|
+
403: `Permission denied`,
|
|
4991
|
+
404: `Program not found`
|
|
4995
4992
|
}
|
|
4996
4993
|
});
|
|
4997
4994
|
}
|
|
4998
4995
|
/**
|
|
4999
|
-
*
|
|
5000
|
-
* Update program metadata.
|
|
5001
|
-
*
|
|
5002
|
-
* This method updates the metadata for a specified program. The program is
|
|
5003
|
-
* identified by its program_id and organization (org). If the program_id
|
|
5004
|
-
* is not provided, a 400 status code is returned indicating a bad request.
|
|
5005
|
-
* If the program cannot be found, a 404 status code is returned. If the
|
|
5006
|
-
* field parameter is provided, a 404 status code is returned as field
|
|
5007
|
-
* updates are not supported.
|
|
5008
|
-
*
|
|
5009
|
-
* Params:
|
|
5010
|
-
* program_id: The unique identifier for the program.
|
|
5011
|
-
* org: The organization associated with the program.
|
|
5012
|
-
* metadata: The new metadata to update the program with.
|
|
5013
|
-
* update (optional): A flag indicating whether to update the metadata.
|
|
5014
|
-
*
|
|
5015
|
-
* Returns:
|
|
5016
|
-
* A JSON response containing the updated program metadata if successful,
|
|
5017
|
-
* or an appropriate error status code.
|
|
5018
|
-
*
|
|
5019
|
-
* TODO: program-key compatibility
|
|
4996
|
+
* Update metadata for a specified program
|
|
5020
4997
|
* @param field
|
|
5021
|
-
* @
|
|
4998
|
+
* @param programId The unique identifier for the program
|
|
4999
|
+
* @param requestBody
|
|
5000
|
+
* @param org The organization associated with the program
|
|
5001
|
+
* @param platformKey Platform key identifier (alternative to org)
|
|
5002
|
+
* @param programKey Program key (alternative to program_id + org)
|
|
5003
|
+
* @returns ProgramMetadataResponse
|
|
5022
5004
|
* @throws ApiError
|
|
5023
5005
|
*/
|
|
5024
|
-
static catalogMetadataProgramCreate2(field) {
|
|
5006
|
+
static catalogMetadataProgramCreate2(field, programId, requestBody, org, platformKey, programKey) {
|
|
5025
5007
|
return request(OpenAPI, {
|
|
5026
5008
|
method: 'POST',
|
|
5027
5009
|
url: '/api/catalog/metadata/program/{field}/',
|
|
5028
5010
|
path: {
|
|
5029
5011
|
'field': field
|
|
5012
|
+
},
|
|
5013
|
+
query: {
|
|
5014
|
+
'org': org,
|
|
5015
|
+
'platform_key': platformKey,
|
|
5016
|
+
'program_id': programId,
|
|
5017
|
+
'program_key': programKey
|
|
5018
|
+
},
|
|
5019
|
+
body: requestBody,
|
|
5020
|
+
mediaType: 'application/json',
|
|
5021
|
+
errors: {
|
|
5022
|
+
400: `Missing or invalid parameters`,
|
|
5023
|
+
401: `Unauthorized`,
|
|
5024
|
+
403: `Permission denied`,
|
|
5025
|
+
404: `Program not found`
|
|
5030
5026
|
}
|
|
5031
5027
|
});
|
|
5032
5028
|
}
|
|
@@ -5453,25 +5449,65 @@ class CatalogService {
|
|
|
5453
5449
|
}
|
|
5454
5450
|
/**
|
|
5455
5451
|
* Retrieve pathways matching query. Limited parameters.
|
|
5452
|
+
* @param itemId Item ID associated with the pathway
|
|
5453
|
+
* @param name Pathway name
|
|
5454
|
+
* @param pathwayId Pathway ID
|
|
5455
|
+
* @param pathwayUuid Pathway UUID
|
|
5456
|
+
* @param platformKey Platform key
|
|
5457
|
+
* @param slug Pathway slug (case-insensitive)
|
|
5458
|
+
* @param userId User ID of the pathway owner
|
|
5459
|
+
* @param username Username of the pathway owner
|
|
5460
|
+
* @param visible Whether the pathway is visible
|
|
5456
5461
|
* @returns Pathway
|
|
5457
5462
|
* @throws ApiError
|
|
5458
5463
|
*/
|
|
5459
|
-
static catalogPathwaysList() {
|
|
5464
|
+
static catalogPathwaysList(itemId, name, pathwayId, pathwayUuid, platformKey, slug, userId, username, visible) {
|
|
5460
5465
|
return request(OpenAPI, {
|
|
5461
5466
|
method: 'GET',
|
|
5462
|
-
url: '/api/catalog/pathways/'
|
|
5467
|
+
url: '/api/catalog/pathways/',
|
|
5468
|
+
query: {
|
|
5469
|
+
'item_id': itemId,
|
|
5470
|
+
'name': name,
|
|
5471
|
+
'pathway_id': pathwayId,
|
|
5472
|
+
'pathway_uuid': pathwayUuid,
|
|
5473
|
+
'platform_key': platformKey,
|
|
5474
|
+
'slug': slug,
|
|
5475
|
+
'user_id': userId,
|
|
5476
|
+
'username': username,
|
|
5477
|
+
'visible': visible
|
|
5478
|
+
}
|
|
5463
5479
|
});
|
|
5464
5480
|
}
|
|
5465
5481
|
/**
|
|
5466
5482
|
* Add or update a pathway.
|
|
5467
5483
|
* @param requestBody
|
|
5484
|
+
* @param itemId Item ID associated with the pathway
|
|
5485
|
+
* @param name Pathway name
|
|
5486
|
+
* @param pathwayId Pathway ID
|
|
5487
|
+
* @param pathwayUuid Pathway UUID
|
|
5488
|
+
* @param platformKey Platform key
|
|
5489
|
+
* @param slug Pathway slug (case-insensitive)
|
|
5490
|
+
* @param userId User ID of the pathway owner
|
|
5491
|
+
* @param username Username of the pathway owner
|
|
5492
|
+
* @param visible Whether the pathway is visible
|
|
5468
5493
|
* @returns Pathway
|
|
5469
5494
|
* @throws ApiError
|
|
5470
5495
|
*/
|
|
5471
|
-
static catalogPathwaysCreate(requestBody) {
|
|
5496
|
+
static catalogPathwaysCreate(requestBody, itemId, name, pathwayId, pathwayUuid, platformKey, slug, userId, username, visible) {
|
|
5472
5497
|
return request(OpenAPI, {
|
|
5473
5498
|
method: 'POST',
|
|
5474
5499
|
url: '/api/catalog/pathways/',
|
|
5500
|
+
query: {
|
|
5501
|
+
'item_id': itemId,
|
|
5502
|
+
'name': name,
|
|
5503
|
+
'pathway_id': pathwayId,
|
|
5504
|
+
'pathway_uuid': pathwayUuid,
|
|
5505
|
+
'platform_key': platformKey,
|
|
5506
|
+
'slug': slug,
|
|
5507
|
+
'user_id': userId,
|
|
5508
|
+
'username': username,
|
|
5509
|
+
'visible': visible
|
|
5510
|
+
},
|
|
5475
5511
|
body: requestBody,
|
|
5476
5512
|
mediaType: 'application/json',
|
|
5477
5513
|
errors: {
|
|
@@ -5481,13 +5517,33 @@ class CatalogService {
|
|
|
5481
5517
|
}
|
|
5482
5518
|
/**
|
|
5483
5519
|
* Remove a pathway from the database.
|
|
5520
|
+
* @param pathwayId Pathway ID to delete
|
|
5521
|
+
* @param userId User ID of the pathway owner
|
|
5522
|
+
* @param itemId Item ID associated with the pathway
|
|
5523
|
+
* @param name Pathway name
|
|
5524
|
+
* @param pathwayUuid Pathway UUID
|
|
5525
|
+
* @param platformKey Platform key
|
|
5526
|
+
* @param slug Pathway slug (case-insensitive)
|
|
5527
|
+
* @param username Username of the pathway owner
|
|
5528
|
+
* @param visible Whether the pathway is visible
|
|
5484
5529
|
* @returns PathwayDeleteResponse
|
|
5485
5530
|
* @throws ApiError
|
|
5486
5531
|
*/
|
|
5487
|
-
static catalogPathwaysDestroy() {
|
|
5532
|
+
static catalogPathwaysDestroy(pathwayId, userId, itemId, name, pathwayUuid, platformKey, slug, username, visible) {
|
|
5488
5533
|
return request(OpenAPI, {
|
|
5489
5534
|
method: 'DELETE',
|
|
5490
5535
|
url: '/api/catalog/pathways/',
|
|
5536
|
+
query: {
|
|
5537
|
+
'item_id': itemId,
|
|
5538
|
+
'name': name,
|
|
5539
|
+
'pathway_id': pathwayId,
|
|
5540
|
+
'pathway_uuid': pathwayUuid,
|
|
5541
|
+
'platform_key': platformKey,
|
|
5542
|
+
'slug': slug,
|
|
5543
|
+
'user_id': userId,
|
|
5544
|
+
'username': username,
|
|
5545
|
+
'visible': visible
|
|
5546
|
+
},
|
|
5491
5547
|
errors: {
|
|
5492
5548
|
400: `No response body`
|
|
5493
5549
|
}
|
|
@@ -5495,13 +5551,27 @@ class CatalogService {
|
|
|
5495
5551
|
}
|
|
5496
5552
|
/**
|
|
5497
5553
|
* Retrieve programs matching query parameters. Limited parameters include program_id, name, slug, enabled, and org.
|
|
5554
|
+
* @param courseId Course ID contained in the program
|
|
5555
|
+
* @param enabled Whether the program is enabled
|
|
5556
|
+
* @param name Program name
|
|
5557
|
+
* @param org Organization of the program
|
|
5558
|
+
* @param programId Program ID
|
|
5559
|
+
* @param slug Program slug (case-insensitive)
|
|
5498
5560
|
* @returns Program
|
|
5499
5561
|
* @throws ApiError
|
|
5500
5562
|
*/
|
|
5501
|
-
static catalogProgramsList() {
|
|
5563
|
+
static catalogProgramsList(courseId, enabled, name, org, programId, slug) {
|
|
5502
5564
|
return request(OpenAPI, {
|
|
5503
5565
|
method: 'GET',
|
|
5504
|
-
url: '/api/catalog/programs/'
|
|
5566
|
+
url: '/api/catalog/programs/',
|
|
5567
|
+
query: {
|
|
5568
|
+
'course_id': courseId,
|
|
5569
|
+
'enabled': enabled,
|
|
5570
|
+
'name': name,
|
|
5571
|
+
'org': org,
|
|
5572
|
+
'program_id': programId,
|
|
5573
|
+
'slug': slug
|
|
5574
|
+
}
|
|
5505
5575
|
});
|
|
5506
5576
|
}
|
|
5507
5577
|
/**
|
|
@@ -5523,13 +5593,19 @@ class CatalogService {
|
|
|
5523
5593
|
}
|
|
5524
5594
|
/**
|
|
5525
5595
|
* Remove a program from the database. Requires program_id and org as parameters.
|
|
5596
|
+
* @param org Organization of the program
|
|
5597
|
+
* @param programId Program ID to delete
|
|
5526
5598
|
* @returns ProgramDeleteResponse
|
|
5527
5599
|
* @throws ApiError
|
|
5528
5600
|
*/
|
|
5529
|
-
static catalogProgramsDestroy() {
|
|
5601
|
+
static catalogProgramsDestroy(org, programId) {
|
|
5530
5602
|
return request(OpenAPI, {
|
|
5531
5603
|
method: 'DELETE',
|
|
5532
5604
|
url: '/api/catalog/programs/',
|
|
5605
|
+
query: {
|
|
5606
|
+
'org': org,
|
|
5607
|
+
'program_id': programId
|
|
5608
|
+
},
|
|
5533
5609
|
errors: {
|
|
5534
5610
|
400: `No response body`
|
|
5535
5611
|
}
|
|
@@ -5644,12 +5720,12 @@ class CatalogService {
|
|
|
5644
5720
|
}
|
|
5645
5721
|
/**
|
|
5646
5722
|
* Remove a resource from the database.
|
|
5647
|
-
* @param id Resource ID
|
|
5723
|
+
* @param id Resource ID to delete
|
|
5648
5724
|
* @param itemId Item ID associated with the resource
|
|
5649
5725
|
* @param key Platform key
|
|
5650
5726
|
* @param name Resource name
|
|
5651
5727
|
* @param org Platform organization
|
|
5652
|
-
* @param platformKey Platform key
|
|
5728
|
+
* @param platformKey Platform key
|
|
5653
5729
|
* @param platformOrg Platform organization (alternative to org)
|
|
5654
5730
|
* @param resourceType Type of resource
|
|
5655
5731
|
* @param userId User ID who owns the resource
|
|
@@ -5676,63 +5752,38 @@ class CatalogService {
|
|
|
5676
5752
|
});
|
|
5677
5753
|
}
|
|
5678
5754
|
/**
|
|
5679
|
-
*
|
|
5680
|
-
*
|
|
5681
|
-
*
|
|
5682
|
-
*
|
|
5683
|
-
*
|
|
5684
|
-
*
|
|
5685
|
-
*
|
|
5686
|
-
*
|
|
5687
|
-
*
|
|
5688
|
-
*
|
|
5689
|
-
*
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
* page_size (int, optional): Number of items per page
|
|
5693
|
-
*
|
|
5694
|
-
* Methods:
|
|
5695
|
-
* GET: Retrieve a paginated list of course reviews with filtering
|
|
5696
|
-
*
|
|
5697
|
-
* Returns:
|
|
5698
|
-
* GET: A paginated JSON response containing course reviews:
|
|
5699
|
-
* {
|
|
5700
|
-
* "count": 15,
|
|
5701
|
-
* "next": "https://api.example.com/api/catalog/reviews/course/?page=2",
|
|
5702
|
-
* "previous": null,
|
|
5703
|
-
* "results": [
|
|
5704
|
-
* {
|
|
5705
|
-
* "user_id": 123,
|
|
5706
|
-
* "username": "student1",
|
|
5707
|
-
* "content": "This course was excellent and very informative.",
|
|
5708
|
-
* "rating": 4.5,
|
|
5709
|
-
* "title": "Great Course!",
|
|
5710
|
-
* "visible": true,
|
|
5711
|
-
* "created": "2023-01-15T10:30:00Z",
|
|
5712
|
-
* "modified": "2023-01-15T10:30:00Z",
|
|
5713
|
-
* "course_id": "course-v1:org+course+run"
|
|
5714
|
-
* },
|
|
5715
|
-
* ...
|
|
5716
|
-
* ]
|
|
5717
|
-
* }
|
|
5718
|
-
*
|
|
5719
|
-
* Error Responses:
|
|
5720
|
-
* 400 Bad Request: If required parameters are missing or invalid
|
|
5721
|
-
* 401 Unauthorized: If the user is not authenticated
|
|
5722
|
-
* 403 Forbidden: If the user does not have permission to access this resource
|
|
5723
|
-
* 500 Internal Server Error: If an unexpected error occurs
|
|
5724
|
-
*
|
|
5725
|
-
* Access Control:
|
|
5726
|
-
* - Requires IsDMAdmin, IsPlatformAdminReadOnly, or IsPlatformAdminForCourse permission
|
|
5727
|
-
* - Platform admins can view reviews for courses in their platform (read-only)
|
|
5728
|
-
* - DM admins can view all reviews
|
|
5729
|
-
* @returns any No response body
|
|
5730
|
-
* @throws ApiError
|
|
5731
|
-
*/
|
|
5732
|
-
static catalogReviewsCourseRetrieve() {
|
|
5755
|
+
* Retrieve a paginated list of course reviews with filtering options
|
|
5756
|
+
* @param courseId Filter reviews by course ID
|
|
5757
|
+
* @param org Alias for platform_org
|
|
5758
|
+
* @param page Page number for pagination
|
|
5759
|
+
* @param pageSize Number of items per page
|
|
5760
|
+
* @param platformKey Filter reviews by platform key
|
|
5761
|
+
* @param platformOrg Filter reviews by platform organization
|
|
5762
|
+
* @param sort Field to sort results by (default: '-id')
|
|
5763
|
+
* @param userId Filter reviews by user ID
|
|
5764
|
+
* @returns CourseReviewPaginatedResponse
|
|
5765
|
+
* @throws ApiError
|
|
5766
|
+
*/
|
|
5767
|
+
static catalogReviewsCourseRetrieve(courseId, org, page, pageSize, platformKey, platformOrg, sort = '-id', userId) {
|
|
5733
5768
|
return request(OpenAPI, {
|
|
5734
5769
|
method: 'GET',
|
|
5735
|
-
url: '/api/catalog/reviews/course/'
|
|
5770
|
+
url: '/api/catalog/reviews/course/',
|
|
5771
|
+
query: {
|
|
5772
|
+
'course_id': courseId,
|
|
5773
|
+
'org': org,
|
|
5774
|
+
'page': page,
|
|
5775
|
+
'page_size': pageSize,
|
|
5776
|
+
'platform_key': platformKey,
|
|
5777
|
+
'platform_org': platformOrg,
|
|
5778
|
+
'sort': sort,
|
|
5779
|
+
'user_id': userId
|
|
5780
|
+
},
|
|
5781
|
+
errors: {
|
|
5782
|
+
400: `Invalid parameters`,
|
|
5783
|
+
401: `Unauthorized`,
|
|
5784
|
+
403: `Permission denied`,
|
|
5785
|
+
500: `Internal server error`
|
|
5786
|
+
}
|
|
5736
5787
|
});
|
|
5737
5788
|
}
|
|
5738
5789
|
/**
|
|
@@ -5755,177 +5806,83 @@ class CatalogService {
|
|
|
5755
5806
|
});
|
|
5756
5807
|
}
|
|
5757
5808
|
/**
|
|
5758
|
-
*
|
|
5759
|
-
*
|
|
5760
|
-
*
|
|
5761
|
-
*
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
* DELETE: Delete a course review
|
|
5765
|
-
*
|
|
5766
|
-
* Request Body (POST):
|
|
5767
|
-
* A JSON object containing:
|
|
5768
|
-
* - course_id (str, required): The course ID to review
|
|
5769
|
-
* - username (str, required): The username of the reviewer
|
|
5770
|
-
* - rating (float, optional): The rating value (typically 1-5)
|
|
5771
|
-
* - title (str, optional): The review title
|
|
5772
|
-
* - content (str, optional): The review content/text
|
|
5773
|
-
* - visible (bool, optional): Whether the review is visible (default: true)
|
|
5774
|
-
*
|
|
5775
|
-
* Query Parameters (DELETE):
|
|
5776
|
-
* course_id (str, required): The course ID of the review to delete
|
|
5777
|
-
* username (str, required): The username of the reviewer
|
|
5778
|
-
*
|
|
5779
|
-
* Returns:
|
|
5780
|
-
* POST: A JSON response containing the created/updated review:
|
|
5781
|
-
* {
|
|
5782
|
-
* "user_id": 123,
|
|
5783
|
-
* "username": "student1",
|
|
5784
|
-
* "content": "This course was excellent and very informative.",
|
|
5785
|
-
* "rating": 4.5,
|
|
5786
|
-
* "title": "Great Course!",
|
|
5787
|
-
* "visible": true,
|
|
5788
|
-
* "created": "2023-01-15T10:30:00Z",
|
|
5789
|
-
* "modified": "2023-01-15T10:30:00Z",
|
|
5790
|
-
* "course_id": "course-v1:org+course+run"
|
|
5791
|
-
* }
|
|
5792
|
-
*
|
|
5793
|
-
* DELETE: A success response with status 200
|
|
5794
|
-
*
|
|
5795
|
-
* Error Responses:
|
|
5796
|
-
* 400 Bad Request: If required parameters are missing or invalid
|
|
5797
|
-
* 401 Unauthorized: If the user is not authenticated
|
|
5798
|
-
* 403 Forbidden: If the user does not have permission to manage this review
|
|
5799
|
-
* 500 Internal Server Error: If an unexpected error occurs during review operations
|
|
5800
|
-
*
|
|
5801
|
-
* Access Control:
|
|
5802
|
-
* - Requires IsDMAdmin or IsEdxUserReadWriteDelete permission
|
|
5803
|
-
* - Users can create, update, or delete their own reviews
|
|
5804
|
-
* - DM admins can manage all reviews
|
|
5805
|
-
* @returns any No response body
|
|
5806
|
-
* @throws ApiError
|
|
5807
|
-
*/
|
|
5808
|
-
static catalogReviewsCourseUpdateCreate() {
|
|
5809
|
+
* Create or update a course review
|
|
5810
|
+
* @param requestBody
|
|
5811
|
+
* @returns CourseReviewResponse
|
|
5812
|
+
* @throws ApiError
|
|
5813
|
+
*/
|
|
5814
|
+
static catalogReviewsCourseUpdateCreate(requestBody) {
|
|
5809
5815
|
return request(OpenAPI, {
|
|
5810
5816
|
method: 'POST',
|
|
5811
|
-
url: '/api/catalog/reviews/course/update/'
|
|
5817
|
+
url: '/api/catalog/reviews/course/update/',
|
|
5818
|
+
body: requestBody,
|
|
5819
|
+
mediaType: 'application/json',
|
|
5820
|
+
errors: {
|
|
5821
|
+
400: `Invalid parameters`,
|
|
5822
|
+
401: `Unauthorized`,
|
|
5823
|
+
403: `Permission denied`,
|
|
5824
|
+
500: `Review could not be saved`
|
|
5825
|
+
}
|
|
5812
5826
|
});
|
|
5813
5827
|
}
|
|
5814
5828
|
/**
|
|
5815
|
-
*
|
|
5816
|
-
*
|
|
5817
|
-
*
|
|
5818
|
-
*
|
|
5819
|
-
*
|
|
5820
|
-
*
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
* Request Body (POST):
|
|
5824
|
-
* A JSON object containing:
|
|
5825
|
-
* - course_id (str, required): The course ID to review
|
|
5826
|
-
* - username (str, required): The username of the reviewer
|
|
5827
|
-
* - rating (float, optional): The rating value (typically 1-5)
|
|
5828
|
-
* - title (str, optional): The review title
|
|
5829
|
-
* - content (str, optional): The review content/text
|
|
5830
|
-
* - visible (bool, optional): Whether the review is visible (default: true)
|
|
5831
|
-
*
|
|
5832
|
-
* Query Parameters (DELETE):
|
|
5833
|
-
* course_id (str, required): The course ID of the review to delete
|
|
5834
|
-
* username (str, required): The username of the reviewer
|
|
5835
|
-
*
|
|
5836
|
-
* Returns:
|
|
5837
|
-
* POST: A JSON response containing the created/updated review:
|
|
5838
|
-
* {
|
|
5839
|
-
* "user_id": 123,
|
|
5840
|
-
* "username": "student1",
|
|
5841
|
-
* "content": "This course was excellent and very informative.",
|
|
5842
|
-
* "rating": 4.5,
|
|
5843
|
-
* "title": "Great Course!",
|
|
5844
|
-
* "visible": true,
|
|
5845
|
-
* "created": "2023-01-15T10:30:00Z",
|
|
5846
|
-
* "modified": "2023-01-15T10:30:00Z",
|
|
5847
|
-
* "course_id": "course-v1:org+course+run"
|
|
5848
|
-
* }
|
|
5849
|
-
*
|
|
5850
|
-
* DELETE: A success response with status 200
|
|
5851
|
-
*
|
|
5852
|
-
* Error Responses:
|
|
5853
|
-
* 400 Bad Request: If required parameters are missing or invalid
|
|
5854
|
-
* 401 Unauthorized: If the user is not authenticated
|
|
5855
|
-
* 403 Forbidden: If the user does not have permission to manage this review
|
|
5856
|
-
* 500 Internal Server Error: If an unexpected error occurs during review operations
|
|
5857
|
-
*
|
|
5858
|
-
* Access Control:
|
|
5859
|
-
* - Requires IsDMAdmin or IsEdxUserReadWriteDelete permission
|
|
5860
|
-
* - Users can create, update, or delete their own reviews
|
|
5861
|
-
* - DM admins can manage all reviews
|
|
5862
|
-
* @returns void
|
|
5863
|
-
* @throws ApiError
|
|
5864
|
-
*/
|
|
5865
|
-
static catalogReviewsCourseUpdateDestroy() {
|
|
5829
|
+
* Delete a course review
|
|
5830
|
+
* @param courseId The course ID of the review to delete
|
|
5831
|
+
* @param username The username of the reviewer
|
|
5832
|
+
* @param userId The user ID of the reviewer (alternative to username)
|
|
5833
|
+
* @returns any Review successfully deleted
|
|
5834
|
+
* @throws ApiError
|
|
5835
|
+
*/
|
|
5836
|
+
static catalogReviewsCourseUpdateDestroy(courseId, username, userId) {
|
|
5866
5837
|
return request(OpenAPI, {
|
|
5867
5838
|
method: 'DELETE',
|
|
5868
|
-
url: '/api/catalog/reviews/course/update/'
|
|
5839
|
+
url: '/api/catalog/reviews/course/update/',
|
|
5840
|
+
query: {
|
|
5841
|
+
'course_id': courseId,
|
|
5842
|
+
'user_id': userId,
|
|
5843
|
+
'username': username
|
|
5844
|
+
},
|
|
5845
|
+
errors: {
|
|
5846
|
+
400: `Invalid parameters`,
|
|
5847
|
+
401: `Unauthorized`,
|
|
5848
|
+
403: `Permission denied`,
|
|
5849
|
+
500: `Review could not be deleted`
|
|
5850
|
+
}
|
|
5869
5851
|
});
|
|
5870
5852
|
}
|
|
5871
5853
|
/**
|
|
5872
|
-
*
|
|
5873
|
-
*
|
|
5874
|
-
*
|
|
5875
|
-
*
|
|
5876
|
-
*
|
|
5877
|
-
*
|
|
5878
|
-
*
|
|
5879
|
-
*
|
|
5880
|
-
*
|
|
5881
|
-
*
|
|
5882
|
-
*
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
* page_size (int, optional): Number of items per page
|
|
5886
|
-
*
|
|
5887
|
-
* Methods:
|
|
5888
|
-
* GET: Retrieve a paginated list of program reviews with filtering
|
|
5889
|
-
*
|
|
5890
|
-
* Returns:
|
|
5891
|
-
* GET: A paginated JSON response containing program reviews:
|
|
5892
|
-
* {
|
|
5893
|
-
* "count": 15,
|
|
5894
|
-
* "next": "https://api.example.com/api/catalog/reviews/program/?page=2",
|
|
5895
|
-
* "previous": null,
|
|
5896
|
-
* "results": [
|
|
5897
|
-
* {
|
|
5898
|
-
* "user_id": 123,
|
|
5899
|
-
* "username": "student1",
|
|
5900
|
-
* "content": "This program was comprehensive and well-structured.",
|
|
5901
|
-
* "rating": 4.5,
|
|
5902
|
-
* "title": "Excellent Program",
|
|
5903
|
-
* "visible": true,
|
|
5904
|
-
* "created": "2023-01-15T10:30:00Z",
|
|
5905
|
-
* "modified": "2023-01-15T10:30:00Z",
|
|
5906
|
-
* "program_key": "program-v1:org+program123"
|
|
5907
|
-
* },
|
|
5908
|
-
* ...
|
|
5909
|
-
* ]
|
|
5910
|
-
* }
|
|
5911
|
-
*
|
|
5912
|
-
* Error Responses:
|
|
5913
|
-
* 400 Bad Request: If required parameters are missing or invalid
|
|
5914
|
-
* 401 Unauthorized: If the user is not authenticated
|
|
5915
|
-
* 403 Forbidden: If the user does not have permission to access this resource
|
|
5916
|
-
* 500 Internal Server Error: If an unexpected error occurs
|
|
5917
|
-
*
|
|
5918
|
-
* Access Control:
|
|
5919
|
-
* - Requires IsDMAdmin, IsPlatformAdminReadOnly, or IsPlatformAdminForProgram permission
|
|
5920
|
-
* - Platform admins can view reviews for programs in their platform (read-only)
|
|
5921
|
-
* - DM admins can view all reviews
|
|
5922
|
-
* @returns any No response body
|
|
5923
|
-
* @throws ApiError
|
|
5924
|
-
*/
|
|
5925
|
-
static catalogReviewsProgramRetrieve() {
|
|
5854
|
+
* Retrieve a paginated list of program reviews with filtering options
|
|
5855
|
+
* @param org Alias for platform_org
|
|
5856
|
+
* @param page Page number for pagination
|
|
5857
|
+
* @param pageSize Number of items per page
|
|
5858
|
+
* @param platformKey Filter reviews by platform key
|
|
5859
|
+
* @param platformOrg Filter reviews by platform organization
|
|
5860
|
+
* @param programId Filter reviews by program ID
|
|
5861
|
+
* @param sort Field to sort results by (default: '-id')
|
|
5862
|
+
* @param userId Filter reviews by user ID
|
|
5863
|
+
* @returns ProgramReviewPaginatedResponse
|
|
5864
|
+
* @throws ApiError
|
|
5865
|
+
*/
|
|
5866
|
+
static catalogReviewsProgramRetrieve(org, page, pageSize, platformKey, platformOrg, programId, sort = '-id', userId) {
|
|
5926
5867
|
return request(OpenAPI, {
|
|
5927
5868
|
method: 'GET',
|
|
5928
|
-
url: '/api/catalog/reviews/program/'
|
|
5869
|
+
url: '/api/catalog/reviews/program/',
|
|
5870
|
+
query: {
|
|
5871
|
+
'org': org,
|
|
5872
|
+
'page': page,
|
|
5873
|
+
'page_size': pageSize,
|
|
5874
|
+
'platform_key': platformKey,
|
|
5875
|
+
'platform_org': platformOrg,
|
|
5876
|
+
'program_id': programId,
|
|
5877
|
+
'sort': sort,
|
|
5878
|
+
'user_id': userId
|
|
5879
|
+
},
|
|
5880
|
+
errors: {
|
|
5881
|
+
400: `Invalid parameters`,
|
|
5882
|
+
401: `Unauthorized`,
|
|
5883
|
+
403: `Permission denied`,
|
|
5884
|
+
500: `Internal server error`
|
|
5885
|
+
}
|
|
5929
5886
|
});
|
|
5930
5887
|
}
|
|
5931
5888
|
/**
|
|
@@ -5948,117 +5905,48 @@ class CatalogService {
|
|
|
5948
5905
|
});
|
|
5949
5906
|
}
|
|
5950
5907
|
/**
|
|
5951
|
-
*
|
|
5952
|
-
*
|
|
5953
|
-
*
|
|
5954
|
-
*
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
* DELETE: Delete a program review
|
|
5958
|
-
*
|
|
5959
|
-
* Request Body (POST):
|
|
5960
|
-
* A JSON object containing:
|
|
5961
|
-
* - program_key (str, required): The program key to review (format: program-v1:org+program_id)
|
|
5962
|
-
* - username (str, required): The username of the reviewer
|
|
5963
|
-
* - rating (float, optional): The rating value (typically 1-5)
|
|
5964
|
-
* - title (str, optional): The review title
|
|
5965
|
-
* - content (str, optional): The review content/text
|
|
5966
|
-
* - visible (bool, optional): Whether the review is visible (default: true)
|
|
5967
|
-
*
|
|
5968
|
-
* Query Parameters (DELETE):
|
|
5969
|
-
* program_key (str, required): The program key of the review to delete
|
|
5970
|
-
* username (str, required): The username of the reviewer
|
|
5971
|
-
*
|
|
5972
|
-
* Returns:
|
|
5973
|
-
* POST: A JSON response containing the created/updated review:
|
|
5974
|
-
* {
|
|
5975
|
-
* "user_id": 123,
|
|
5976
|
-
* "username": "student1",
|
|
5977
|
-
* "content": "This program was comprehensive and well-structured.",
|
|
5978
|
-
* "rating": 4.5,
|
|
5979
|
-
* "title": "Excellent Program",
|
|
5980
|
-
* "visible": true,
|
|
5981
|
-
* "created": "2023-01-15T10:30:00Z",
|
|
5982
|
-
* "modified": "2023-01-15T10:30:00Z",
|
|
5983
|
-
* "program_key": "program-v1:org+program123"
|
|
5984
|
-
* }
|
|
5985
|
-
*
|
|
5986
|
-
* DELETE: A success response with status 200
|
|
5987
|
-
*
|
|
5988
|
-
* Error Responses:
|
|
5989
|
-
* 400 Bad Request: If required parameters are missing or invalid
|
|
5990
|
-
* 401 Unauthorized: If the user is not authenticated
|
|
5991
|
-
* 403 Forbidden: If the user does not have permission to manage this review
|
|
5992
|
-
* 500 Internal Server Error: If an unexpected error occurs during review operations
|
|
5993
|
-
*
|
|
5994
|
-
* Access Control:
|
|
5995
|
-
* - Requires IsDMAdmin or IsEdxUserReadWriteDelete permission
|
|
5996
|
-
* - Users can create, update, or delete their own reviews
|
|
5997
|
-
* - DM admins can manage all reviews
|
|
5998
|
-
* @returns any No response body
|
|
5999
|
-
* @throws ApiError
|
|
6000
|
-
*/
|
|
6001
|
-
static catalogReviewsProgramUpdateCreate() {
|
|
5908
|
+
* Create or update a program review
|
|
5909
|
+
* @param requestBody
|
|
5910
|
+
* @returns ProgramReview
|
|
5911
|
+
* @throws ApiError
|
|
5912
|
+
*/
|
|
5913
|
+
static catalogReviewsProgramUpdateCreate(requestBody) {
|
|
6002
5914
|
return request(OpenAPI, {
|
|
6003
5915
|
method: 'POST',
|
|
6004
|
-
url: '/api/catalog/reviews/program/update/'
|
|
5916
|
+
url: '/api/catalog/reviews/program/update/',
|
|
5917
|
+
body: requestBody,
|
|
5918
|
+
mediaType: 'application/json',
|
|
5919
|
+
errors: {
|
|
5920
|
+
400: `Invalid parameters`,
|
|
5921
|
+
401: `Unauthorized`,
|
|
5922
|
+
403: `Permission denied`,
|
|
5923
|
+
500: `Review could not be saved`
|
|
5924
|
+
}
|
|
6005
5925
|
});
|
|
6006
5926
|
}
|
|
6007
5927
|
/**
|
|
6008
|
-
*
|
|
6009
|
-
*
|
|
6010
|
-
*
|
|
6011
|
-
*
|
|
6012
|
-
*
|
|
6013
|
-
*
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
* Request Body (POST):
|
|
6017
|
-
* A JSON object containing:
|
|
6018
|
-
* - program_key (str, required): The program key to review (format: program-v1:org+program_id)
|
|
6019
|
-
* - username (str, required): The username of the reviewer
|
|
6020
|
-
* - rating (float, optional): The rating value (typically 1-5)
|
|
6021
|
-
* - title (str, optional): The review title
|
|
6022
|
-
* - content (str, optional): The review content/text
|
|
6023
|
-
* - visible (bool, optional): Whether the review is visible (default: true)
|
|
6024
|
-
*
|
|
6025
|
-
* Query Parameters (DELETE):
|
|
6026
|
-
* program_key (str, required): The program key of the review to delete
|
|
6027
|
-
* username (str, required): The username of the reviewer
|
|
6028
|
-
*
|
|
6029
|
-
* Returns:
|
|
6030
|
-
* POST: A JSON response containing the created/updated review:
|
|
6031
|
-
* {
|
|
6032
|
-
* "user_id": 123,
|
|
6033
|
-
* "username": "student1",
|
|
6034
|
-
* "content": "This program was comprehensive and well-structured.",
|
|
6035
|
-
* "rating": 4.5,
|
|
6036
|
-
* "title": "Excellent Program",
|
|
6037
|
-
* "visible": true,
|
|
6038
|
-
* "created": "2023-01-15T10:30:00Z",
|
|
6039
|
-
* "modified": "2023-01-15T10:30:00Z",
|
|
6040
|
-
* "program_key": "program-v1:org+program123"
|
|
6041
|
-
* }
|
|
6042
|
-
*
|
|
6043
|
-
* DELETE: A success response with status 200
|
|
6044
|
-
*
|
|
6045
|
-
* Error Responses:
|
|
6046
|
-
* 400 Bad Request: If required parameters are missing or invalid
|
|
6047
|
-
* 401 Unauthorized: If the user is not authenticated
|
|
6048
|
-
* 403 Forbidden: If the user does not have permission to manage this review
|
|
6049
|
-
* 500 Internal Server Error: If an unexpected error occurs during review operations
|
|
6050
|
-
*
|
|
6051
|
-
* Access Control:
|
|
6052
|
-
* - Requires IsDMAdmin or IsEdxUserReadWriteDelete permission
|
|
6053
|
-
* - Users can create, update, or delete their own reviews
|
|
6054
|
-
* - DM admins can manage all reviews
|
|
6055
|
-
* @returns void
|
|
6056
|
-
* @throws ApiError
|
|
6057
|
-
*/
|
|
6058
|
-
static catalogReviewsProgramUpdateDestroy() {
|
|
5928
|
+
* Delete a program review
|
|
5929
|
+
* @param programKey The program key of the review to delete
|
|
5930
|
+
* @param username The username of the reviewer
|
|
5931
|
+
* @param userId The user ID of the reviewer (alternative to username)
|
|
5932
|
+
* @returns any Review successfully deleted
|
|
5933
|
+
* @throws ApiError
|
|
5934
|
+
*/
|
|
5935
|
+
static catalogReviewsProgramUpdateDestroy(programKey, username, userId) {
|
|
6059
5936
|
return request(OpenAPI, {
|
|
6060
5937
|
method: 'DELETE',
|
|
6061
|
-
url: '/api/catalog/reviews/program/update/'
|
|
5938
|
+
url: '/api/catalog/reviews/program/update/',
|
|
5939
|
+
query: {
|
|
5940
|
+
'program_key': programKey,
|
|
5941
|
+
'user_id': userId,
|
|
5942
|
+
'username': username
|
|
5943
|
+
},
|
|
5944
|
+
errors: {
|
|
5945
|
+
400: `Invalid parameters`,
|
|
5946
|
+
401: `Unauthorized`,
|
|
5947
|
+
403: `Permission denied`,
|
|
5948
|
+
500: `Review could not be deleted`
|
|
5949
|
+
}
|
|
6062
5950
|
});
|
|
6063
5951
|
}
|
|
6064
5952
|
/**
|
|
@@ -6273,7 +6161,7 @@ class CatalogService {
|
|
|
6273
6161
|
* @param platformKey Platform key
|
|
6274
6162
|
* @param slug Skill slug
|
|
6275
6163
|
* @param sort Field to sort results by
|
|
6276
|
-
* @returns
|
|
6164
|
+
* @returns PaginatedSkill
|
|
6277
6165
|
* @throws ApiError
|
|
6278
6166
|
*/
|
|
6279
6167
|
static catalogSkillsRetrieve(id, name, nameIexact, page, pageSize, platformKey, slug, sort = 'id') {
|
|
@@ -6294,6 +6182,7 @@ class CatalogService {
|
|
|
6294
6182
|
}
|
|
6295
6183
|
/**
|
|
6296
6184
|
* Add or update a skill.
|
|
6185
|
+
* @param requestBody
|
|
6297
6186
|
* @param id Skill ID
|
|
6298
6187
|
* @param name Skill name
|
|
6299
6188
|
* @param nameIexact Exact match for skill name (case insensitive)
|
|
@@ -6302,11 +6191,10 @@ class CatalogService {
|
|
|
6302
6191
|
* @param platformKey Platform key
|
|
6303
6192
|
* @param slug Skill slug
|
|
6304
6193
|
* @param sort Field to sort results by
|
|
6305
|
-
* @
|
|
6306
|
-
* @returns Skill
|
|
6194
|
+
* @returns PaginatedSkill
|
|
6307
6195
|
* @throws ApiError
|
|
6308
6196
|
*/
|
|
6309
|
-
static catalogSkillsCreate(id, name, nameIexact, page, pageSize, platformKey, slug, sort = 'id'
|
|
6197
|
+
static catalogSkillsCreate(requestBody, id, name, nameIexact, page, pageSize, platformKey, slug, sort = 'id') {
|
|
6310
6198
|
return request(OpenAPI, {
|
|
6311
6199
|
method: 'POST',
|
|
6312
6200
|
url: '/api/catalog/skills/',
|