@iblai/iblai-api 4.6.2-dev1-ai-plus → 4.6.2-dev2-ai

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 (105) hide show
  1. package/dist/index.cjs.js +696 -1667
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +696 -1666
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +696 -1667
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +8 -39
  8. package/dist/types/models/BaseFinanceResponse.d.ts +37 -0
  9. package/dist/types/models/ComparisonInfo.d.ts +29 -0
  10. package/dist/types/models/FinanceDetailsResponse.d.ts +13 -0
  11. package/dist/types/models/FinanceFilters.d.ts +15 -0
  12. package/dist/types/models/MetricInfo.d.ts +5 -0
  13. package/dist/types/models/OvertimeData.d.ts +13 -0
  14. package/dist/types/models/PeriodInfo.d.ts +21 -0
  15. package/dist/types/services/AiAnalyticsService.d.ts +230 -0
  16. package/dist/types/services/AnalyticsService.d.ts +233 -0
  17. package/package.json +1 -1
  18. package/src/core/OpenAPI.ts +1 -1
  19. package/src/index.ts +8 -39
  20. package/src/models/BaseFinanceResponse.ts +42 -0
  21. package/src/models/ComparisonInfo.ts +34 -0
  22. package/src/models/FinanceDetailsResponse.ts +18 -0
  23. package/src/models/FinanceFilters.ts +20 -0
  24. package/src/models/{WebexWebhook.ts → MetricInfo.ts} +4 -3
  25. package/src/models/OvertimeData.ts +18 -0
  26. package/src/models/PeriodInfo.ts +26 -0
  27. package/src/services/AiAnalyticsService.ts +5305 -5000
  28. package/src/services/AnalyticsService.ts +314 -0
  29. package/dist/types/models/Bot.d.ts +0 -15
  30. package/dist/types/models/BotCommand.d.ts +0 -6
  31. package/dist/types/models/BotCreate.d.ts +0 -12
  32. package/dist/types/models/DataSet.d.ts +0 -21
  33. package/dist/types/models/DataSetCreate.d.ts +0 -12
  34. package/dist/types/models/DataSetStatusEnum.d.ts +0 -12
  35. package/dist/types/models/DiscordConfig.d.ts +0 -7
  36. package/dist/types/models/DiscordUserConfig.d.ts +0 -10
  37. package/dist/types/models/DiscordWebhook.d.ts +0 -6
  38. package/dist/types/models/PaginatedDataSetList.d.ts +0 -7
  39. package/dist/types/models/PaginatedTrainingList.d.ts +0 -7
  40. package/dist/types/models/PatchedBotCommand.d.ts +0 -6
  41. package/dist/types/models/PatchedBotCreate.d.ts +0 -12
  42. package/dist/types/models/PatchedDataSet.d.ts +0 -21
  43. package/dist/types/models/PatchedDiscordConfig.d.ts +0 -7
  44. package/dist/types/models/PatchedDiscordUserConfig.d.ts +0 -10
  45. package/dist/types/models/PatchedSlackConfig.d.ts +0 -8
  46. package/dist/types/models/PatchedSlackUserConfig.d.ts +0 -17
  47. package/dist/types/models/PatchedTeamsConfig.d.ts +0 -7
  48. package/dist/types/models/PatchedTrainingCreate.d.ts +0 -31
  49. package/dist/types/models/PatchedWebexConfig.d.ts +0 -10
  50. package/dist/types/models/PatchedWhatsappConfig.d.ts +0 -11
  51. package/dist/types/models/PatchedWhatsappUserConfig.d.ts +0 -10
  52. package/dist/types/models/Provider05cEnum.d.ts +0 -14
  53. package/dist/types/models/Provider63aEnum.d.ts +0 -6
  54. package/dist/types/models/SlackConfig.d.ts +0 -8
  55. package/dist/types/models/SlackUserConfig.d.ts +0 -17
  56. package/dist/types/models/SlackWebhook.d.ts +0 -6
  57. package/dist/types/models/TeamsConfig.d.ts +0 -7
  58. package/dist/types/models/TeamsWebhook.d.ts +0 -17
  59. package/dist/types/models/Training.d.ts +0 -41
  60. package/dist/types/models/TrainingCreate.d.ts +0 -31
  61. package/dist/types/models/WebexConfig.d.ts +0 -10
  62. package/dist/types/models/WebexWebhook.d.ts +0 -4
  63. package/dist/types/models/WhatAppWebHook.d.ts +0 -3
  64. package/dist/types/models/WhatsappConfig.d.ts +0 -11
  65. package/dist/types/models/WhatsappUserConfig.d.ts +0 -10
  66. package/dist/types/services/AiBotService.d.ts +0 -642
  67. package/dist/types/services/AiFinetuningService.d.ts +0 -232
  68. package/src/models/Bot.ts +0 -20
  69. package/src/models/BotCommand.ts +0 -11
  70. package/src/models/BotCreate.ts +0 -17
  71. package/src/models/DataSet.ts +0 -26
  72. package/src/models/DataSetCreate.ts +0 -17
  73. package/src/models/DataSetStatusEnum.ts +0 -16
  74. package/src/models/DiscordConfig.ts +0 -12
  75. package/src/models/DiscordUserConfig.ts +0 -15
  76. package/src/models/DiscordWebhook.ts +0 -11
  77. package/src/models/PaginatedDataSetList.ts +0 -12
  78. package/src/models/PaginatedTrainingList.ts +0 -12
  79. package/src/models/PatchedBotCommand.ts +0 -11
  80. package/src/models/PatchedBotCreate.ts +0 -17
  81. package/src/models/PatchedDataSet.ts +0 -26
  82. package/src/models/PatchedDiscordConfig.ts +0 -12
  83. package/src/models/PatchedDiscordUserConfig.ts +0 -15
  84. package/src/models/PatchedSlackConfig.ts +0 -13
  85. package/src/models/PatchedSlackUserConfig.ts +0 -22
  86. package/src/models/PatchedTeamsConfig.ts +0 -12
  87. package/src/models/PatchedTrainingCreate.ts +0 -36
  88. package/src/models/PatchedWebexConfig.ts +0 -15
  89. package/src/models/PatchedWhatsappConfig.ts +0 -16
  90. package/src/models/PatchedWhatsappUserConfig.ts +0 -15
  91. package/src/models/Provider05cEnum.ts +0 -18
  92. package/src/models/Provider63aEnum.ts +0 -10
  93. package/src/models/SlackConfig.ts +0 -13
  94. package/src/models/SlackUserConfig.ts +0 -22
  95. package/src/models/SlackWebhook.ts +0 -11
  96. package/src/models/TeamsConfig.ts +0 -12
  97. package/src/models/TeamsWebhook.ts +0 -22
  98. package/src/models/Training.ts +0 -46
  99. package/src/models/TrainingCreate.ts +0 -36
  100. package/src/models/WebexConfig.ts +0 -15
  101. package/src/models/WhatAppWebHook.ts +0 -8
  102. package/src/models/WhatsappConfig.ts +0 -16
  103. package/src/models/WhatsappUserConfig.ts +0 -15
  104. package/src/services/AiBotService.ts +0 -1330
  105. package/src/services/AiFinetuningService.ts +0 -472
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: '4.6.2-ai-plus',
113
+ VERSION: '4.6.2-dev-ai',
114
114
  WITH_CREDENTIALS: false,
115
115
  CREDENTIALS: 'include',
116
116
  TOKEN: undefined,
@@ -271,24 +271,6 @@ exports.CrawlerPatternTypeEnum = void 0;
271
271
  CrawlerPatternTypeEnum["REGEX"] = "regex";
272
272
  })(exports.CrawlerPatternTypeEnum || (exports.CrawlerPatternTypeEnum = {}));
273
273
 
274
- /* generated using openapi-typescript-codegen -- do not edit */
275
- /* istanbul ignore file */
276
- /* tslint:disable */
277
- /* eslint-disable */
278
- /**
279
- * * `pending` - Pending
280
- * * `processing` - Processing
281
- * * `completed` - Completed
282
- * * `failed` - Failed
283
- */
284
- exports.DataSetStatusEnum = void 0;
285
- (function (DataSetStatusEnum) {
286
- DataSetStatusEnum["PENDING"] = "pending";
287
- DataSetStatusEnum["PROCESSING"] = "processing";
288
- DataSetStatusEnum["COMPLETED"] = "completed";
289
- DataSetStatusEnum["FAILED"] = "failed";
290
- })(exports.DataSetStatusEnum || (exports.DataSetStatusEnum = {}));
291
-
292
274
  /* generated using openapi-typescript-codegen -- do not edit */
293
275
  /* istanbul ignore file */
294
276
  /* tslint:disable */
@@ -585,26 +567,6 @@ exports.PromptVisibilityEnum = void 0;
585
567
  PromptVisibilityEnum["VIEWABLE_BY_ANYONE"] = "viewable_by_anyone";
586
568
  })(exports.PromptVisibilityEnum || (exports.PromptVisibilityEnum = {}));
587
569
 
588
- /* generated using openapi-typescript-codegen -- do not edit */
589
- /* istanbul ignore file */
590
- /* tslint:disable */
591
- /* eslint-disable */
592
- /**
593
- * * `webex` - Webex
594
- * * `slack` - Slack
595
- * * `whatsapp` - Whatsapp
596
- * * `discord` - Discord
597
- * * `teams` - Teams
598
- */
599
- exports.Provider05cEnum = void 0;
600
- (function (Provider05cEnum) {
601
- Provider05cEnum["WEBEX"] = "webex";
602
- Provider05cEnum["SLACK"] = "slack";
603
- Provider05cEnum["WHATSAPP"] = "whatsapp";
604
- Provider05cEnum["DISCORD"] = "discord";
605
- Provider05cEnum["TEAMS"] = "teams";
606
- })(exports.Provider05cEnum || (exports.Provider05cEnum = {}));
607
-
608
570
  /* generated using openapi-typescript-codegen -- do not edit */
609
571
  /* istanbul ignore file */
610
572
  /* tslint:disable */
@@ -621,18 +583,6 @@ exports.Provider637Enum = void 0;
621
583
  Provider637Enum["ELEVENLABS"] = "elevenlabs";
622
584
  })(exports.Provider637Enum || (exports.Provider637Enum = {}));
623
585
 
624
- /* generated using openapi-typescript-codegen -- do not edit */
625
- /* istanbul ignore file */
626
- /* tslint:disable */
627
- /* eslint-disable */
628
- /**
629
- * * `openai` - Openai
630
- */
631
- exports.Provider63aEnum = void 0;
632
- (function (Provider63aEnum) {
633
- Provider63aEnum["OPENAI"] = "openai";
634
- })(exports.Provider63aEnum || (exports.Provider63aEnum = {}));
635
-
636
586
  /* generated using openapi-typescript-codegen -- do not edit */
637
587
  /* istanbul ignore file */
638
588
  /* tslint:disable */
@@ -6112,6 +6062,215 @@ class AiAnalyticsService {
6112
6062
  }
6113
6063
  });
6114
6064
  }
