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