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