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