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