6065
+ /**
6066
+ * Financial Analytics API - Get comprehensive cost metrics with comparison analysis.
6067
+ *
6068
+ * This endpoint provides period-based cost analysis (not cumulative) with support for:
6069
+ * - Multiple time granularities and metrics
6070
+ * - Cross-dimensional filtering
6071
+ * - Percentage change vs comparison periods
6072
+ * - Forward-filled time series
6073
+ *
6074
+ * **Examples:**
6075
+ *
6076
+ * **Basic Weekly Costs:**
6077
+ * ```
6078
+ * GET /api/v2/analytics/financial/?metric=weekly_costs&comparison_days=10
6079
+ * ```
6080
+ *
6081
+ * **Platform & Mentor Filtered:**
6082
+ * ```
6083
+ * # Get total costs for a specific platform and mentor
6084
+ * GET /api/v2/analytics/financial/?metric=total_costs&platform_key=web-app&mentor_unique_id=mentor-123&comparison_days=14
6085
+ * ```
6086
+ *
6087
+ * **Monthly Costs by Provider:**
6088
+ * ```
6089
+ * GET /api/v2/analytics/financial/?metric=monthly_costs&provider=openai&granularity=month&comparison_days=30
6090
+ * ```
6091
+ *
6092
+ * **Daily Costs for Specific User:**
6093
+ * ```
6094
+ * GET /api/v2/analytics/financial/?metric=total_costs&username=user-456&granularity=day&start_date=2025-01-15&end_date=2025-01-21&comparison_days=7
6095
+ * ```
6096
+ *
6097
+ *
6098
+ * **Response Structure:**
6099
+ * ```json
6100
+ * {
6101
+ * "metric": "weekly_costs",
6102
+ * "value": 12.47,
6103
+ * "percentage_change": 8.5,
6104
+ * "overtime": [
6105
+ * {"date": "2025-01-06", "value": 2.89},
6106
+ * {"date": "2025-01-13", "value": 3.12}
6107
+ * ],
6108
+ * "period_info": {
6109
+ * "start_date": "2025-01-01",
6110
+ * "end_date": "2025-01-31",
6111
+ * "period_days": 31
6112
+ * },
6113
+ * "comparison_info": {
6114
+ * "previous_period_value": 11.50,
6115
+ * ...
6116
+ * }
6117
+ * }
6118
+ * ```
6119
+ * @returns BaseFinanceResponse Successful financial metrics response with period-based cost data
6120
+ * @throws ApiError
6121
+ */
6122
+ static analyticsFinancialRetrieve({
6123
+ metric,
6124
+ allTime = false,
6125
+ comparisonDays,
6126
+ endDate,
6127
+ fillMethod = 'zero',
6128
+ granularity = 'day',
6129
+ llmModel,
6130
+ mentorUniqueId,
6131
+ platformKey,
6132
+ provider,
6133
+ showOvertime = true,
6134
+ startDate,
6135
+ username
6136
+ }) {
6137
+ return request(OpenAPI, {
6138
+ method: 'GET',
6139
+ url: '/api/analytics/financial/',
6140
+ query: {
6141
+ 'all_time': allTime,
6142
+ 'comparison_days': comparisonDays,
6143
+ 'end_date': endDate,
6144
+ 'fill_method': fillMethod,
6145
+ 'granularity': granularity,
6146
+ 'llm_model': llmModel,
6147
+ 'mentor_unique_id': mentorUniqueId,
6148
+ 'metric': metric,
6149
+ 'platform_key': platformKey,
6150
+ 'provider': provider,
6151
+ 'show_overtime': showOvertime,
6152
+ 'start_date': startDate,
6153
+ 'username': username
6154
+ },
6155
+ errors: {
6156
+ 400: `Bad Request - Invalid query parameters`,
6157
+ 403: `Forbidden - Insufficient permissions`,
6158
+ 500: `Internal Server Error`
6159
+ }
6160
+ });
6161
+ }
6162
+ /**
6163
+ * Financial Details Analytics API – paginated cost tables with flexible grouping.
6164
+ *
6165
+ * This endpoint returns tabular cost metrics aggregated by the dimension
6166
+ * specified via the `group_by` query parameter. One or more KPI columns
6167
+ * can be requested through the comma-separated `metrics` list while
6168
+ * typical filters (date range, provider, platform_key, user, etc.) narrow the
6169
+ * dataset. Results are paginated with `page` / `limit`.
6170
+ *
6171
+ * **Required query parameters**
6172
+ * - group_by – provider | llm_model | username | user_id | date | session_id
6173
+ * - metrics – csv list of KPI names, e.g. total_cost, sessions, cost_per_session
6174
+ *
6175
+ * **Shared optional filters**
6176
+ * - start_date, end_date – ISO yyyy-mm-dd (ignored when all_time=true)
6177
+ * - platform_key – tenant isolation
6178
+ * - mentor_unique_id – filter to one mentor
6179
+ * - username / user_id – filter to a learner
6180
+ * - provider / llm_model – filter to LLM provider / model
6181
+ * - all_time – true → lifetime totals
6182
+ * - page (default 1), limit (default 50)
6183
+ *
6184
+ * **Examples**
6185
+ * --------
6186
+ * 1. Cost by provider for the last week
6187
+ * ```
6188
+ * GET /api/v2/analytics/financial/details?
6189
+ * group_by=provider&
6190
+ * metrics=total_cost&
6191
+ * start_date=2025-01-01&
6192
+ * end_date=2025-01-07&
6193
+ * page=1&limit=10
6194
+ * ```
6195
+ *
6196
+ * 2. Lifetime cost per user with extra KPIs
6197
+ * ```
6198
+ * GET /api/v2/analytics/financial/details?
6199
+ * group_by=username&
6200
+ * metrics=total_cost,sessions,cost_per_session&
6201
+ * all_time=true&page=1&limit=50
6202
+ * ```
6203
+ * 3. Cost by LLM model with tenant filter
6204
+ * ```
6205
+ * GET /api/v2/analytics/financial/details?
6206
+ * group_by=llm_model&
6207
+ * metrics=total_cost&
6208
+ * platform_key=web-app&
6209
+ * start_date=2025-01-01&end_date=2025-01-31
6210
+ * ```
6211
+ * Response structure
6212
+ * -------------------
6213
+ * ```
6214
+ * {
6215
+ * "page": 1,
6216
+ * "limit": 10,
6217
+ * "total_pages": 1,
6218
+ * "total_records": 3,
6219
+ * "rows": [
6220
+ * {"provider": "openai", "total_cost": 2.5},
6221
+ * {"provider": "anthropic", "total_cost": 1.0},
6222
+ * {"provider": "azure", "total_cost": 0.5}
6223
+ * ],
6224
+ * "metrics": [
6225
+ * {
6226
+ * "name": "total_cost",
6227
+ * "unit": "$",
6228
+ * "description": "Cost for this entity in period"
6229
+ * }
6230
+ * ],
6231
+ * "total_cost": 4.0 // optional grand-total when available
6232
+ * }
6233
+ * ``
6234
+ * @returns FinanceDetailsResponse
6235
+ * @throws ApiError
6236
+ */
6237
+ static analyticsFinancialDetailsRetrieve({
6238
+ groupBy,
6239
+ allTime = false,
6240
+ endDate,
6241
+ limit = 50,
6242
+ llmModel,
6243
+ mentorUniqueId,
6244
+ metrics = 'total_cost',
6245
+ page = 1,
6246
+ platformKey,
6247
+ provider,
6248
+ startDate,
6249
+ username
6250
+ }) {
6251
+ return request(OpenAPI, {
6252
+ method: 'GET',
6253
+ url: '/api/analytics/financial/details/',
6254
+ query: {
6255
+ 'all_time': allTime,
6256
+ 'end_date': endDate,
6257
+ 'group_by': groupBy,
6258
+ 'limit': limit,
6259
+ 'llm_model': llmModel,
6260
+ 'mentor_unique_id': mentorUniqueId,
6261
+ 'metrics': metrics,
6262
+ 'page': page,
6263
+ 'platform_key': platformKey,
6264
+ 'provider': provider,
6265
+ 'start_date': startDate,
6266
+ 'username': username
6267
+ },
6268
+ errors: {
6269
+ 400: `Bad Request – invalid query params`,
6270
+ 500: `Internal Server Error`
6271
+ }
6272
+ });
6273
+ }
6115
6274
  /**
6116
6275
  * Update time spent tracking data from client-side events.
6117
6276
  *
@@ -8916,1767 +9075,426 @@ class AiAnalyticsService {
8916
9075
  'org': org,
8917
9076
  'user_id': userId
8918
9077
  },
8919
- query: {
8920
- 'department_id': departmentId,
8921
- 'format': format,
8922
- 'include_main_platform': includeMainPlatform
8923
- }
8924
- });
8925
- }
8926
- /**
8927
- * Average days used to complete a course
8928
- *
8929
- * Query Params
8930
- * 1. course_id <optional> e.g course-v1:Org+Course4+Run
8931
- * @returns any No response body
8932
- * @throws ApiError
8933
- */
8934
- static platformOrgsCoursesUsersProgressDaysToCompleteRetrieve({
8935
- courseId,
8936
- org,
8937
- userId
8938
- }) {
8939
- return request(OpenAPI, {
8940
- method: 'GET',
8941
- url: '/api/platform/orgs/{org}/courses/{course_id}/users/{user_id}/progress/days-to-complete',
8942
- path: {
8943
- 'course_id': courseId,
8944
- 'org': org,
8945
- 'user_id': userId
8946
- }
8947
- });
8948
- }
8949
- /**
8950
- * Time spent count in seconds within a course by a learner
8951
- * @returns Count
8952
- * @throws ApiError
8953
- */
8954
- static platformOrgsCoursesUsersTimeCountRetrieve({
8955
- courseId,
8956
- org,
8957
- userId,
8958
- departmentId,
8959
- endDate,
8960
- format = 'json',
8961
- includeMainPlatform = true,
8962
- startDate
8963
- }) {
8964
- return request(OpenAPI, {
8965
- method: 'GET',
8966
- url: '/api/platform/orgs/{org}/courses/{course_id}/users/{user_id}/time/count',
8967
- path: {
8968
- 'course_id': courseId,
8969
- 'org': org,
8970
- 'user_id': userId
8971
- },
8972
- query: {
8973
- 'department_id': departmentId,
8974
- 'end_date': endDate,
8975
- 'format': format,
8976
- 'include_main_platform': includeMainPlatform,
8977
- 'start_date': startDate
8978
- }
8979
- });
8980
- }
8981
- /**
8982
- * (Total videos watched / Total Course Videos) or Total Videos watched in a course by a learner
8983
- * @returns VideosCount
8984
- * @throws ApiError
8985
- */
8986
- static platformOrgsCoursesUsersVideosCountRetrieve({
8987
- courseId,
8988
- org,
8989
- userId,
8990
- departmentId,
8991
- format = 'json',
8992
- includeMainPlatform = true
8993
- }) {
8994
- return request(OpenAPI, {
8995
- method: 'GET',
8996
- url: '/api/platform/orgs/{org}/courses/{course_id}/users/{user_id}/videos/count',
8997
- path: {
8998
- 'course_id': courseId,
8999
- 'org': org,
9000
- 'user_id': userId
9001
- },
9002
- query: {
9003
- 'department_id': departmentId,
9004
- 'format': format,
9005
- 'include_main_platform': includeMainPlatform
9006
- }
9007
- });
9008
- }
9009
- /**
9010
- * Count of total videos in a course
9011
- *
9012
- * Query Params
9013
- * course_id e.g course-v1:Org+Course4+Run
9014
- * @returns any No response body
9015
- * @throws ApiError
9016
- */
9017
- static platformOrgsCoursesVideosRetrieve2({
9018
- courseId,
9019
- org
9020
- }) {
9021
- return request(OpenAPI, {
9022
- method: 'GET',
9023
- url: '/api/platform/orgs/{org}/courses/{course_id}/videos/',
9024
- path: {
9025
- 'course_id': courseId,
9026
- 'org': org
9027
- }
9028
- });
9029
- }
9030
- /**
9031
- * Get total count of courses on the platform.
9032
- *
9033
- * This endpoint returns the total number of courses available on the platform.
9034
- *
9035
- * Returns:
9036
- * The total count of courses on the platform.
9037
- * @returns Count
9038
- * @throws ApiError
9039
- */
9040
- static platformOrgsCoursesCountRetrieve({
9041
- org,
9042
- departmentId,
9043
- format = 'json',
9044
- includeMainPlatform = true
9045
- }) {
9046
- return request(OpenAPI, {
9047
- method: 'GET',
9048
- url: '/api/platform/orgs/{org}/courses/count',
9049
- path: {
9050
- 'org': org
9051
- },
9052
- query: {
9053
- 'department_id': departmentId,
9054
- 'format': format,
9055
- 'include_main_platform': includeMainPlatform
9056
- }
9057
- });
9058
- }
9059
- /**
9060
- * List grading information on a per-course basis.
9061
- *
9062
- * This endpoint provides grading statistics for all courses, including
9063
- * average grades and completion rates.
9064
- *
9065
- * Returns:
9066
- * A list of courses with their associated grading metrics.
9067
- * @returns any No response body
9068
- * @throws ApiError
9069
- */
9070
- static platformOrgsCoursesGradesRetrieve({
9071
- org
9072
- }) {
9073
- return request(OpenAPI, {
9074
- method: 'GET',
9075
- url: '/api/platform/orgs/{org}/courses/grades',
9076
- path: {
9077
- 'org': org
9078
- }
9079
- });
9080
- }
9081
- /**
9082
- * Get video watch statistics on a per-course basis.
9083
- *
9084
- * This endpoint provides a list of courses with aggregated video watch metrics,
9085
- * including total views and completion percentages.
9086
- *
9087
- * Returns:
9088
- * A list of courses with:
9089
- * - Course identification (ID and name)
9090
- * - Video watch count
9091
- * - Percentage of total videos watched
9092
- * @returns WatchedVideosPerCourse
9093
- * @throws ApiError
9094
- */
9095
- static platformOrgsCoursesVideosRetrieve({
9096
- org,
9097
- departmentId,
9098
- format = 'json',
9099
- includeMainPlatform = true
9100
- }) {
9101
- return request(OpenAPI, {
9102
- method: 'GET',
9103
- url: '/api/platform/orgs/{org}/courses/videos',
9104
- path: {
9105
- 'org': org
9106
- },
9107
- query: {
9108
- 'department_id': departmentId,
9109
- 'format': format,
9110
- 'include_main_platform': includeMainPlatform
9111
- }
9112
- });
9113
- }
9114
- /**
9115
- * Get completion count statistics.
9116
- *
9117
- * This endpoint returns completion counts at different levels:
9118
- * - Platform level: Total users who have completed at least one course
9119
- * - Course level: Total completions for a specific course
9120
- * - Learner level: Total courses completed by a specific learner
9121
- *
9122
- * Query Parameters:
9123
- * course_id (str, optional): Filter by course ID
9124
- * user_id (str, optional): Filter by username or email
9125
- *
9126
- * Returns:
9127
- * A count of completions based on the specified filters.
9128
- * @returns any No response body
9129
- * @throws ApiError
9130
- */
9131
- static platformOrgsProgressCompletedRetrieve({
9132
- org
9133
- }) {
9134
- return request(OpenAPI, {
9135
- method: 'GET',
9136
- url: '/api/platform/orgs/{org}/progress/completed',
9137
- path: {
9138
- 'org': org
9139
- }
9140
- });
9141
- }
9142
- /**
9143
- * Average of total completed units
9144
- * @returns any No response body
9145
- * @throws ApiError
9146
- */
9147
- static platformOrgsProgressCompletionRateRetrieve({
9148
- org
9149
- }) {
9150
- return request(OpenAPI, {
9151
- method: 'GET',
9152
- url: '/api/platform/orgs/{org}/progress/completion-rate',
9153
- path: {
9154
- 'org': org
9155
- }
9156
- });
9157
- }
9158
- /**
9159
- * In Progress means any unit completion in the past 30 days
9160
- *
9161
- * For platform : Total users who have atleast a course in_progress on the platform
9162
- * For course : Total users
9163
- * For learner : Total courses in progress
9164
- *
9165
- * Query Params
9166
- * 1. course_id <optional> e.g course-v1:Org+Course4+Run
9167
- * 2. user_id <optional> e.g developer@ibleducation.com or dev123 (username|email)
9168
- * @returns any No response body
9169
- * @throws ApiError
9170
- */
9171
- static platformOrgsProgressInProgressRetrieve({
9172
- org
9173
- }) {
9174
- return request(OpenAPI, {
9175
- method: 'GET',
9176
- url: '/api/platform/orgs/{org}/progress/in-progress',
9177
- path: {
9178
- 'org': org
9179
- }
9180
- });
9181
- }
9182
- /**
9183
- * Started means an enrollment
9184
- *
9185
- * For platform : Total users who have atleast an enrollment
9186
- * For course : Total users enrolled
9187
- * For learner : Total courses in progress
9188
- *
9189
- * Query Params
9190
- * 1. course_id <optional> e.g course-v1:Org+Course4+Run
9191
- * 2. user_id <optional> e.g developer@ibleducation.com or dev123 (username|email)
9192
- * @returns any No response body
9193
- * @throws ApiError
9194
- */
9195
- static platformOrgsProgressStartedRetrieve({
9196
- org
9197
- }) {
9198
- return request(OpenAPI, {
9199
- method: 'GET',
9200
- url: '/api/platform/orgs/{org}/progress/started',
9201
- path: {
9202
- 'org': org
9203
- }
9204
- });
9205
- }
9206
- /**
9207
- * Total time spent count on the platform within specified range or all time
9208
- *
9209
- * Query Params
9210
- * 1. start_date e.g 2020-10-01
9211
- * 2. end_date e.g 2020-10-10
9212
- *
9213
- * Default result is all time
9214
- * @returns any No response body
9215
- * @throws ApiError
9216
- */
9217
- static platformOrgsTimeCountRetrieve({
9218
- org
9219
- }) {
9220
- return request(OpenAPI, {
9221
- method: 'GET',
9222
- url: '/api/platform/orgs/{org}/time/count',
9223
- path: {
9224
- 'org': org
9225
- }
9226
- });
9227
- }
9228
- /**
9229
- * Get count of active users on the platform.
9230
- *
9231
- * This endpoint returns the number of users who have had activity on the platform,
9232
- * either for all time or within a specified date range.
9233
- *
9234
- * Query Parameters:
9235
- * start_date (str, optional): Start date for filtering (ISO format)
9236
- * end_date (str, optional): End date for filtering (ISO format)
9237
- *
9238
- * Returns:
9239
- * The count of active users and change metrics compared to previous periods.
9240
- *
9241
- * Default behavior returns the count for all time if no date range is specified.
9242
- * @returns OverTimeWithTotal
9243
- * @throws ApiError
9244
- */
9245
- static platformOrgsUsersActiveCountRetrieve({
9246
- org,
9247
- departmentId,
9248
- endDate,
9249
- format = 'json',
9250
- includeMainPlatform = true,
9251
- startDate
9252
- }) {
9253
- return request(OpenAPI, {
9254
- method: 'GET',
9255
- url: '/api/platform/orgs/{org}/users/active/count',
9256
- path: {
9257
- 'org': org
9258
- },
9259
- query: {
9260
- 'department_id': departmentId,
9261
- 'end_date': endDate,
9262
- 'format': format,
9263
- 'include_main_platform': includeMainPlatform,
9264
- 'start_date': startDate
9265
- }
9266
- });
9267
- }
9268
- /**
9269
- * Get count of registered users on the platform.
9270
- *
9271
- * This endpoint returns the number of users registered on the platform,
9272
- * either for all time or within a specified date range.
9273
- *
9274
- * Query Parameters:
9275
- * start_date (str, optional): Start date for filtering (ISO format)
9276
- * end_date (str, optional): End date for filtering (ISO format)
9277
- *
9278
- * Returns:
9279
- * The count of registered users and change metrics compared to previous periods.
9280
- *
9281
- * Default behavior returns the count for all time if no date range is specified.
9282
- * @returns OverTimeWithTotal
9283
- * @throws ApiError
9284
- */
9285
- static platformOrgsUsersCountRetrieve({
9286
- org,
9287
- departmentId,
9288
- endDate,
9289
- format = 'json',
9290
- includeMainPlatform = true,
9291
- startDate
9292
- }) {
9293
- return request(OpenAPI, {
9294
- method: 'GET',
9295
- url: '/api/platform/orgs/{org}/users/count',
9296
- path: {
9297
- 'org': org
9298
- },
9299
- query: {
9300
- 'department_id': departmentId,
9301
- 'end_date': endDate,
9302
- 'format': format,
9303
- 'include_main_platform': includeMainPlatform,
9304
- 'start_date': startDate
9305
- }
9306
- });
9307
- }
9308
- /**
9309
- * Count of users who have completed a course on the platform within specified range or all time
9310
- *
9311
- * Query Params
9312
- * 1. start_date e.g 2020-10-01
9313
- * 2. end_date e.g 2020-10-10
9314
- *
9315
- * Default is all time
9316
- * @returns OverTimeWithTotal
9317
- * @throws ApiError
9318
- */
9319
- static platformOrgsUsersCoursesCompletedCountRetrieve({
9320
- org,
9321
- departmentId,
9322
- endDate,
9323
- format = 'json',
9324
- includeMainPlatform = true,
9325
- startDate
9326
- }) {
9327
- return request(OpenAPI, {
9328
- method: 'GET',
9329
- url: '/api/platform/orgs/{org}/users/courses-completed/count',
9330
- path: {
9331
- 'org': org
9332
- },
9333
- query: {
9334
- 'department_id': departmentId,
9335
- 'end_date': endDate,
9336
- 'format': format,
9337
- 'include_main_platform': includeMainPlatform,
9338
- 'start_date': startDate
9339
- }
9340
- });
9341
- }
9342
- }
9343
-
9344
- class AiBotService {
9345
- /**
9346
- * Create modify and update bot information for a specific tenant.
9347
- * @returns Bot
9348
- * @throws ApiError
9349
- */
9350
- static aiBotV1BotsBotList({
9351
- org
9352
- }) {
9353
- return request(OpenAPI, {
9354
- method: 'GET',
9355
- url: '/api/ai-bot/v1/bots/{org}/bot/',
9356
- path: {
9357
- 'org': org
9358
- }
9359
- });
9360
- }
9361
- /**
9362
- * Create modify and update bot information for a specific tenant.
9363
- * @returns BotCreate
9364
- * @throws ApiError
9365
- */
9366
- static aiBotV1BotsBotCreate({
9367
- org,
9368
- requestBody
9369
- }) {
9370
- return request(OpenAPI, {
9371
- method: 'POST',
9372
- url: '/api/ai-bot/v1/bots/{org}/bot/',
9373
- path: {
9374
- 'org': org
9375
- },
9376
- body: requestBody,
9377
- mediaType: 'application/json'
9378
- });
9379
- }
9380
- /**
9381
- * Create slash commands for a specific bot
9382
- * eg. /iblai-baseline
9383
- * @returns BotCommand
9384
- * @throws ApiError
9385
- */
9386
- static aiBotV1BotsBotCommandsList({
9387
- org
9388
- }) {
9389
- return request(OpenAPI, {
9390
- method: 'GET',
9391
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/',
9392
- path: {
9393
- 'org': org
9394
- }
9395
- });
9396
- }
9397
- /**
9398
- * Create slash commands for a specific bot
9399
- * eg. /iblai-baseline
9400
- * @returns BotCommand
9401
- * @throws ApiError
9402
- */
9403
- static aiBotV1BotsBotCommandsCreate({
9404
- org,
9405
- requestBody
9406
- }) {
9407
- return request(OpenAPI, {
9408
- method: 'POST',
9409
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/',
9410
- path: {
9411
- 'org': org
9412
- },
9413
- body: requestBody,
9414
- mediaType: 'application/json'
9415
- });
9416
- }
9417
- /**
9418
- * Create slash commands for a specific bot
9419
- * eg. /iblai-baseline
9420
- * @returns BotCommand
9421
- * @throws ApiError
9422
- */
9423
- static aiBotV1BotsBotCommandsRetrieve({
9424
- id,
9425
- org
9426
- }) {
9427
- return request(OpenAPI, {
9428
- method: 'GET',
9429
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9430
- path: {
9431
- 'id': id,
9432
- 'org': org
9433
- }
9434
- });
9435
- }
9436
- /**
9437
- * Create slash commands for a specific bot
9438
- * eg. /iblai-baseline
9439
- * @returns BotCommand
9440
- * @throws ApiError
9441
- */
9442
- static aiBotV1BotsBotCommandsUpdate({
9443
- id,
9444
- org,
9445
- requestBody
9446
- }) {
9447
- return request(OpenAPI, {
9448
- method: 'PUT',
9449
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9450
- path: {
9451
- 'id': id,
9452
- 'org': org
9453
- },
9454
- body: requestBody,
9455
- mediaType: 'application/json'
9456
- });
9457
- }
9458
- /**
9459
- * Create slash commands for a specific bot
9460
- * eg. /iblai-baseline
9461
- * @returns BotCommand
9462
- * @throws ApiError
9463
- */
9464
- static aiBotV1BotsBotCommandsPartialUpdate({
9465
- id,
9466
- org,
9467
- requestBody
9468
- }) {
9469
- return request(OpenAPI, {
9470
- method: 'PATCH',
9471
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9472
- path: {
9473
- 'id': id,
9474
- 'org': org
9475
- },
9476
- body: requestBody,
9477
- mediaType: 'application/json'
9478
- });
9479
- }
9480
- /**
9481
- * Create slash commands for a specific bot
9482
- * eg. /iblai-baseline
9483
- * @returns void
9484
- * @throws ApiError
9485
- */
9486
- static aiBotV1BotsBotCommandsDestroy({
9487
- id,
9488
- org
9489
- }) {
9490
- return request(OpenAPI, {
9491
- method: 'DELETE',
9492
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9493
- path: {
9494
- 'id': id,
9495
- 'org': org
9496
- }
9497
- });
9498
- }
9499
- /**
9500
- * Create modify and update bot information for a specific tenant.
9501
- * @returns Bot
9502
- * @throws ApiError
9503
- */
9504
- static aiBotV1BotsBotRetrieve({
9505
- id,
9506
- org
9507
- }) {
9508
- return request(OpenAPI, {
9509
- method: 'GET',
9510
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9511
- path: {
9512
- 'id': id,
9513
- 'org': org
9514
- }
9515
- });
9516
- }
9517
- /**
9518
- * Create modify and update bot information for a specific tenant.
9519
- * @returns BotCreate
9520
- * @throws ApiError
9521
- */
9522
- static aiBotV1BotsBotUpdate({
9523
- id,
9524
- org,
9525
- requestBody
9526
- }) {
9527
- return request(OpenAPI, {
9528
- method: 'PUT',
9529
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9530
- path: {
9531
- 'id': id,
9532
- 'org': org
9533
- },
9534
- body: requestBody,
9535
- mediaType: 'application/json'
9536
- });
9537
- }
9538
- /**
9539
- * Create modify and update bot information for a specific tenant.
9540
- * @returns BotCreate
9541
- * @throws ApiError
9542
- */
9543
- static aiBotV1BotsBotPartialUpdate({
9544
- id,
9545
- org,
9546
- requestBody
9547
- }) {
9548
- return request(OpenAPI, {
9549
- method: 'PATCH',
9550
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9551
- path: {
9552
- 'id': id,
9553
- 'org': org
9554
- },
9555
- body: requestBody,
9556
- mediaType: 'application/json'
9557
- });
9558
- }
9559
- /**
9560
- * Create modify and update bot information for a specific tenant.
9561
- * @returns void
9562
- * @throws ApiError
9563
- */
9564
- static aiBotV1BotsBotDestroy({
9565
- id,
9566
- org
9567
- }) {
9568
- return request(OpenAPI, {
9569
- method: 'DELETE',
9570
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9571
- path: {
9572
- 'id': id,
9573
- 'org': org
9574
- }
9575
- });
9576
- }
9577
- /**
9578
- * Create modify and update bot information for a specific tenant.
9579
- * @returns DiscordConfig
9580
- * @throws ApiError
9581
- */
9582
- static aiBotV1BotsBotConfigDiscordRetrieve({
9583
- id,
9584
- org
9585
- }) {
9586
- return request(OpenAPI, {
9587
- method: 'GET',
9588
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/discord/',
9589
- path: {
9590
- 'id': id,
9591
- 'org': org
9592
- }
9593
- });
9594
- }
9595
- /**
9596
- * Create modify and update bot information for a specific tenant.
9597
- * @returns DiscordConfig
9598
- * @throws ApiError
9599
- */
9600
- static aiBotV1BotsBotConfigDiscordPartialUpdate({
9601
- id,
9602
- org,
9603
- requestBody
9604
- }) {
9605
- return request(OpenAPI, {
9606
- method: 'PATCH',
9607
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/discord/',
9608
- path: {
9609
- 'id': id,
9610
- 'org': org
9611
- },
9612
- body: requestBody,
9613
- mediaType: 'application/json'
9614
- });
9615
- }
9616
- /**
9617
- * Create modify and update bot information for a specific tenant.
9618
- * @returns SlackConfig
9619
- * @throws ApiError
9620
- */
9621
- static aiBotV1BotsBotConfigSlackRetrieve({
9622
- id,
9623
- org
9624
- }) {
9625
- return request(OpenAPI, {
9626
- method: 'GET',
9627
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/',
9628
- path: {
9629
- 'id': id,
9630
- 'org': org
9631
- }
9632
- });
9633
- }
9634
- /**
9635
- * Create modify and update bot information for a specific tenant.
9636
- * @returns SlackConfig
9637
- * @throws ApiError
9638
- */
9639
- static aiBotV1BotsBotConfigSlackUpdateCreate({
9640
- id,
9641
- org,
9642
- requestBody
9643
- }) {
9644
- return request(OpenAPI, {
9645
- method: 'POST',
9646
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
9647
- path: {
9648
- 'id': id,
9649
- 'org': org
9650
- },
9651
- body: requestBody,
9652
- mediaType: 'application/json'
9653
- });
9654
- }
9655
- /**
9656
- * Create modify and update bot information for a specific tenant.
9657
- * @returns SlackConfig
9658
- * @throws ApiError
9659
- */
9660
- static aiBotV1BotsBotConfigSlackUpdateUpdate({
9661
- id,
9662
- org,
9663
- requestBody
9664
- }) {
9665
- return request(OpenAPI, {
9666
- method: 'PUT',
9667
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
9668
- path: {
9669
- 'id': id,
9670
- 'org': org
9671
- },
9672
- body: requestBody,
9673
- mediaType: 'application/json'
9674
- });
9675
- }
9676
- /**
9677
- * Create modify and update bot information for a specific tenant.
9678
- * @returns SlackConfig
9679
- * @throws ApiError
9680
- */
9681
- static aiBotV1BotsBotConfigSlackUpdatePartialUpdate({
9682
- id,
9683
- org,
9684
- requestBody
9685
- }) {
9686
- return request(OpenAPI, {
9687
- method: 'PATCH',
9688
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
9689
- path: {
9690
- 'id': id,
9691
- 'org': org
9692
- },
9693
- body: requestBody,
9694
- mediaType: 'application/json'
9695
- });
9696
- }
9697
- /**
9698
- * Create modify and update bot information for a specific tenant.
9699
- * @returns TeamsConfig
9700
- * @throws ApiError
9701
- */
9702
- static aiBotV1BotsBotConfigTeamsRetrieve({
9703
- id,
9704
- org
9705
- }) {
9706
- return request(OpenAPI, {
9707
- method: 'GET',
9708
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/',
9709
- path: {
9710
- 'id': id,
9711
- 'org': org
9712
- }
9713
- });
9714
- }
9715
- /**
9716
- * Create modify and update bot information for a specific tenant.
9717
- * @returns TeamsConfig
9718
- * @throws ApiError
9719
- */
9720
- static aiBotV1BotsBotConfigTeamsUpdateCreate({
9721
- id,
9722
- org,
9723
- requestBody
9724
- }) {
9725
- return request(OpenAPI, {
9726
- method: 'POST',
9727
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/update/',
9728
- path: {
9729
- 'id': id,
9730
- 'org': org
9731
- },
9732
- body: requestBody,
9733
- mediaType: 'application/json'
9734
- });
9735
- }
9736
- /**
9737
- * Create modify and update bot information for a specific tenant.
9738
- * @returns TeamsConfig
9739
- * @throws ApiError
9740
- */
9741
- static aiBotV1BotsBotConfigTeamsUpdateUpdate({
9742
- id,
9743
- org,
9744
- requestBody
9745
- }) {
9746
- return request(OpenAPI, {
9747
- method: 'PUT',
9748
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/update/',
9749
- path: {
9750
- 'id': id,
9751
- 'org': org
9752
- },
9753
- body: requestBody,
9754
- mediaType: 'application/json'
9755
- });
9756
- }
9757
- /**
9758
- * Create modify and update bot information for a specific tenant.
9759
- * @returns TeamsConfig
9760
- * @throws ApiError
9761
- */
9762
- static aiBotV1BotsBotConfigTeamsUpdatePartialUpdate({
9763
- id,
9764
- org,
9765
- requestBody
9766
- }) {
9767
- return request(OpenAPI, {
9768
- method: 'PATCH',
9769
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/update/',
9770
- path: {
9771
- 'id': id,
9772
- 'org': org
9773
- },
9774
- body: requestBody,
9775
- mediaType: 'application/json'
9776
- });
9777
- }
9778
- /**
9779
- * Create modify and update bot information for a specific tenant.
9780
- * @returns WebexConfig
9781
- * @throws ApiError
9782
- */
9783
- static aiBotV1BotsBotConfigWebexRetrieve({
9784
- id,
9785
- org
9786
- }) {
9787
- return request(OpenAPI, {
9788
- method: 'GET',
9789
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/webex/',
9790
- path: {
9791
- 'id': id,
9792
- 'org': org
9793
- }
9794
- });
9795
- }
9796
- /**
9797
- * Create modify and update bot information for a specific tenant.
9798
- * @returns WebexConfig
9799
- * @throws ApiError
9800
- */
9801
- static aiBotV1BotsBotConfigWebexPartialUpdate({
9802
- id,
9803
- org,
9804
- requestBody
9805
- }) {
9806
- return request(OpenAPI, {
9807
- method: 'PATCH',
9808
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/webex/',
9809
- path: {
9810
- 'id': id,
9811
- 'org': org
9812
- },
9813
- body: requestBody,
9814
- mediaType: 'application/json'
9815
- });
9816
- }
9817
- /**
9818
- * Create modify and update bot information for a specific tenant.
9819
- * @returns WhatsappConfig
9820
- * @throws ApiError
9821
- */
9822
- static aiBotV1BotsBotConfigWhatsappRetrieve({
9823
- id,
9824
- org
9825
- }) {
9826
- return request(OpenAPI, {
9827
- method: 'GET',
9828
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/whatsapp/',
9829
- path: {
9830
- 'id': id,
9831
- 'org': org
9832
- }
9833
- });
9834
- }
9835
- /**
9836
- * Create modify and update bot information for a specific tenant.
9837
- * @returns WhatsappConfig
9838
- * @throws ApiError
9839
- */
9840
- static aiBotV1BotsBotWhatsappConfigUpdate({
9841
- id,
9842
- org,
9843
- requestBody
9844
- }) {
9845
- return request(OpenAPI, {
9846
- method: 'PUT',
9847
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/whatsapp-config/',
9848
- path: {
9849
- 'id': id,
9850
- 'org': org
9851
- },
9852
- body: requestBody,
9853
- mediaType: 'application/json'
9854
- });
9855
- }
9856
- /**
9857
- * Create modify and update bot information for a specific tenant.
9858
- * @returns WhatsappConfig
9859
- * @throws ApiError
9860
- */
9861
- static aiBotV1BotsBotWhatsappConfigPartialUpdate({
9862
- id,
9863
- org,
9864
- requestBody
9865
- }) {
9866
- return request(OpenAPI, {
9867
- method: 'PATCH',
9868
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/whatsapp-config/',
9869
- path: {
9870
- 'id': id,
9871
- 'org': org
9872
- },
9873
- body: requestBody,
9874
- mediaType: 'application/json'
9875
- });
9876
- }
9877
- /**
9878
- * Setup discord user id linkage with discord bots
9879
- * this will be used to authenticate the user when interracting with discord bots.
9880
- * the user id can be copied from the discord app after tapping on the user profile.
9881
- * @returns DiscordUserConfig
9882
- * @throws ApiError
9883
- */
9884
- static aiBotV1BotsDiscordUserConfigList({
9885
- org
9886
- }) {
9887
- return request(OpenAPI, {
9888
- method: 'GET',
9889
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/',
9890
- path: {
9891
- 'org': org
9892
- }
9893
- });
9894
- }
9895
- /**
9896
- * Setup discord user id linkage with discord bots
9897
- * this will be used to authenticate the user when interracting with discord bots.
9898
- * the user id can be copied from the discord app after tapping on the user profile.
9899
- * @returns DiscordUserConfig
9900
- * @throws ApiError
9901
- */
9902
- static aiBotV1BotsDiscordUserConfigCreate({
9903
- org,
9904
- requestBody
9905
- }) {
9906
- return request(OpenAPI, {
9907
- method: 'POST',
9908
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/',
9909
- path: {
9910
- 'org': org
9911
- },
9912
- body: requestBody,
9913
- mediaType: 'application/json'
9914
- });
9915
- }
9916
- /**
9917
- * Setup discord user id linkage with discord bots
9918
- * this will be used to authenticate the user when interracting with discord bots.
9919
- * the user id can be copied from the discord app after tapping on the user profile.
9920
- * @returns DiscordUserConfig
9921
- * @throws ApiError
9922
- */
9923
- static aiBotV1BotsDiscordUserConfigRetrieve({
9924
- id,
9925
- org
9926
- }) {
9927
- return request(OpenAPI, {
9928
- method: 'GET',
9929
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
9930
- path: {
9931
- 'id': id,
9932
- 'org': org
9933
- }
9934
- });
9935
- }
9936
- /**
9937
- * Setup discord user id linkage with discord bots
9938
- * this will be used to authenticate the user when interracting with discord bots.
9939
- * the user id can be copied from the discord app after tapping on the user profile.
9940
- * @returns DiscordUserConfig
9941
- * @throws ApiError
9942
- */
9943
- static aiBotV1BotsDiscordUserConfigUpdate({
9944
- id,
9945
- org,
9946
- requestBody
9947
- }) {
9948
- return request(OpenAPI, {
9949
- method: 'PUT',
9950
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
9951
- path: {
9952
- 'id': id,
9953
- 'org': org
9954
- },
9955
- body: requestBody,
9956
- mediaType: 'application/json'
9957
- });
9958
- }
9959
- /**
9960
- * Setup discord user id linkage with discord bots
9961
- * this will be used to authenticate the user when interracting with discord bots.
9962
- * the user id can be copied from the discord app after tapping on the user profile.
9963
- * @returns DiscordUserConfig
9964
- * @throws ApiError
9965
- */
9966
- static aiBotV1BotsDiscordUserConfigPartialUpdate({
9967
- id,
9968
- org,
9969
- requestBody
9970
- }) {
9971
- return request(OpenAPI, {
9972
- method: 'PATCH',
9973
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
9974
- path: {
9975
- 'id': id,
9976
- 'org': org
9977
- },
9978
- body: requestBody,
9979
- mediaType: 'application/json'
9980
- });
9981
- }
9982
- /**
9983
- * Setup discord user id linkage with discord bots
9984
- * this will be used to authenticate the user when interracting with discord bots.
9985
- * the user id can be copied from the discord app after tapping on the user profile.
9986
- * @returns void
9987
- * @throws ApiError
9988
- */
9989
- static aiBotV1BotsDiscordUserConfigDestroy({
9990
- id,
9991
- org
9992
- }) {
9993
- return request(OpenAPI, {
9994
- method: 'DELETE',
9995
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
9996
- path: {
9997
- 'id': id,
9998
- 'org': org
9999
- }
10000
- });
10001
- }
10002
- /**
10003
- * Setup slack username and domain linkage with slack bots
10004
- * this will be used to authenticate the user when interracting with slack bots.
10005
- * @returns SlackUserConfig
10006
- * @throws ApiError
10007
- */
10008
- static aiBotV1BotsSlackUserConfigList({
10009
- org
10010
- }) {
10011
- return request(OpenAPI, {
10012
- method: 'GET',
10013
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/',
10014
- path: {
10015
- 'org': org
10016
- }
10017
- });
10018
- }
10019
- /**
10020
- * Setup slack username and domain linkage with slack bots
10021
- * this will be used to authenticate the user when interracting with slack bots.
10022
- * @returns SlackUserConfig
10023
- * @throws ApiError
10024
- */
10025
- static aiBotV1BotsSlackUserConfigCreate({
10026
- org,
10027
- requestBody
10028
- }) {
10029
- return request(OpenAPI, {
10030
- method: 'POST',
10031
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/',
10032
- path: {
10033
- 'org': org
10034
- },
10035
- body: requestBody,
10036
- mediaType: 'application/json'
10037
- });
10038
- }
10039
- /**
10040
- * Setup slack username and domain linkage with slack bots
10041
- * this will be used to authenticate the user when interracting with slack bots.
10042
- * @returns SlackUserConfig
10043
- * @throws ApiError
10044
- */
10045
- static aiBotV1BotsSlackUserConfigRetrieve({
10046
- id,
10047
- org
10048
- }) {
10049
- return request(OpenAPI, {
10050
- method: 'GET',
10051
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
10052
- path: {
10053
- 'id': id,
10054
- 'org': org
10055
- }
10056
- });
10057
- }
10058
- /**
10059
- * Setup slack username and domain linkage with slack bots
10060
- * this will be used to authenticate the user when interracting with slack bots.
10061
- * @returns SlackUserConfig
10062
- * @throws ApiError
10063
- */
10064
- static aiBotV1BotsSlackUserConfigUpdate({
10065
- id,
10066
- org,
10067
- requestBody
10068
- }) {
10069
- return request(OpenAPI, {
10070
- method: 'PUT',
10071
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
10072
- path: {
10073
- 'id': id,
10074
- 'org': org
10075
- },
10076
- body: requestBody,
10077
- mediaType: 'application/json'
10078
- });
10079
- }
10080
- /**
10081
- * Setup slack username and domain linkage with slack bots
10082
- * this will be used to authenticate the user when interracting with slack bots.
10083
- * @returns SlackUserConfig
10084
- * @throws ApiError
10085
- */
10086
- static aiBotV1BotsSlackUserConfigPartialUpdate({
10087
- id,
10088
- org,
10089
- requestBody
10090
- }) {
10091
- return request(OpenAPI, {
10092
- method: 'PATCH',
10093
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
10094
- path: {
10095
- 'id': id,
10096
- 'org': org
10097
- },
10098
- body: requestBody,
10099
- mediaType: 'application/json'
10100
- });
10101
- }
10102
- /**
10103
- * Setup slack username and domain linkage with slack bots
10104
- * this will be used to authenticate the user when interracting with slack bots.
10105
- * @returns void
10106
- * @throws ApiError
10107
- */
10108
- static aiBotV1BotsSlackUserConfigDestroy({
10109
- id,
10110
- org
10111
- }) {
10112
- return request(OpenAPI, {
10113
- method: 'DELETE',
10114
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
10115
- path: {
10116
- 'id': id,
10117
- 'org': org
10118
- }
10119
- });
10120
- }
10121
- /**
10122
- * Setup phone number linkage with whatsapp bots
10123
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10124
- * @returns WhatsappUserConfig
10125
- * @throws ApiError
10126
- */
10127
- static aiBotV1BotsWhatsappUserConfigList({
10128
- org
10129
- }) {
10130
- return request(OpenAPI, {
10131
- method: 'GET',
10132
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/',
10133
- path: {
10134
- 'org': org
10135
- }
10136
- });
10137
- }
10138
- /**
10139
- * Setup phone number linkage with whatsapp bots
10140
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10141
- * @returns WhatsappUserConfig
10142
- * @throws ApiError
10143
- */
10144
- static aiBotV1BotsWhatsappUserConfigCreate({
10145
- org,
10146
- requestBody
10147
- }) {
10148
- return request(OpenAPI, {
10149
- method: 'POST',
10150
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/',
10151
- path: {
10152
- 'org': org
10153
- },
10154
- body: requestBody,
10155
- mediaType: 'application/json'
10156
- });
10157
- }
10158
- /**
10159
- * Setup phone number linkage with whatsapp bots
10160
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10161
- * @returns WhatsappUserConfig
10162
- * @throws ApiError
10163
- */
10164
- static aiBotV1BotsWhatsappUserConfigRetrieve({
10165
- id,
10166
- org
10167
- }) {
10168
- return request(OpenAPI, {
10169
- method: 'GET',
10170
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
10171
- path: {
10172
- 'id': id,
10173
- 'org': org
10174
- }
10175
- });
10176
- }
10177
- /**
10178
- * Setup phone number linkage with whatsapp bots
10179
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10180
- * @returns WhatsappUserConfig
10181
- * @throws ApiError
10182
- */
10183
- static aiBotV1BotsWhatsappUserConfigUpdate({
10184
- id,
10185
- org,
10186
- requestBody
10187
- }) {
10188
- return request(OpenAPI, {
10189
- method: 'PUT',
10190
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
10191
- path: {
10192
- 'id': id,
10193
- 'org': org
10194
- },
10195
- body: requestBody,
10196
- mediaType: 'application/json'
10197
- });
10198
- }
10199
- /**
10200
- * Setup phone number linkage with whatsapp bots
10201
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10202
- * @returns WhatsappUserConfig
10203
- * @throws ApiError
10204
- */
10205
- static aiBotV1BotsWhatsappUserConfigPartialUpdate({
10206
- id,
10207
- org,
10208
- requestBody
10209
- }) {
10210
- return request(OpenAPI, {
10211
- method: 'PATCH',
10212
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
10213
- path: {
10214
- 'id': id,
10215
- 'org': org
10216
- },
10217
- body: requestBody,
10218
- mediaType: 'application/json'
10219
- });
10220
- }
10221
- /**
10222
- * Setup phone number linkage with whatsapp bots
10223
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10224
- * @returns void
10225
- * @throws ApiError
10226
- */
10227
- static aiBotV1BotsWhatsappUserConfigDestroy({
10228
- id,
10229
- org
10230
- }) {
10231
- return request(OpenAPI, {
10232
- method: 'DELETE',
10233
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
10234
- path: {
10235
- 'id': id,
10236
- 'org': org
10237
- }
10238
- });
10239
- }
10240
- /**
10241
- * Webhook endpoint to receive and process discord messages.
10242
- * @returns DiscordWebhook
10243
- * @throws ApiError
10244
- */
10245
- static aiBotV1BotsWebhooksDiscordCreate({
10246
- name,
10247
- org,
10248
- requestBody
10249
- }) {
10250
- return request(OpenAPI, {
10251
- method: 'POST',
10252
- url: '/api/ai-bot/v1/bots/webhooks/{org}/discord/{name}/',
10253
- path: {
10254
- 'name': name,
10255
- 'org': org
10256
- },
10257
- body: requestBody,
10258
- mediaType: 'application/json'
10259
- });
10260
- }
10261
- /**
10262
- * @returns SlackWebhook
10263
- * @throws ApiError
10264
- */
10265
- static aiBotV1BotsWebhooksSlackCreate({
10266
- name,
10267
- org,
10268
- requestBody
10269
- }) {
10270
- return request(OpenAPI, {
10271
- method: 'POST',
10272
- url: '/api/ai-bot/v1/bots/webhooks/{org}/slack/{name}/',
10273
- path: {
10274
- 'name': name,
10275
- 'org': org
10276
- },
10277
- body: requestBody,
10278
- mediaType: 'application/json'
10279
- });
10280
- }
10281
- /**
10282
- * @returns TeamsWebhook
10283
- * @throws ApiError
10284
- */
10285
- static aiBotV1BotsWebhooksTeamsCreate({
10286
- name,
10287
- org,
10288
- requestBody
10289
- }) {
10290
- return request(OpenAPI, {
10291
- method: 'POST',
10292
- url: '/api/ai-bot/v1/bots/webhooks/{org}/teams/{name}/',
10293
- path: {
10294
- 'name': name,
10295
- 'org': org
10296
- },
10297
- body: requestBody,
10298
- mediaType: 'application/json'
10299
- });
10300
- }
10301
- /**
10302
- * Webhook endpoint to receive and process discord messages.
10303
- * @returns WebexWebhook
10304
- * @throws ApiError
10305
- */
10306
- static aiBotV1BotsWebhooksWebexCreate({
10307
- name,
10308
- org,
10309
- requestBody
10310
- }) {
10311
- return request(OpenAPI, {
10312
- method: 'POST',
10313
- url: '/api/ai-bot/v1/bots/webhooks/{org}/webex/{name}/',
10314
- path: {
10315
- 'name': name,
10316
- 'org': org
10317
- },
10318
- body: requestBody,
10319
- mediaType: 'application/json'
9078
+ query: {
9079
+ 'department_id': departmentId,
9080
+ 'format': format,
9081
+ 'include_main_platform': includeMainPlatform
9082
+ }
10320
9083
  });
10321
9084
  }
10322
9085
  /**
10323
- * Respond to whatsapp's webhook challenge.
10324
- * Parameters Required include the tenant key (org) and the name of the bot: (name)
10325
- * @returns WhatAppWebHook
9086
+ * Average days used to complete a course
9087
+ *
9088
+ * Query Params
9089
+ * 1. course_id <optional> e.g course-v1:Org+Course4+Run
9090
+ * @returns any No response body
10326
9091
  * @throws ApiError
10327
9092
  */
10328
- static aiBotV1BotsWebhooksWhatsappRetrieve({
10329
- name,
10330
- org
9093
+ static platformOrgsCoursesUsersProgressDaysToCompleteRetrieve({
9094
+ courseId,
9095
+ org,
9096
+ userId
10331
9097
  }) {
10332
9098
  return request(OpenAPI, {
10333
9099
  method: 'GET',
10334
- url: '/api/ai-bot/v1/bots/webhooks/{org}/whatsapp/{name}/',
9100
+ url: '/api/platform/orgs/{org}/courses/{course_id}/users/{user_id}/progress/days-to-complete',
10335
9101
  path: {
10336
- 'name': name,
10337
- 'org': org
9102
+ 'course_id': courseId,
9103
+ 'org': org,
9104
+ 'user_id': userId
10338
9105
  }
10339
9106
  });
10340
9107
  }
10341
9108
  /**
10342
- * Accept and process webhook events from whatsapp.
10343
- * @returns WhatAppWebHook
9109
+ * Time spent count in seconds within a course by a learner
9110
+ * @returns Count
10344
9111
  * @throws ApiError
10345
9112
  */
10346
- static aiBotV1BotsWebhooksWhatsappCreate({
10347
- name,
9113
+ static platformOrgsCoursesUsersTimeCountRetrieve({
9114
+ courseId,
10348
9115
  org,
10349
- requestBody
9116
+ userId,
9117
+ departmentId,
9118
+ endDate,
9119
+ format = 'json',
9120
+ includeMainPlatform = true,
9121
+ startDate
10350
9122
  }) {
10351
9123
  return request(OpenAPI, {
10352
- method: 'POST',
10353
- url: '/api/ai-bot/v1/bots/webhooks/{org}/whatsapp/{name}/',
9124
+ method: 'GET',
9125
+ url: '/api/platform/orgs/{org}/courses/{course_id}/users/{user_id}/time/count',
10354
9126
  path: {
10355
- 'name': name,
10356
- 'org': org
9127
+ 'course_id': courseId,
9128
+ 'org': org,
9129
+ 'user_id': userId
10357
9130
  },
10358
- body: requestBody,
10359
- mediaType: 'application/json'
9131
+ query: {
9132
+ 'department_id': departmentId,
9133
+ 'end_date': endDate,
9134
+ 'format': format,
9135
+ 'include_main_platform': includeMainPlatform,
9136
+ 'start_date': startDate
9137
+ }
10360
9138
  });
10361
9139
  }
10362
- }
10363
-
10364
- class AiFinetuningService {
10365
9140
  /**
10366
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10367
- * @returns PaginatedDataSetList
9141
+ * (Total videos watched / Total Course Videos) or Total Videos watched in a course by a learner
9142
+ * @returns VideosCount
10368
9143
  * @throws ApiError
10369
9144
  */
10370
- static aiFinetuningV1OrgUserDatasetsList({
9145
+ static platformOrgsCoursesUsersVideosCountRetrieve({
9146
+ courseId,
10371
9147
  org,
10372
- username,
10373
- dateCreated,
10374
- numDataPoints,
10375
- ordering,
10376
- page,
10377
- pageSize,
10378
- retryAttempts,
10379
- search,
10380
- status
9148
+ userId,
9149
+ departmentId,
9150
+ format = 'json',
9151
+ includeMainPlatform = true
10381
9152
  }) {
10382
9153
  return request(OpenAPI, {
10383
9154
  method: 'GET',
10384
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/',
9155
+ url: '/api/platform/orgs/{org}/courses/{course_id}/users/{user_id}/videos/count',
10385
9156
  path: {
9157
+ 'course_id': courseId,
10386
9158
  'org': org,
10387
- 'username': username
9159
+ 'user_id': userId
10388
9160
  },
10389
9161
  query: {
10390
- 'date_created': dateCreated,
10391
- 'num_data_points': numDataPoints,
10392
- 'ordering': ordering,
10393
- 'page': page,
10394
- 'page_size': pageSize,
10395
- 'retry_attempts': retryAttempts,
10396
- 'search': search,
10397
- 'status': status
9162
+ 'department_id': departmentId,
9163
+ 'format': format,
9164
+ 'include_main_platform': includeMainPlatform
10398
9165
  }
10399
9166
  });
10400
9167
  }
10401
9168
  /**
10402
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10403
- * @returns DataSetCreate
9169
+ * Count of total videos in a course
9170
+ *
9171
+ * Query Params
9172
+ * course_id e.g course-v1:Org+Course4+Run
9173
+ * @returns any No response body
10404
9174
  * @throws ApiError
10405
9175
  */
10406
- static aiFinetuningV1OrgUserDatasetsCreate({
10407
- org,
10408
- username,
10409
- requestBody
9176
+ static platformOrgsCoursesVideosRetrieve2({
9177
+ courseId,
9178
+ org
10410
9179
  }) {
10411
9180
  return request(OpenAPI, {
10412
- method: 'POST',
10413
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/',
9181
+ method: 'GET',
9182
+ url: '/api/platform/orgs/{org}/courses/{course_id}/videos/',
10414
9183
  path: {
10415
- 'org': org,
10416
- 'username': username
10417
- },
10418
- body: requestBody,
10419
- mediaType: 'application/json'
9184
+ 'course_id': courseId,
9185
+ 'org': org
9186
+ }
10420
9187
  });
10421
9188
  }
10422
9189
  /**
10423
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10424
- * @returns DataSet
9190
+ * Get total count of courses on the platform.
9191
+ *
9192
+ * This endpoint returns the total number of courses available on the platform.
9193
+ *
9194
+ * Returns:
9195
+ * The total count of courses on the platform.
9196
+ * @returns Count
10425
9197
  * @throws ApiError
10426
9198
  */
10427
- static aiFinetuningV1OrgUserDatasetsRetrieve({
10428
- id,
9199
+ static platformOrgsCoursesCountRetrieve({
10429
9200
  org,
10430
- username
9201
+ departmentId,
9202
+ format = 'json',
9203
+ includeMainPlatform = true
10431
9204
  }) {
10432
9205
  return request(OpenAPI, {
10433
9206
  method: 'GET',
10434
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
9207
+ url: '/api/platform/orgs/{org}/courses/count',
10435
9208
  path: {
10436
- 'id': id,
10437
- 'org': org,
10438
- 'username': username
9209
+ 'org': org
9210
+ },
9211
+ query: {
9212
+ 'department_id': departmentId,
9213
+ 'format': format,
9214
+ 'include_main_platform': includeMainPlatform
10439
9215
  }
10440
9216
  });
10441
9217
  }
10442
9218
  /**
10443
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10444
- * @returns DataSet
9219
+ * List grading information on a per-course basis.
9220
+ *
9221
+ * This endpoint provides grading statistics for all courses, including
9222
+ * average grades and completion rates.
9223
+ *
9224
+ * Returns:
9225
+ * A list of courses with their associated grading metrics.
9226
+ * @returns any No response body
10445
9227
  * @throws ApiError
10446
9228
  */
10447
- static aiFinetuningV1OrgUserDatasetsUpdate({
10448
- id,
10449
- org,
10450
- username,
10451
- requestBody
9229
+ static platformOrgsCoursesGradesRetrieve({
9230
+ org
10452
9231
  }) {
10453
9232
  return request(OpenAPI, {
10454
- method: 'PUT',
10455
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
9233
+ method: 'GET',
9234
+ url: '/api/platform/orgs/{org}/courses/grades',
10456
9235
  path: {
10457
- 'id': id,
10458
- 'org': org,
10459
- 'username': username
10460
- },
10461
- body: requestBody,
10462
- mediaType: 'application/json'
9236
+ 'org': org
9237
+ }
10463
9238
  });
10464
9239
  }
10465
9240
  /**
10466
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10467
- * @returns DataSet
9241
+ * Get video watch statistics on a per-course basis.
9242
+ *
9243
+ * This endpoint provides a list of courses with aggregated video watch metrics,
9244
+ * including total views and completion percentages.
9245
+ *
9246
+ * Returns:
9247
+ * A list of courses with:
9248
+ * - Course identification (ID and name)
9249
+ * - Video watch count
9250
+ * - Percentage of total videos watched
9251
+ * @returns WatchedVideosPerCourse
10468
9252
  * @throws ApiError
10469
9253
  */
10470
- static aiFinetuningV1OrgUserDatasetsPartialUpdate({
10471
- id,
9254
+ static platformOrgsCoursesVideosRetrieve({
10472
9255
  org,
10473
- username,
10474
- requestBody
9256
+ departmentId,
9257
+ format = 'json',
9258
+ includeMainPlatform = true
10475
9259
  }) {
10476
9260
  return request(OpenAPI, {
10477
- method: 'PATCH',
10478
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
9261
+ method: 'GET',
9262
+ url: '/api/platform/orgs/{org}/courses/videos',
10479
9263
  path: {
10480
- 'id': id,
10481
- 'org': org,
10482
- 'username': username
9264
+ 'org': org
10483
9265
  },
10484
- body: requestBody,
10485
- mediaType: 'application/json'
9266
+ query: {
9267
+ 'department_id': departmentId,
9268
+ 'format': format,
9269
+ 'include_main_platform': includeMainPlatform
9270
+ }
10486
9271
  });
10487
9272
  }
10488
9273
  /**
10489
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10490
- * @returns void
9274
+ * Get completion count statistics.
9275
+ *
9276
+ * This endpoint returns completion counts at different levels:
9277
+ * - Platform level: Total users who have completed at least one course
9278
+ * - Course level: Total completions for a specific course
9279
+ * - Learner level: Total courses completed by a specific learner
9280
+ *
9281
+ * Query Parameters:
9282
+ * course_id (str, optional): Filter by course ID
9283
+ * user_id (str, optional): Filter by username or email
9284
+ *
9285
+ * Returns:
9286
+ * A count of completions based on the specified filters.
9287
+ * @returns any No response body
10491
9288
  * @throws ApiError
10492
9289
  */
10493
- static aiFinetuningV1OrgUserDatasetsDestroy({
10494
- id,
10495
- org,
10496
- username
9290
+ static platformOrgsProgressCompletedRetrieve({
9291
+ org
10497
9292
  }) {
10498
9293
  return request(OpenAPI, {
10499
- method: 'DELETE',
10500
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
9294
+ method: 'GET',
9295
+ url: '/api/platform/orgs/{org}/progress/completed',
10501
9296
  path: {
10502
- 'id': id,
10503
- 'org': org,
10504
- 'username': username
9297
+ 'org': org
10505
9298
  }
10506
9299
  });
10507
9300
  }
10508
9301
  /**
10509
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10510
- * @returns PaginatedTrainingList
9302
+ * Average of total completed units
9303
+ * @returns any No response body
10511
9304
  * @throws ApiError
10512
9305
  */
10513
- static aiFinetuningV1OrgUserTrainingsList({
10514
- org,
10515
- username,
10516
- baseModelName,
10517
- dataset,
10518
- dateCreated,
10519
- fineTunedModel,
10520
- lastModified,
10521
- ordering,
10522
- page,
10523
- pageSize,
10524
- preprocessDataset,
10525
- provider,
10526
- search,
10527
- status
9306
+ static platformOrgsProgressCompletionRateRetrieve({
9307
+ org
10528
9308
  }) {
10529
9309
  return request(OpenAPI, {
10530
9310
  method: 'GET',
10531
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/',
9311
+ url: '/api/platform/orgs/{org}/progress/completion-rate',
10532
9312
  path: {
10533
- 'org': org,
10534
- 'username': username
10535
- },
10536
- query: {
10537
- 'base_model_name': baseModelName,
10538
- 'dataset': dataset,
10539
- 'date_created': dateCreated,
10540
- 'fine_tuned_model': fineTunedModel,
10541
- 'last_modified': lastModified,
10542
- 'ordering': ordering,
10543
- 'page': page,
10544
- 'page_size': pageSize,
10545
- 'preprocess_dataset': preprocessDataset,
10546
- 'provider': provider,
10547
- 'search': search,
10548
- 'status': status
9313
+ 'org': org
10549
9314
  }
10550
9315
  });
10551
9316
  }
10552
9317
  /**
10553
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10554
- * @returns TrainingCreate
9318
+ * In Progress means any unit completion in the past 30 days
9319
+ *
9320
+ * For platform : Total users who have atleast a course in_progress on the platform
9321
+ * For course : Total users
9322
+ * For learner : Total courses in progress
9323
+ *
9324
+ * Query Params
9325
+ * 1. course_id <optional> e.g course-v1:Org+Course4+Run
9326
+ * 2. user_id <optional> e.g developer@ibleducation.com or dev123 (username|email)
9327
+ * @returns any No response body
10555
9328
  * @throws ApiError
10556
9329
  */
10557
- static aiFinetuningV1OrgUserTrainingsCreate({
10558
- org,
10559
- username,
10560
- requestBody
9330
+ static platformOrgsProgressInProgressRetrieve({
9331
+ org
10561
9332
  }) {
10562
9333
  return request(OpenAPI, {
10563
- method: 'POST',
10564
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/',
9334
+ method: 'GET',
9335
+ url: '/api/platform/orgs/{org}/progress/in-progress',
10565
9336
  path: {
10566
- 'org': org,
10567
- 'username': username
10568
- },
10569
- body: requestBody,
10570
- mediaType: 'application/json'
9337
+ 'org': org
9338
+ }
10571
9339
  });
10572
9340
  }
10573
9341
  /**
10574
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10575
- * @returns Training
9342
+ * Started means an enrollment
9343
+ *
9344
+ * For platform : Total users who have atleast an enrollment
9345
+ * For course : Total users enrolled
9346
+ * For learner : Total courses in progress
9347
+ *
9348
+ * Query Params
9349
+ * 1. course_id <optional> e.g course-v1:Org+Course4+Run
9350
+ * 2. user_id <optional> e.g developer@ibleducation.com or dev123 (username|email)
9351
+ * @returns any No response body
10576
9352
  * @throws ApiError
10577
9353
  */
10578
- static aiFinetuningV1OrgUserTrainingsRetrieve({
10579
- id,
10580
- org,
10581
- username
9354
+ static platformOrgsProgressStartedRetrieve({
9355
+ org
10582
9356
  }) {
10583
9357
  return request(OpenAPI, {
10584
9358
  method: 'GET',
10585
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
9359
+ url: '/api/platform/orgs/{org}/progress/started',
10586
9360
  path: {
10587
- 'id': id,
10588
- 'org': org,
10589
- 'username': username
9361
+ 'org': org
10590
9362
  }
10591
9363
  });
10592
9364
  }
10593
9365
  /**
10594
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10595
- * @returns TrainingCreate
9366
+ * Total time spent count on the platform within specified range or all time
9367
+ *
9368
+ * Query Params
9369
+ * 1. start_date e.g 2020-10-01
9370
+ * 2. end_date e.g 2020-10-10
9371
+ *
9372
+ * Default result is all time
9373
+ * @returns any No response body
10596
9374
  * @throws ApiError
10597
9375
  */
10598
- static aiFinetuningV1OrgUserTrainingsUpdate({
10599
- id,
10600
- org,
10601
- username,
10602
- requestBody
9376
+ static platformOrgsTimeCountRetrieve({
9377
+ org
10603
9378
  }) {
10604
9379
  return request(OpenAPI, {
10605
- method: 'PUT',
10606
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
9380
+ method: 'GET',
9381
+ url: '/api/platform/orgs/{org}/time/count',
10607
9382
  path: {
10608
- 'id': id,
10609
- 'org': org,
10610
- 'username': username
10611
- },
10612
- body: requestBody,
10613
- mediaType: 'application/json'
9383
+ 'org': org
9384
+ }
10614
9385
  });
10615
9386
  }
10616
9387
  /**
10617
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10618
- * @returns TrainingCreate
9388
+ * Get count of active users on the platform.
9389
+ *
9390
+ * This endpoint returns the number of users who have had activity on the platform,
9391
+ * either for all time or within a specified date range.
9392
+ *
9393
+ * Query Parameters:
9394
+ * start_date (str, optional): Start date for filtering (ISO format)
9395
+ * end_date (str, optional): End date for filtering (ISO format)
9396
+ *
9397
+ * Returns:
9398
+ * The count of active users and change metrics compared to previous periods.
9399
+ *
9400
+ * Default behavior returns the count for all time if no date range is specified.
9401
+ * @returns OverTimeWithTotal
10619
9402
  * @throws ApiError
10620
9403
  */
10621
- static aiFinetuningV1OrgUserTrainingsPartialUpdate({
10622
- id,
9404
+ static platformOrgsUsersActiveCountRetrieve({
10623
9405
  org,
10624
- username,
10625
- requestBody
9406
+ departmentId,
9407
+ endDate,
9408
+ format = 'json',
9409
+ includeMainPlatform = true,
9410
+ startDate
10626
9411
  }) {
10627
9412
  return request(OpenAPI, {
10628
- method: 'PATCH',
10629
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
9413
+ method: 'GET',
9414
+ url: '/api/platform/orgs/{org}/users/active/count',
10630
9415
  path: {
10631
- 'id': id,
10632
- 'org': org,
10633
- 'username': username
9416
+ 'org': org
10634
9417
  },
10635
- body: requestBody,
10636
- mediaType: 'application/json'
9418
+ query: {
9419
+ 'department_id': departmentId,
9420
+ 'end_date': endDate,
9421
+ 'format': format,
9422
+ 'include_main_platform': includeMainPlatform,
9423
+ 'start_date': startDate
9424
+ }
10637
9425
  });
10638
9426
  }
10639
9427
  /**
10640
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10641
- * @returns void
9428
+ * Get count of registered users on the platform.
9429
+ *
9430
+ * This endpoint returns the number of users registered on the platform,
9431
+ * either for all time or within a specified date range.
9432
+ *
9433
+ * Query Parameters:
9434
+ * start_date (str, optional): Start date for filtering (ISO format)
9435
+ * end_date (str, optional): End date for filtering (ISO format)
9436
+ *
9437
+ * Returns:
9438
+ * The count of registered users and change metrics compared to previous periods.
9439
+ *
9440
+ * Default behavior returns the count for all time if no date range is specified.
9441
+ * @returns OverTimeWithTotal
10642
9442
  * @throws ApiError
10643
9443
  */
10644
- static aiFinetuningV1OrgUserTrainingsDestroy({
10645
- id,
9444
+ static platformOrgsUsersCountRetrieve({
10646
9445
  org,
10647
- username
9446
+ departmentId,
9447
+ endDate,
9448
+ format = 'json',
9449
+ includeMainPlatform = true,
9450
+ startDate
10648
9451
  }) {
10649
9452
  return request(OpenAPI, {
10650
- method: 'DELETE',
10651
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
9453
+ method: 'GET',
9454
+ url: '/api/platform/orgs/{org}/users/count',
10652
9455
  path: {
10653
- 'id': id,
10654
- 'org': org,
10655
- 'username': username
9456
+ 'org': org
9457
+ },
9458
+ query: {
9459
+ 'department_id': departmentId,
9460
+ 'end_date': endDate,
9461
+ 'format': format,
9462
+ 'include_main_platform': includeMainPlatform,
9463
+ 'start_date': startDate
10656
9464
  }
10657
9465
  });
10658
9466
  }
10659
9467
  /**
10660
- * Retrieves a paginated list of completed fine-tuned models, excluding those without a fine-tuned model.
10661
- * Filtering and pagination is allowed.
9468
+ * Count of users who have completed a course on the platform within specified range or all time
10662
9469
  *
10663
- * NB: This is only a helper endpoint. The same functionality can be achieved with the appropriate filters using the
10664
- * training list endpoint.
10665
- * Returns:
10666
- * Response: A paginated response containing the serialized fine-tuned models.
10667
- * @returns Training
9470
+ * Query Params
9471
+ * 1. start_date e.g 2020-10-01
9472
+ * 2. end_date e.g 2020-10-10
9473
+ *
9474
+ * Default is all time
9475
+ * @returns OverTimeWithTotal
10668
9476
  * @throws ApiError
10669
9477
  */
10670
- static aiFinetuningV1OrgUserTrainingsFinetunedModelsRetrieve({
9478
+ static platformOrgsUsersCoursesCompletedCountRetrieve({
10671
9479
  org,
10672
- username
9480
+ departmentId,
9481
+ endDate,
9482
+ format = 'json',
9483
+ includeMainPlatform = true,
9484
+ startDate
10673
9485
  }) {
10674
9486
  return request(OpenAPI, {
10675
9487
  method: 'GET',
10676
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/finetuned-models/',
9488
+ url: '/api/platform/orgs/{org}/users/courses-completed/count',
10677
9489
  path: {
10678
- 'org': org,
10679
- 'username': username
9490
+ 'org': org
9491
+ },
9492
+ query: {
9493
+ 'department_id': departmentId,
9494
+ 'end_date': endDate,
9495
+ 'format': format,
9496
+ 'include_main_platform': includeMainPlatform,
9497
+ 'start_date': startDate
10680
9498
  }
10681
9499
  });
10682
9500
  }
@@ -21099,6 +19917,218 @@ class AiPromptService {
21099
19917
  }
21100
19918
  }
21101
19919
 
19920
+ class AnalyticsService {
19921
+ /**
19922
+ * Financial Analytics API - Get comprehensive cost metrics with comparison analysis.
19923
+ *
19924
+ * This endpoint provides period-based cost analysis (not cumulative) with support for:
19925
+ * - Multiple time granularities and metrics
19926
+ * - Cross-dimensional filtering
19927
+ * - Percentage change vs comparison periods
19928
+ * - Forward-filled time series
19929
+ *
19930
+ * **Examples:**
19931
+ *
19932
+ * **Basic Weekly Costs:**
19933
+ * ```
19934
+ * GET /api/v2/analytics/financial/?metric=weekly_costs&comparison_days=10
19935
+ * ```
19936
+ *
19937
+ * **Platform & Mentor Filtered:**
19938
+ * ```
19939
+ * # Get total costs for a specific platform and mentor
19940
+ * GET /api/v2/analytics/financial/?metric=total_costs&platform_key=web-app&mentor_unique_id=mentor-123&comparison_days=14
19941
+ * ```
19942
+ *
19943
+ * **Monthly Costs by Provider:**
19944
+ * ```
19945
+ * GET /api/v2/analytics/financial/?metric=monthly_costs&provider=openai&granularity=month&comparison_days=30
19946
+ * ```
19947
+ *
19948
+ * **Daily Costs for Specific User:**
19949
+ * ```
19950
+ * GET /api/v2/analytics/financial/?metric=total_costs&username=user-456&granularity=day&start_date=2025-01-15&end_date=2025-01-21&comparison_days=7
19951
+ * ```
19952
+ *
19953
+ *
19954
+ * **Response Structure:**
19955
+ * ```json
19956
+ * {
19957
+ * "metric": "weekly_costs",
19958
+ * "value": 12.47,
19959
+ * "percentage_change": 8.5,
19960
+ * "overtime": [
19961
+ * {"date": "2025-01-06", "value": 2.89},
19962
+ * {"date": "2025-01-13", "value": 3.12}
19963
+ * ],
19964
+ * "period_info": {
19965
+ * "start_date": "2025-01-01",
19966
+ * "end_date": "2025-01-31",
19967
+ * "period_days": 31
19968
+ * },
19969
+ * "comparison_info": {
19970
+ * "previous_period_value": 11.50,
19971
+ * ...
19972
+ * }
19973
+ * }
19974
+ * ```
19975
+ * @returns BaseFinanceResponse Successful financial metrics response with period-based cost data
19976
+ * @throws ApiError
19977
+ */
19978
+ static analyticsFinancialRetrieve({
19979
+ metric,
19980
+ allTime = false,
19981
+ comparisonDays,
19982
+ endDate,
19983
+ fillMethod = 'zero',
19984
+ granularity = 'day',
19985
+ llmModel,
19986
+ mentorUniqueId,
19987
+ platformKey,
19988
+ provider,
19989
+ showOvertime = true,
19990
+ startDate,
19991
+ username
19992
+ }) {
19993
+ return request(OpenAPI, {
19994
+ method: 'GET',
19995
+ url: '/api/analytics/financial/',
19996
+ query: {
19997
+ 'all_time': allTime,
19998
+ 'comparison_days': comparisonDays,
19999
+ 'end_date': endDate,
20000
+ 'fill_method': fillMethod,
20001
+ 'granularity': granularity,
20002
+ 'llm_model': llmModel,
20003
+ 'mentor_unique_id': mentorUniqueId,
20004
+ 'metric': metric,
20005
+ 'platform_key': platformKey,
20006
+ 'provider': provider,
20007
+ 'show_overtime': showOvertime,
20008
+ 'start_date': startDate,
20009
+ 'username': username
20010
+ },
20011
+ errors: {
20012
+ 400: `Bad Request - Invalid query parameters`,
20013
+ 403: `Forbidden - Insufficient permissions`,
20014
+ 500: `Internal Server Error`
20015
+ }
20016
+ });
20017
+ }
20018
+ /**
20019
+ * Financial Details Analytics API – paginated cost tables with flexible grouping.
20020
+ *
20021
+ * This endpoint returns tabular cost metrics aggregated by the dimension
20022
+ * specified via the `group_by` query parameter. One or more KPI columns
20023
+ * can be requested through the comma-separated `metrics` list while
20024
+ * typical filters (date range, provider, platform_key, user, etc.) narrow the
20025
+ * dataset. Results are paginated with `page` / `limit`.
20026
+ *
20027
+ * **Required query parameters**
20028
+ * - group_by – provider | llm_model | username | user_id | date | session_id
20029
+ * - metrics – csv list of KPI names, e.g. total_cost, sessions, cost_per_session
20030
+ *
20031
+ * **Shared optional filters**
20032
+ * - start_date, end_date – ISO yyyy-mm-dd (ignored when all_time=true)
20033
+ * - platform_key – tenant isolation
20034
+ * - mentor_unique_id – filter to one mentor
20035
+ * - username / user_id – filter to a learner
20036
+ * - provider / llm_model – filter to LLM provider / model
20037
+ * - all_time – true → lifetime totals
20038
+ * - page (default 1), limit (default 50)
20039
+ *
20040
+ * **Examples**
20041
+ * --------
20042
+ * 1. Cost by provider for the last week
20043
+ * ```
20044
+ * GET /api/v2/analytics/financial/details?
20045
+ * group_by=provider&
20046
+ * metrics=total_cost&
20047
+ * start_date=2025-01-01&
20048
+ * end_date=2025-01-07&
20049
+ * page=1&limit=10
20050
+ * ```
20051
+ *
20052
+ * 2. Lifetime cost per user with extra KPIs
20053
+ * ```
20054
+ * GET /api/v2/analytics/financial/details?
20055
+ * group_by=username&
20056
+ * metrics=total_cost,sessions,cost_per_session&
20057
+ * all_time=true&page=1&limit=50
20058
+ * ```
20059
+ * 3. Cost by LLM model with tenant filter
20060
+ * ```
20061
+ * GET /api/v2/analytics/financial/details?
20062
+ * group_by=llm_model&
20063
+ * metrics=total_cost&
20064
+ * platform_key=web-app&
20065
+ * start_date=2025-01-01&end_date=2025-01-31
20066
+ * ```
20067
+ * Response structure
20068
+ * -------------------
20069
+ * ```
20070
+ * {
20071
+ * "page": 1,
20072
+ * "limit": 10,
20073
+ * "total_pages": 1,
20074
+ * "total_records": 3,
20075
+ * "rows": [
20076
+ * {"provider": "openai", "total_cost": 2.5},
20077
+ * {"provider": "anthropic", "total_cost": 1.0},
20078
+ * {"provider": "azure", "total_cost": 0.5}
20079
+ * ],
20080
+ * "metrics": [
20081
+ * {
20082
+ * "name": "total_cost",
20083
+ * "unit": "$",
20084
+ * "description": "Cost for this entity in period"
20085
+ * }
20086
+ * ],
20087
+ * "total_cost": 4.0 // optional grand-total when available
20088
+ * }
20089
+ * ``
20090
+ * @returns FinanceDetailsResponse
20091
+ * @throws ApiError
20092
+ */
20093
+ static analyticsFinancialDetailsRetrieve({
20094
+ groupBy,
20095
+ allTime = false,
20096
+ endDate,
20097
+ limit = 50,
20098
+ llmModel,
20099
+ mentorUniqueId,
20100
+ metrics = 'total_cost',
20101
+ page = 1,
20102
+ platformKey,
20103
+ provider,
20104
+ startDate,
20105
+ username
20106
+ }) {
20107
+ return request(OpenAPI, {
20108
+ method: 'GET',
20109
+ url: '/api/analytics/financial/details/',
20110
+ query: {
20111
+ 'all_time': allTime,
20112
+ 'end_date': endDate,
20113
+ 'group_by': groupBy,
20114
+ 'limit': limit,
20115
+ 'llm_model': llmModel,
20116
+ 'mentor_unique_id': mentorUniqueId,
20117
+ 'metrics': metrics,
20118
+ 'page': page,
20119
+ 'platform_key': platformKey,
20120
+ 'provider': provider,
20121
+ 'start_date': startDate,
20122
+ 'username': username
20123
+ },
20124
+ errors: {
20125
+ 400: `Bad Request – invalid query params`,
20126
+ 500: `Internal Server Error`
20127
+ }
20128
+ });
20129
+ }
20130
+ }
20131
+
21102
20132
  class CareerService {
21103
20133
  /**
21104
20134
  * API endpoint for managing user base locations
@@ -35988,13 +35018,12 @@ class SkillsService {
35988
35018
 
35989
35019
  exports.AiAccountService = AiAccountService;
35990
35020
  exports.AiAnalyticsService = AiAnalyticsService;
35991
- exports.AiBotService = AiBotService;
35992
- exports.AiFinetuningService = AiFinetuningService;
35993
35021
  exports.AiIndexService = AiIndexService;
35994
35022
  exports.AiMarketingService = AiMarketingService;
35995
35023
  exports.AiMediaService = AiMediaService;
35996
35024
  exports.AiMentorService = AiMentorService;
35997
35025
  exports.AiPromptService = AiPromptService;
35026
+ exports.AnalyticsService = AnalyticsService;
35998
35027
  exports.ApiError = ApiError;
35999
35028
  exports.CancelError = CancelError;
36000
35029
  exports.CancelablePromise = CancelablePromise;