@iblai/iblai-api 4.424.1-ai → 4.426.1-ai

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/index.cjs.js +1615 -1
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +1603 -2
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +1615 -1
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +15 -0
  8. package/dist/types/models/ChatSessionActivity.d.ts +15 -0
  9. package/dist/types/models/ChatSessionResponse.d.ts +6 -0
  10. package/dist/types/models/ConversationListItem.d.ts +1 -0
  11. package/dist/types/models/Conversations.d.ts +5 -0
  12. package/dist/types/models/PaginatedChatSessionActivityList.d.ts +6 -0
  13. package/dist/types/models/PatchedConversations.d.ts +5 -0
  14. package/dist/types/models/SessionSummary.d.ts +3 -0
  15. package/dist/types/services/AiAnalyticsService.d.ts +101 -14
  16. package/dist/types/services/V1AgentsService.d.ts +216 -0
  17. package/dist/types/services/V1AuditLogsService.d.ts +46 -0
  18. package/dist/types/services/V1ChatService.d.ts +23 -0
  19. package/dist/types/services/V1ConfigurationsService.d.ts +41 -0
  20. package/dist/types/services/V1DisclaimersService.d.ts +314 -0
  21. package/dist/types/services/V1FeaturesService.d.ts +20 -0
  22. package/dist/types/services/V1LlmsService.d.ts +45 -0
  23. package/dist/types/services/V1MemsearchStatusService.d.ts +15 -0
  24. package/dist/types/services/V1NotificationsService.d.ts +81 -0
  25. package/dist/types/services/V1OrganizationService.d.ts +27 -0
  26. package/dist/types/services/V1ProjectsService.d.ts +160 -0
  27. package/dist/types/services/V1RbacService.d.ts +13 -0
  28. package/dist/types/services/V1SessionsService.d.ts +265 -0
  29. package/package.json +1 -1
  30. package/sdk_schema.yml +10488 -19043
  31. package/src/core/OpenAPI.ts +1 -1
  32. package/src/index.ts +15 -0
  33. package/src/models/ChatSessionActivity.ts +20 -0
  34. package/src/models/ChatSessionResponse.ts +6 -0
  35. package/src/models/ConversationListItem.ts +1 -0
  36. package/src/models/Conversations.ts +5 -0
  37. package/src/models/PaginatedChatSessionActivityList.ts +11 -0
  38. package/src/models/PatchedConversations.ts +5 -0
  39. package/src/models/SessionSummary.ts +3 -0
  40. package/src/services/AiAnalyticsService.ts +155 -0
  41. package/src/services/V1AgentsService.ts +404 -0
  42. package/src/services/V1AuditLogsService.ts +80 -0
  43. package/src/services/V1ChatService.ts +52 -0
  44. package/src/services/V1ConfigurationsService.ts +73 -0
  45. package/src/services/V1DisclaimersService.ts +387 -0
  46. package/src/services/V1FeaturesService.ts +38 -0
  47. package/src/services/V1LlmsService.ts +79 -0
  48. package/src/services/V1MemsearchStatusService.ts +26 -0
  49. package/src/services/V1NotificationsService.ts +136 -0
  50. package/src/services/V1OrganizationService.ts +56 -0
  51. package/src/services/V1ProjectsService.ts +280 -0
  52. package/src/services/V1RbacService.ts +33 -0
  53. package/src/services/V1SessionsService.ts +412 -0
package/dist/index.cjs.js CHANGED
@@ -110,7 +110,7 @@ class CancelablePromise {
110
110
 
111
111
  const OpenAPI = {
112
112
  BASE: 'https://base.manager.iblai.app',
113
- VERSION: '4.424.1-ai-plus',
113
+ VERSION: '4.426.1-ai-plus',
114
114
  WITH_CREDENTIALS: false,
115
115
  CREDENTIALS: 'include',
116
116
  TOKEN: undefined,
@@ -6691,6 +6691,59 @@ class AiAnalyticsService {
6691
6691
  }
6692
6692
  });
6693
6693
  }
6694
+ /**
6695
+ * List a tenant's chat sessions by last activity, without message text.
6696
+ *
6697
+ * Built for incremental sync (#2683): call with `last_message_after` set to
6698
+ * the previous run's time to find chats that changed, then fetch only their
6699
+ * new turns from chat-history with `session_id` + `messages_after`.
6700
+ *
6701
+ * **Query parameters:**
6702
+ * - `mentor_id`: the mentor's `unique_id`
6703
+ * - `last_message_after`: only sessions with a message after this time (or,
6704
+ * with `include_deleted`, deleted after it)
6705
+ * - `include_deleted`: include chats their user deleted (default false)
6706
+ * - `ordering`: `last_message_at` (default, oldest first) or `-last_message_at`
6707
+ * - `start_date` / `end_date`: window on `last_message_at`
6708
+ * - `cursor` / `page_size`: cursor pagination (`next` / `previous` links)
6709
+ *
6710
+ * A session that gets a new message mid-walk moves past the cursor; it is
6711
+ * returned by the next sync window (`last_message_after`), not this one.
6712
+ *
6713
+ * Permissions: `Ibl.Mentor/ChatHistory/list` on the mentor when `mentor_id` is
6714
+ * given (mentor owners included), otherwise on the platform's chat history.
6715
+ * @returns PaginatedChatSessionActivityList
6716
+ * @throws ApiError
6717
+ */
6718
+ static aiAnalyticsOrgsChatSessionsList({
6719
+ org,
6720
+ cursor,
6721
+ endDate,
6722
+ includeDeleted = false,
6723
+ lastMessageAfter,
6724
+ mentorId,
6725
+ ordering = 'last_message_at',
6726
+ pageSize,
6727
+ startDate
6728
+ }) {
6729
+ return request(OpenAPI, {
6730
+ method: 'GET',
6731
+ url: '/api/ai-analytics/orgs/{org}/chat-sessions/',
6732
+ path: {
6733
+ 'org': org
6734
+ },
6735
+ query: {
6736
+ 'cursor': cursor,
6737
+ 'end_date': endDate,
6738
+ 'include_deleted': includeDeleted,
6739
+ 'last_message_after': lastMessageAfter,
6740
+ 'mentor_id': mentorId,
6741
+ 'ordering': ordering,
6742
+ 'page_size': pageSize,
6743
+ 'start_date': startDate
6744
+ }
6745
+ });
6746
+ }
6694
6747
  /**
6695
6748
  * Retrieve summary statistics about mentors.
6696
6749
  *
@@ -6884,9 +6937,11 @@ class AiAnalyticsService {
6884
6937
  endDate,
6885
6938
  filterUserId,
6886
6939
  mentor,
6940
+ messagesAfter,
6887
6941
  page,
6888
6942
  pageSize,
6889
6943
  sentiment,
6944
+ sessionId,
6890
6945
  startDate,
6891
6946
  topics
6892
6947
  }) {
@@ -6901,9 +6956,11 @@ class AiAnalyticsService {
6901
6956
  'end_date': endDate,
6902
6957
  'filter_user_id': filterUserId,
6903
6958
  'mentor': mentor,
6959
+ 'messages_after': messagesAfter,
6904
6960
  'page': page,
6905
6961
  'page_size': pageSize,
6906
6962
  'sentiment': sentiment,
6963
+ 'session_id': sessionId,
6907
6964
  'start_date': startDate,
6908
6965
  'topics': topics
6909
6966
  }
@@ -6928,7 +6985,9 @@ class AiAnalyticsService {
6928
6985
  endDate,
6929
6986
  filterUserId,
6930
6987
  mentor,
6988
+ messagesAfter,
6931
6989
  sentiment,
6990
+ sessionId,
6932
6991
  startDate,
6933
6992
  topics
6934
6993
  }) {
@@ -6943,7 +7002,9 @@ class AiAnalyticsService {
6943
7002
  'end_date': endDate,
6944
7003
  'filter_user_id': filterUserId,
6945
7004
  'mentor': mentor,
7005
+ 'messages_after': messagesAfter,
6946
7006
  'sentiment': sentiment,
7007
+ 'session_id': sessionId,
6947
7008
  'start_date': startDate,
6948
7009
  'topics': topics
6949
7010
  },
@@ -7019,7 +7080,9 @@ class AiAnalyticsService {
7019
7080
  endDate,
7020
7081
  filterUserId,
7021
7082
  mentor,
7083
+ messagesAfter,
7022
7084
  sentiment,
7085
+ sessionId,
7023
7086
  startDate,
7024
7087
  topics
7025
7088
  }) {
@@ -7035,7 +7098,9 @@ class AiAnalyticsService {
7035
7098
  'end_date': endDate,
7036
7099
  'filter_user_id': filterUserId,
7037
7100
  'mentor': mentor,
7101
+ 'messages_after': messagesAfter,
7038
7102
  'sentiment': sentiment,
7103
+ 'session_id': sessionId,
7039
7104
  'start_date': startDate,
7040
7105
  'topics': topics
7041
7106
  }
@@ -7061,7 +7126,9 @@ class AiAnalyticsService {
7061
7126
  endDate,
7062
7127
  filterUserId,
7063
7128
  mentor,
7129
+ messagesAfter,
7064
7130
  sentiment,
7131
+ sessionId,
7065
7132
  startDate,
7066
7133
  topics
7067
7134
  }) {
@@ -7077,7 +7144,9 @@ class AiAnalyticsService {
7077
7144
  'end_date': endDate,
7078
7145
  'filter_user_id': filterUserId,
7079
7146
  'mentor': mentor,
7147
+ 'messages_after': messagesAfter,
7080
7148
  'sentiment': sentiment,
7149
+ 'session_id': sessionId,
7081
7150
  'start_date': startDate,
7082
7151
  'topics': topics
7083
7152
  },
@@ -7104,7 +7173,9 @@ class AiAnalyticsService {
7104
7173
  endDate,
7105
7174
  filterUserId,
7106
7175
  mentor,
7176
+ messagesAfter,
7107
7177
  sentiment,
7178
+ sessionId,
7108
7179
  startDate,
7109
7180
  topics,
7110
7181
  requestBody
@@ -7121,7 +7192,9 @@ class AiAnalyticsService {
7121
7192
  'end_date': endDate,
7122
7193
  'filter_user_id': filterUserId,
7123
7194
  'mentor': mentor,
7195
+ 'messages_after': messagesAfter,
7124
7196
  'sentiment': sentiment,
7197
+ 'session_id': sessionId,
7125
7198
  'start_date': startDate,
7126
7199
  'topics': topics
7127
7200
  },
@@ -7148,7 +7221,9 @@ class AiAnalyticsService {
7148
7221
  endDate,
7149
7222
  filterUserId,
7150
7223
  mentor,
7224
+ messagesAfter,
7151
7225
  sentiment,
7226
+ sessionId,
7152
7227
  startDate,
7153
7228
  topics
7154
7229
  }) {
@@ -7164,7 +7239,9 @@ class AiAnalyticsService {
7164
7239
  'end_date': endDate,
7165
7240
  'filter_user_id': filterUserId,
7166
7241
  'mentor': mentor,
7242
+ 'messages_after': messagesAfter,
7167
7243
  'sentiment': sentiment,
7244
+ 'session_id': sessionId,
7168
7245
  'start_date': startDate,
7169
7246
  'topics': topics
7170
7247
  }
@@ -7653,9 +7730,11 @@ class AiAnalyticsService {
7653
7730
  userId,
7654
7731
  endDate,
7655
7732
  mentor,
7733
+ messagesAfter,
7656
7734
  page,
7657
7735
  pageSize,
7658
7736
  sentiment,
7737
+ sessionId,
7659
7738
  startDate,
7660
7739
  topics
7661
7740
  }) {
@@ -7669,9 +7748,11 @@ class AiAnalyticsService {
7669
7748
  query: {
7670
7749
  'end_date': endDate,
7671
7750
  'mentor': mentor,
7751
+ 'messages_after': messagesAfter,
7672
7752
  'page': page,
7673
7753
  'page_size': pageSize,
7674
7754
  'sentiment': sentiment,
7755
+ 'session_id': sessionId,
7675
7756
  'start_date': startDate,
7676
7757
  'topics': topics
7677
7758
  }
@@ -7821,7 +7902,9 @@ class AiAnalyticsService {
7821
7902
  userId,
7822
7903
  endDate,
7823
7904
  mentor,
7905
+ messagesAfter,
7824
7906
  sentiment,
7907
+ sessionId,
7825
7908
  startDate,
7826
7909
  topics
7827
7910
  }) {
@@ -7836,7 +7919,9 @@ class AiAnalyticsService {
7836
7919
  query: {
7837
7920
  'end_date': endDate,
7838
7921
  'mentor': mentor,
7922
+ 'messages_after': messagesAfter,
7839
7923
  'sentiment': sentiment,
7924
+ 'session_id': sessionId,
7840
7925
  'start_date': startDate,
7841
7926
  'topics': topics
7842
7927
  }
@@ -49995,6 +50080,1522 @@ class SkillsService {
49995
50080
  }
49996
50081
  }
49997
50082
 
50083
+ class V1AgentsService {
50084
+ /**
50085
+ * List mentor-specific memories grouped by category
50086
+ * Requires the `iblai-org` and `iblai-user` context headers.
50087
+ *
50088
+ * List mentor-specific memories grouped by category.
50089
+ * @returns any No response body
50090
+ * @throws ApiError
50091
+ */
50092
+ static v1AgentsMemoriesRetrieve({
50093
+ agentId,
50094
+ email,
50095
+ endDate,
50096
+ myMemory,
50097
+ startDate,
50098
+ userId,
50099
+ iblaiUser
50100
+ }) {
50101
+ return request(OpenAPI, {
50102
+ method: 'GET',
50103
+ url: '/v1/agents/{agent_id}/memories',
50104
+ path: {
50105
+ 'agent_id': agentId
50106
+ },
50107
+ headers: {
50108
+ 'iblai-user': iblaiUser
50109
+ },
50110
+ query: {
50111
+ 'email': email,
50112
+ 'end_date': endDate,
50113
+ 'my_memory': myMemory,
50114
+ 'start_date': startDate,
50115
+ 'user_id': userId
50116
+ }
50117
+ });
50118
+ }
50119
+ /**
50120
+ * Create a new mentor-specific memory
50121
+ * Requires the `iblai-org` and `iblai-user` context headers.
50122
+ *
50123
+ * Create a new mentor-specific memory.
50124
+ * @returns any No response body
50125
+ * @throws ApiError
50126
+ */
50127
+ static v1AgentsMemoriesCreate({
50128
+ agentId,
50129
+ iblaiUser
50130
+ }) {
50131
+ return request(OpenAPI, {
50132
+ method: 'POST',
50133
+ url: '/v1/agents/{agent_id}/memories',
50134
+ path: {
50135
+ 'agent_id': agentId
50136
+ },
50137
+ headers: {
50138
+ 'iblai-user': iblaiUser
50139
+ }
50140
+ });
50141
+ }
50142
+ /**
50143
+ * List mentor-specific memories with pagination
50144
+ * Requires the `iblai-org` and `iblai-user` context headers.
50145
+ *
50146
+ * List mentor-specific memories with pagination.
50147
+ * @returns any No response body
50148
+ * @throws ApiError
50149
+ */
50150
+ static v1AgentsMemoriesListRetrieve({
50151
+ agentId,
50152
+ category,
50153
+ email,
50154
+ endDate,
50155
+ myMemory,
50156
+ startDate,
50157
+ userId,
50158
+ page,
50159
+ pageSize
50160
+ }) {
50161
+ return request(OpenAPI, {
50162
+ method: 'GET',
50163
+ url: '/v1/agents/{agent_id}/memories-list',
50164
+ path: {
50165
+ 'agent_id': agentId
50166
+ },
50167
+ query: {
50168
+ 'category': category,
50169
+ 'email': email,
50170
+ 'end_date': endDate,
50171
+ 'my_memory': myMemory,
50172
+ 'start_date': startDate,
50173
+ 'user_id': userId,
50174
+ 'page': page,
50175
+ 'page_size': pageSize
50176
+ }
50177
+ });
50178
+ }
50179
+ /**
50180
+ * Delete a mentor-specific memory (RBAC ownership-aware)
50181
+ * Requires the `iblai-org` and `iblai-user` context headers.
50182
+ *
50183
+ * Delete a mentor-specific memory (RBAC ownership-aware).
50184
+ * @returns void
50185
+ * @throws ApiError
50186
+ */
50187
+ static v1AgentsMemoriesDestroy({
50188
+ agentId,
50189
+ memoryId,
50190
+ iblaiUser
50191
+ }) {
50192
+ return request(OpenAPI, {
50193
+ method: 'DELETE',
50194
+ url: '/v1/agents/{agent_id}/memories/{memory_id}',
50195
+ path: {
50196
+ 'agent_id': agentId,
50197
+ 'memory_id': memoryId
50198
+ },
50199
+ headers: {
50200
+ 'iblai-user': iblaiUser
50201
+ }
50202
+ });
50203
+ }
50204
+ /**
50205
+ * Update a mentor-specific memory (RBAC ownership-aware)
50206
+ * Requires the `iblai-org` and `iblai-user` context headers.
50207
+ *
50208
+ * Update a mentor-specific memory (RBAC ownership-aware).
50209
+ * @returns any No response body
50210
+ * @throws ApiError
50211
+ */
50212
+ static v1AgentsMemoriesPartialUpdate({
50213
+ agentId,
50214
+ memoryId,
50215
+ iblaiUser
50216
+ }) {
50217
+ return request(OpenAPI, {
50218
+ method: 'PATCH',
50219
+ url: '/v1/agents/{agent_id}/memories/{memory_id}',
50220
+ path: {
50221
+ 'agent_id': agentId,
50222
+ 'memory_id': memoryId
50223
+ },
50224
+ headers: {
50225
+ 'iblai-user': iblaiUser
50226
+ }
50227
+ });
50228
+ }
50229
+ /**
50230
+ * Retrieve Mentor Settings
50231
+ * Requires the `iblai-org` and `iblai-user` context headers.
50232
+ *
50233
+ * Fetch the settings of a mentor within an organization. Only accessible to tenant admins.
50234
+ * @returns MentorSettingsPublic
50235
+ * @throws ApiError
50236
+ */
50237
+ static v1AgentsSettingsRetrieve({
50238
+ agentId,
50239
+ departmentId
50240
+ }) {
50241
+ return request(OpenAPI, {
50242
+ method: 'GET',
50243
+ url: '/v1/agents/{agent_id}/settings',
50244
+ path: {
50245
+ 'agent_id': agentId
50246
+ },
50247
+ query: {
50248
+ 'department_id': departmentId
50249
+ },
50250
+ errors: {
50251
+ 404: `Mentor not found`
50252
+ }
50253
+ });
50254
+ }
50255
+ /**
50256
+ * Update Mentor Settings
50257
+ * Requires the `iblai-org` and `iblai-user` context headers.
50258
+ *
50259
+ * Update various mentor settings including system prompts, tool permissions, and UI configurations.
50260
+ * @returns MentorSettings
50261
+ * @throws ApiError
50262
+ */
50263
+ static v1AgentsSettingsUpdate({
50264
+ agentId,
50265
+ departmentId,
50266
+ formData
50267
+ }) {
50268
+ return request(OpenAPI, {
50269
+ method: 'PUT',
50270
+ url: '/v1/agents/{agent_id}/settings',
50271
+ path: {
50272
+ 'agent_id': agentId
50273
+ },
50274
+ query: {
50275
+ 'department_id': departmentId
50276
+ },
50277
+ formData: formData,
50278
+ mediaType: 'multipart/form-data',
50279
+ errors: {
50280
+ 400: `Invalid request data`,
50281
+ 404: `Mentor not found`
50282
+ }
50283
+ });
50284
+ }
50285
+ /**
50286
+ * Retrieve public mentor settings
50287
+ * Requires the `iblai-org` and `iblai-user` context headers.
50288
+ *
50289
+ * Retrieve public mentor settings.
50290
+ *
50291
+ * Args:
50292
+ * request: HTTP request instance.
50293
+ * user_id: The ID of the user requesting settings.
50294
+ * mentor: The mentor identifier (name, slug, or unique_id).
50295
+ * org: The organization key.
50296
+ *
50297
+ * Returns:
50298
+ * Response containing the mentor settings or an error message.
50299
+ * @returns MentorSettingsPublic
50300
+ * @throws ApiError
50301
+ */
50302
+ static v1AgentsSettingsPublicRetrieve({
50303
+ agentId
50304
+ }) {
50305
+ return request(OpenAPI, {
50306
+ method: 'GET',
50307
+ url: '/v1/agents/{agent_id}/settings/public',
50308
+ path: {
50309
+ 'agent_id': agentId
50310
+ },
50311
+ errors: {
50312
+ 404: `Mentor not found.`
50313
+ }
50314
+ });
50315
+ }
50316
+ /**
50317
+ * Skill assignments nested under a mentor. Full CRUD
50318
+ * Requires the `iblai-org` context header.
50319
+ *
50320
+ * Skill assignments nested under a mentor. Full CRUD.
50321
+ * @returns PaginatedMentorSkillAssignmentList
50322
+ * @throws ApiError
50323
+ */
50324
+ static v1AgentsSkillsList({
50325
+ agentId,
50326
+ enabled,
50327
+ page,
50328
+ pageSize
50329
+ }) {
50330
+ return request(OpenAPI, {
50331
+ method: 'GET',
50332
+ url: '/v1/agents/{agent_id}/skills',
50333
+ path: {
50334
+ 'agent_id': agentId
50335
+ },
50336
+ query: {
50337
+ 'enabled': enabled,
50338
+ 'page': page,
50339
+ 'page_size': pageSize
50340
+ }
50341
+ });
50342
+ }
50343
+ /**
50344
+ * Skill assignments nested under a mentor. Full CRUD
50345
+ * Requires the `iblai-org` context header.
50346
+ *
50347
+ * Skill assignments nested under a mentor. Full CRUD.
50348
+ * @returns MentorSkillAssignment
50349
+ * @throws ApiError
50350
+ */
50351
+ static v1AgentsSkillsCreate({
50352
+ agentId,
50353
+ requestBody
50354
+ }) {
50355
+ return request(OpenAPI, {
50356
+ method: 'POST',
50357
+ url: '/v1/agents/{agent_id}/skills',
50358
+ path: {
50359
+ 'agent_id': agentId
50360
+ },
50361
+ body: requestBody,
50362
+ mediaType: 'application/json'
50363
+ });
50364
+ }
50365
+ }
50366
+
50367
+ class V1AuditLogsService {
50368
+ /**
50369
+ * List platform audit logs
50370
+ * Requires the `iblai-org` context header.
50371
+ *
50372
+ * Retrieve audit log entries scoped to a platform. Includes both model changes (RBAC roles/policies/groups, user-platform links, global configuration) and manual events (login, export, download). Supports filtering by event type, action, actor, and date range.
50373
+ * @returns PaginatedAuditLogEntryList
50374
+ * @throws ApiError
50375
+ */
50376
+ static v1AuditLogsList({
50377
+ action,
50378
+ actorEmail,
50379
+ actorUsername,
50380
+ eventType,
50381
+ fromDate,
50382
+ toDate,
50383
+ page,
50384
+ pageSize
50385
+ }) {
50386
+ return request(OpenAPI, {
50387
+ method: 'GET',
50388
+ url: '/v1/audit-logs',
50389
+ query: {
50390
+ 'action': action,
50391
+ 'actor_email': actorEmail,
50392
+ 'actor_username': actorUsername,
50393
+ 'event_type': eventType,
50394
+ 'from_date': fromDate,
50395
+ 'to_date': toDate,
50396
+ 'page': page,
50397
+ 'page_size': pageSize
50398
+ },
50399
+ errors: {
50400
+ 401: `Authentication required`,
50401
+ 403: `Not permitted to read these audit logs`
50402
+ }
50403
+ });
50404
+ }
50405
+ }
50406
+
50407
+ class V1ChatService {
50408
+ /**
50409
+ * Send a message to an agent; streams the response (SSE). Session, agent, tenant and token come from the body.
50410
+ * @returns string Server-sent event stream of the agent's response.
50411
+ * @throws ApiError
50412
+ */
50413
+ static v1ChatCreate({
50414
+ requestBody
50415
+ }) {
50416
+ return request(OpenAPI, {
50417
+ method: 'POST',
50418
+ url: '/v1/chat',
50419
+ body: requestBody,
50420
+ mediaType: 'application/json'
50421
+ });
50422
+ }
50423
+ /**
50424
+ * Stop an active chat generation
50425
+ * Requires the `iblai-org` and `iblai-user` context headers.
50426
+ *
50427
+ * Stops an ongoing LLM generation for a mentor chat session. The generation_id is returned when starting a chat and can be used to stop the generation before it completes.
50428
+ * @returns any Generation stopped successfully
50429
+ * @throws ApiError
50430
+ */
50431
+ static v1ChatStopCreate({
50432
+ requestBody
50433
+ }) {
50434
+ return request(OpenAPI, {
50435
+ method: 'POST',
50436
+ url: '/v1/chat/stop',
50437
+ body: requestBody,
50438
+ mediaType: 'application/json',
50439
+ errors: {
50440
+ 400: `Validation error`,
50441
+ 404: `Generation not found`,
50442
+ 500: `Internal server error`
50443
+ }
50444
+ });
50445
+ }
50446
+ }
50447
+
50448
+ class V1ConfigurationsService {
50449
+ /**
50450
+ * Return whether the tenant allows user-controlled chat privacy
50451
+ * Requires the `iblai-org` and `iblai-user` context headers.
50452
+ *
50453
+ * Return whether the tenant allows user-controlled chat privacy.
50454
+ * @returns TenantChatPrivacyConfig Tenant chat-privacy configuration
50455
+ * @throws ApiError
50456
+ */
50457
+ static v1ConfigurationsChatPrivacyRetrieve() {
50458
+ return request(OpenAPI, {
50459
+ method: 'GET',
50460
+ url: '/v1/configurations/chat-privacy'
50461
+ });
50462
+ }
50463
+ /**
50464
+ * Flip `ALLOW_USER_CHAT_PRIVACY_CONTROL` for the tenant. Admins only
50465
+ * Requires the `iblai-org` and `iblai-user` context headers.
50466
+ *
50467
+ * Flip `ALLOW_USER_CHAT_PRIVACY_CONTROL` for the tenant. Admins only.
50468
+ * @returns TenantChatPrivacyConfig Updated tenant chat-privacy configuration
50469
+ * @throws ApiError
50470
+ */
50471
+ static v1ConfigurationsChatPrivacyPartialUpdate({
50472
+ requestBody
50473
+ }) {
50474
+ return request(OpenAPI, {
50475
+ method: 'PATCH',
50476
+ url: '/v1/configurations/chat-privacy',
50477
+ body: requestBody,
50478
+ mediaType: 'application/json',
50479
+ errors: {
50480
+ 400: `Invalid request body`,
50481
+ 403: `Caller is not a tenant admin`
50482
+ }
50483
+ });
50484
+ }
50485
+ /**
50486
+ * Get the effective chat-privacy mode for the given (tenant, mentor,
50487
+ * Requires the `iblai-org` and `iblai-user` context headers.
50488
+ *
50489
+ * Get the effective chat-privacy mode for the given (tenant, mentor,
50490
+ * user, session) tuple.
50491
+ *
50492
+ * Args:
50493
+ * request: HTTP request. Query params: `mentor` (unique_id, slug, or
50494
+ * name — unique_id tried first), `session` (uuid).
50495
+ * org: Platform key.
50496
+ * user_id: Username of the user whose effective mode is being resolved.
50497
+ * @returns any Effective chat privacy mode and source tier
50498
+ * @throws ApiError
50499
+ */
50500
+ static v1ConfigurationsChatPrivacyEffectiveRetrieve() {
50501
+ return request(OpenAPI, {
50502
+ method: 'GET',
50503
+ url: '/v1/configurations/chat-privacy/effective',
50504
+ errors: {
50505
+ 404: `User, mentor, or session not found`
50506
+ }
50507
+ });
50508
+ }
50509
+ }
50510
+
50511
+ class V1DisclaimersService {
50512
+ /**
50513
+ * Requires the `iblai-org` and `iblai-user` context headers.
50514
+ *
50515
+ * ViewSet for managing mentor disclaimers.
50516
+ *
50517
+ * This viewset provides endpoints for creating and managing mentor disclaimers, which are
50518
+ * statements or information that mentors need to share with students.
50519
+ *
50520
+ * Permissions:
50521
+ * - Platform administrators have full CRUD access
50522
+ * - Students have read-only access
50523
+ * - Unauthenticated users have no access
50524
+ *
50525
+ * Endpoints:
50526
+ * - GET /api/orgs/{org}/users/{user_id}/disclaimers/ - List all disclaimers
50527
+ * - POST /api/orgs/{org}/users/{user_id}/disclaimers/ - Create a new disclaimer
50528
+ * - GET /api/orgs/{org}/users/{user_id}/disclaimers/{id}/ - Retrieve a specific disclaimer
50529
+ * - PUT/PATCH /api/orgs/{org}/users/{user_id}/disclaimers/{id}/ - Update a disclaimer
50530
+ * - POST /api/orgs/{org}/users/{user_id}/disclaimers/{id}/add_mentor/ - Add mentor to disclaimer
50531
+ * - POST /api/orgs/{org}/users/{user_id}/disclaimers/{id}/remove_mentor/ - Remove mentor from disclaimer
50532
+ *
50533
+ * Query Parameters:
50534
+ * - Supports filtering via DjangoFilterBackend
50535
+ * - See DisclaimerFilterSet for available filters
50536
+ *
50537
+ * Returns:
50538
+ * List endpoint returns paginated results with disclaimer objects:
50539
+ *
50540
+ * ```
50541
+ * {
50542
+ * "count": int,
50543
+ * "next": str,
50544
+ * "previous": str,
50545
+ * "results": [
50546
+ * {
50547
+ * "id": int,
50548
+ * "title": str,
50549
+ * "content": str,
50550
+ * "mentor": str,
50551
+ * "platform": str,
50552
+ * "created_at": datetime,
50553
+ * "updated_at": datetime
50554
+ * },
50555
+ * ...
50556
+ * ]
50557
+ * }
50558
+ * ```
50559
+ *
50560
+ * Detail endpoints return a single disclaimer object with the same structure
50561
+ * @returns PaginatedDisclaimerList
50562
+ * @throws ApiError
50563
+ */
50564
+ static v1DisclaimersList({
50565
+ active,
50566
+ mentorId,
50567
+ ordering,
50568
+ scope,
50569
+ search,
50570
+ page,
50571
+ pageSize
50572
+ }) {
50573
+ return request(OpenAPI, {
50574
+ method: 'GET',
50575
+ url: '/v1/disclaimers',
50576
+ query: {
50577
+ 'active': active,
50578
+ 'mentor_id': mentorId,
50579
+ 'ordering': ordering,
50580
+ 'scope': scope,
50581
+ 'search': search,
50582
+ 'page': page,
50583
+ 'page_size': pageSize
50584
+ }
50585
+ });
50586
+ }
50587
+ /**
50588
+ * Requires the `iblai-org` and `iblai-user` context headers.
50589
+ *
50590
+ * ViewSet for managing mentor disclaimers.
50591
+ *
50592
+ * This viewset provides endpoints for creating and managing mentor disclaimers, which are
50593
+ * statements or information that mentors need to share with students.
50594
+ *
50595
+ * Permissions:
50596
+ * - Platform administrators have full CRUD access
50597
+ * - Students have read-only access
50598
+ * - Unauthenticated users have no access
50599
+ *
50600
+ * Endpoints:
50601
+ * - GET /api/orgs/{org}/users/{user_id}/disclaimers/ - List all disclaimers
50602
+ * - POST /api/orgs/{org}/users/{user_id}/disclaimers/ - Create a new disclaimer
50603
+ * - GET /api/orgs/{org}/users/{user_id}/disclaimers/{id}/ - Retrieve a specific disclaimer
50604
+ * - PUT/PATCH /api/orgs/{org}/users/{user_id}/disclaimers/{id}/ - Update a disclaimer
50605
+ * - POST /api/orgs/{org}/users/{user_id}/disclaimers/{id}/add_mentor/ - Add mentor to disclaimer
50606
+ * - POST /api/orgs/{org}/users/{user_id}/disclaimers/{id}/remove_mentor/ - Remove mentor from disclaimer
50607
+ *
50608
+ * Query Parameters:
50609
+ * - Supports filtering via DjangoFilterBackend
50610
+ * - See DisclaimerFilterSet for available filters
50611
+ *
50612
+ * Returns:
50613
+ * List endpoint returns paginated results with disclaimer objects:
50614
+ *
50615
+ * ```
50616
+ * {
50617
+ * "count": int,
50618
+ * "next": str,
50619
+ * "previous": str,
50620
+ * "results": [
50621
+ * {
50622
+ * "id": int,
50623
+ * "title": str,
50624
+ * "content": str,
50625
+ * "mentor": str,
50626
+ * "platform": str,
50627
+ * "created_at": datetime,
50628
+ * "updated_at": datetime
50629
+ * },
50630
+ * ...
50631
+ * ]
50632
+ * }
50633
+ * ```
50634
+ *
50635
+ * Detail endpoints return a single disclaimer object with the same structure
50636
+ * @returns Disclaimer
50637
+ * @throws ApiError
50638
+ */
50639
+ static v1DisclaimersCreate({
50640
+ requestBody
50641
+ }) {
50642
+ return request(OpenAPI, {
50643
+ method: 'POST',
50644
+ url: '/v1/disclaimers',
50645
+ body: requestBody,
50646
+ mediaType: 'application/json'
50647
+ });
50648
+ }
50649
+ /**
50650
+ * Requires the `iblai-org` and `iblai-user` context headers.
50651
+ *
50652
+ * ViewSet for managing mentor disclaimers.
50653
+ *
50654
+ * This viewset provides endpoints for creating and managing mentor disclaimers, which are
50655
+ * statements or information that mentors need to share with students.
50656
+ *
50657
+ * Permissions:
50658
+ * - Platform administrators have full CRUD access
50659
+ * - Students have read-only access
50660
+ * - Unauthenticated users have no access
50661
+ *
50662
+ * Endpoints:
50663
+ * - GET /api/orgs/{org}/users/{user_id}/disclaimers/ - List all disclaimers
50664
+ * - POST /api/orgs/{org}/users/{user_id}/disclaimers/ - Create a new disclaimer
50665
+ * - GET /api/orgs/{org}/users/{user_id}/disclaimers/{id}/ - Retrieve a specific disclaimer
50666
+ * - PUT/PATCH /api/orgs/{org}/users/{user_id}/disclaimers/{id}/ - Update a disclaimer
50667
+ * - POST /api/orgs/{org}/users/{user_id}/disclaimers/{id}/add_mentor/ - Add mentor to disclaimer
50668
+ * - POST /api/orgs/{org}/users/{user_id}/disclaimers/{id}/remove_mentor/ - Remove mentor from disclaimer
50669
+ *
50670
+ * Query Parameters:
50671
+ * - Supports filtering via DjangoFilterBackend
50672
+ * - See DisclaimerFilterSet for available filters
50673
+ *
50674
+ * Returns:
50675
+ * List endpoint returns paginated results with disclaimer objects:
50676
+ *
50677
+ * ```
50678
+ * {
50679
+ * "count": int,
50680
+ * "next": str,
50681
+ * "previous": str,
50682
+ * "results": [
50683
+ * {
50684
+ * "id": int,
50685
+ * "title": str,
50686
+ * "content": str,
50687
+ * "mentor": str,
50688
+ * "platform": str,
50689
+ * "created_at": datetime,
50690
+ * "updated_at": datetime
50691
+ * },
50692
+ * ...
50693
+ * ]
50694
+ * }
50695
+ * ```
50696
+ *
50697
+ * Detail endpoints return a single disclaimer object with the same structure
50698
+ * @returns Disclaimer
50699
+ * @throws ApiError
50700
+ */
50701
+ static v1DisclaimersRetrieve({
50702
+ id
50703
+ }) {
50704
+ return request(OpenAPI, {
50705
+ method: 'GET',
50706
+ url: '/v1/disclaimers/{id}',
50707
+ path: {
50708
+ 'id': id
50709
+ }
50710
+ });
50711
+ }
50712
+ /**
50713
+ * Requires the `iblai-org` and `iblai-user` context headers.
50714
+ *
50715
+ * ViewSet for managing mentor disclaimers.
50716
+ *
50717
+ * This viewset provides endpoints for creating and managing mentor disclaimers, which are
50718
+ * statements or information that mentors need to share with students.
50719
+ *
50720
+ * Permissions:
50721
+ * - Platform administrators have full CRUD access
50722
+ * - Students have read-only access
50723
+ * - Unauthenticated users have no access
50724
+ *
50725
+ * Endpoints:
50726
+ * - GET /api/orgs/{org}/users/{user_id}/disclaimers/ - List all disclaimers
50727
+ * - POST /api/orgs/{org}/users/{user_id}/disclaimers/ - Create a new disclaimer
50728
+ * - GET /api/orgs/{org}/users/{user_id}/disclaimers/{id}/ - Retrieve a specific disclaimer
50729
+ * - PUT/PATCH /api/orgs/{org}/users/{user_id}/disclaimers/{id}/ - Update a disclaimer
50730
+ * - POST /api/orgs/{org}/users/{user_id}/disclaimers/{id}/add_mentor/ - Add mentor to disclaimer
50731
+ * - POST /api/orgs/{org}/users/{user_id}/disclaimers/{id}/remove_mentor/ - Remove mentor from disclaimer
50732
+ *
50733
+ * Query Parameters:
50734
+ * - Supports filtering via DjangoFilterBackend
50735
+ * - See DisclaimerFilterSet for available filters
50736
+ *
50737
+ * Returns:
50738
+ * List endpoint returns paginated results with disclaimer objects:
50739
+ *
50740
+ * ```
50741
+ * {
50742
+ * "count": int,
50743
+ * "next": str,
50744
+ * "previous": str,
50745
+ * "results": [
50746
+ * {
50747
+ * "id": int,
50748
+ * "title": str,
50749
+ * "content": str,
50750
+ * "mentor": str,
50751
+ * "platform": str,
50752
+ * "created_at": datetime,
50753
+ * "updated_at": datetime
50754
+ * },
50755
+ * ...
50756
+ * ]
50757
+ * }
50758
+ * ```
50759
+ *
50760
+ * Detail endpoints return a single disclaimer object with the same structure
50761
+ * @returns Disclaimer
50762
+ * @throws ApiError
50763
+ */
50764
+ static v1DisclaimersPartialUpdate({
50765
+ id,
50766
+ requestBody
50767
+ }) {
50768
+ return request(OpenAPI, {
50769
+ method: 'PATCH',
50770
+ url: '/v1/disclaimers/{id}',
50771
+ path: {
50772
+ 'id': id
50773
+ },
50774
+ body: requestBody,
50775
+ mediaType: 'application/json'
50776
+ });
50777
+ }
50778
+ /**
50779
+ * Requires the `iblai-org` and `iblai-user` context headers.
50780
+ *
50781
+ * ViewSet for managing mentor disclaimers.
50782
+ *
50783
+ * This viewset provides endpoints for creating and managing mentor disclaimers, which are
50784
+ * statements or information that mentors need to share with students.
50785
+ *
50786
+ * Permissions:
50787
+ * - Platform administrators have full CRUD access
50788
+ * - Students have read-only access
50789
+ * - Unauthenticated users have no access
50790
+ *
50791
+ * Endpoints:
50792
+ * - GET /api/orgs/{org}/users/{user_id}/disclaimers/ - List all disclaimers
50793
+ * - POST /api/orgs/{org}/users/{user_id}/disclaimers/ - Create a new disclaimer
50794
+ * - GET /api/orgs/{org}/users/{user_id}/disclaimers/{id}/ - Retrieve a specific disclaimer
50795
+ * - PUT/PATCH /api/orgs/{org}/users/{user_id}/disclaimers/{id}/ - Update a disclaimer
50796
+ * - POST /api/orgs/{org}/users/{user_id}/disclaimers/{id}/add_mentor/ - Add mentor to disclaimer
50797
+ * - POST /api/orgs/{org}/users/{user_id}/disclaimers/{id}/remove_mentor/ - Remove mentor from disclaimer
50798
+ *
50799
+ * Query Parameters:
50800
+ * - Supports filtering via DjangoFilterBackend
50801
+ * - See DisclaimerFilterSet for available filters
50802
+ *
50803
+ * Returns:
50804
+ * List endpoint returns paginated results with disclaimer objects:
50805
+ *
50806
+ * ```
50807
+ * {
50808
+ * "count": int,
50809
+ * "next": str,
50810
+ * "previous": str,
50811
+ * "results": [
50812
+ * {
50813
+ * "id": int,
50814
+ * "title": str,
50815
+ * "content": str,
50816
+ * "mentor": str,
50817
+ * "platform": str,
50818
+ * "created_at": datetime,
50819
+ * "updated_at": datetime
50820
+ * },
50821
+ * ...
50822
+ * ]
50823
+ * }
50824
+ * ```
50825
+ *
50826
+ * Detail endpoints return a single disclaimer object with the same structure
50827
+ * @returns Disclaimer
50828
+ * @throws ApiError
50829
+ */
50830
+ static v1DisclaimersUpdate({
50831
+ id,
50832
+ requestBody
50833
+ }) {
50834
+ return request(OpenAPI, {
50835
+ method: 'PUT',
50836
+ url: '/v1/disclaimers/{id}',
50837
+ path: {
50838
+ 'id': id
50839
+ },
50840
+ body: requestBody,
50841
+ mediaType: 'application/json'
50842
+ });
50843
+ }
50844
+ }
50845
+
50846
+ class V1FeaturesService {
50847
+ /**
50848
+ * Returns a list of the apps that the user has access to
50849
+ * Returns a list of the apps that the user has access to.
50850
+ * @returns PaginatedUserAppList
50851
+ * @throws ApiError
50852
+ */
50853
+ static v1FeaturesAppsList({
50854
+ page,
50855
+ pageSize
50856
+ }) {
50857
+ return request(OpenAPI, {
50858
+ method: 'GET',
50859
+ url: '/v1/features/apps',
50860
+ query: {
50861
+ 'page': page,
50862
+ 'page_size': pageSize
50863
+ }
50864
+ });
50865
+ }
50866
+ }
50867
+
50868
+ class V1LlmsService {
50869
+ /**
50870
+ * Retrieve available LLMs for a user
50871
+ * Requires the `iblai-org` and `iblai-user` context headers.
50872
+ *
50873
+ * Retrieve available LLMs for a user.
50874
+ * @returns LLMResponse
50875
+ * @throws ApiError
50876
+ */
50877
+ static v1LlmsList({
50878
+ allowMixingTools,
50879
+ includeGlobal = false,
50880
+ isMultimodal,
50881
+ mentorId,
50882
+ mentorUniqueId,
50883
+ minContextWindow,
50884
+ provider = '',
50885
+ search = '',
50886
+ supportsFunctionCalling,
50887
+ view = 'grid'
50888
+ }) {
50889
+ return request(OpenAPI, {
50890
+ method: 'GET',
50891
+ url: '/v1/llms',
50892
+ query: {
50893
+ 'allow_mixing_tools': allowMixingTools,
50894
+ 'include_global': includeGlobal,
50895
+ 'is_multimodal': isMultimodal,
50896
+ 'mentor_id': mentorId,
50897
+ 'mentor_unique_id': mentorUniqueId,
50898
+ 'min_context_window': minContextWindow,
50899
+ 'provider': provider,
50900
+ 'search': search,
50901
+ 'supports_function_calling': supportsFunctionCalling,
50902
+ 'view': view
50903
+ }
50904
+ });
50905
+ }
50906
+ }
50907
+
50908
+ class V1MemsearchStatusService {
50909
+ /**
50910
+ * GET /orgs/{org}/users/{user_id}/memsearch-status/
50911
+ * Requires the `iblai-org` and `iblai-user` context headers.
50912
+ *
50913
+ * GET /orgs/{org}/users/{user_id}/memsearch-status/
50914
+ *
50915
+ * Returns whether memsearch is enabled for the tenant.
50916
+ * Accessible by students and admins.
50917
+ * @returns any Tenant memsearch status
50918
+ * @throws ApiError
50919
+ */
50920
+ static v1MemsearchStatusRetrieve() {
50921
+ return request(OpenAPI, {
50922
+ method: 'GET',
50923
+ url: '/v1/memsearch-status'
50924
+ });
50925
+ }
50926
+ }
50927
+
50928
+ class V1NotificationsService {
50929
+ /**
50930
+ * Get notifications for a user. Requires: Ibl.Notifications/Notification/list
50931
+ * Requires the `iblai-org` and `iblai-user` context headers.
50932
+ *
50933
+ * Get notifications for a user. Requires: Ibl.Notifications/Notification/list
50934
+ * @returns Notification
50935
+ * @throws ApiError
50936
+ */
50937
+ static v1NotificationsRetrieve({
50938
+ channel,
50939
+ endDate,
50940
+ excludeChannel,
50941
+ startDate,
50942
+ status,
50943
+ tags,
50944
+ iblaiUser
50945
+ }) {
50946
+ return request(OpenAPI, {
50947
+ method: 'GET',
50948
+ url: '/v1/notifications',
50949
+ headers: {
50950
+ 'iblai-user': iblaiUser
50951
+ },
50952
+ query: {
50953
+ 'channel': channel,
50954
+ 'end_date': endDate,
50955
+ 'exclude_channel': excludeChannel,
50956
+ 'start_date': startDate,
50957
+ 'status': status,
50958
+ 'tags': tags
50959
+ }
50960
+ });
50961
+ }
50962
+ /**
50963
+ * Update notification status for a user. Requires: Ibl.Notifications/Notification/write
50964
+ * Requires the `iblai-org` and `iblai-user` context headers.
50965
+ *
50966
+ * Update notification status for a user. Requires: Ibl.Notifications/Notification/write
50967
+ * @returns Notification
50968
+ * @throws ApiError
50969
+ */
50970
+ static v1NotificationsUpdate({
50971
+ requestBody,
50972
+ iblaiUser
50973
+ }) {
50974
+ return request(OpenAPI, {
50975
+ method: 'PUT',
50976
+ url: '/v1/notifications',
50977
+ headers: {
50978
+ 'iblai-user': iblaiUser
50979
+ },
50980
+ body: requestBody,
50981
+ mediaType: 'application/json'
50982
+ });
50983
+ }
50984
+ /**
50985
+ * Get notifications count for a user. Requires: Ibl.Notifications/Notification/list
50986
+ * Requires the `iblai-org` and `iblai-user` context headers.
50987
+ *
50988
+ * Get notifications count for a user. Requires: Ibl.Notifications/Notification/list
50989
+ * @returns NotificationCount
50990
+ * @throws ApiError
50991
+ */
50992
+ static v1NotificationsCountRetrieve({
50993
+ channel,
50994
+ status
50995
+ }) {
50996
+ return request(OpenAPI, {
50997
+ method: 'GET',
50998
+ url: '/v1/notifications/count',
50999
+ query: {
51000
+ 'channel': channel,
51001
+ 'status': status
51002
+ }
51003
+ });
51004
+ }
51005
+ }
51006
+
51007
+ class V1OrganizationService {
51008
+ /**
51009
+ * Requires the `iblai-org` context header.
51010
+ * @returns PlatformPublicMetadata
51011
+ * @throws ApiError
51012
+ */
51013
+ static v1OrganizationMetadataRetrieve() {
51014
+ return request(OpenAPI, {
51015
+ method: 'GET',
51016
+ url: '/v1/organization/metadata'
51017
+ });
51018
+ }
51019
+ /**
51020
+ * Requires the `iblai-org` context header.
51021
+ * @returns PlatformPublicMetadata
51022
+ * @throws ApiError
51023
+ */
51024
+ static v1OrganizationMetadataPartialUpdate({
51025
+ requestBody
51026
+ }) {
51027
+ return request(OpenAPI, {
51028
+ method: 'PATCH',
51029
+ url: '/v1/organization/metadata',
51030
+ body: requestBody,
51031
+ mediaType: 'application/json'
51032
+ });
51033
+ }
51034
+ /**
51035
+ * Requires the `iblai-org` context header.
51036
+ * @returns PlatformPublicMetadata
51037
+ * @throws ApiError
51038
+ */
51039
+ static v1OrganizationMetadataUpdate({
51040
+ requestBody
51041
+ }) {
51042
+ return request(OpenAPI, {
51043
+ method: 'PUT',
51044
+ url: '/v1/organization/metadata',
51045
+ body: requestBody,
51046
+ mediaType: 'application/json'
51047
+ });
51048
+ }
51049
+ }
51050
+
51051
+ class V1ProjectsService {
51052
+ /**
51053
+ * List projects
51054
+ * Requires the `iblai-org` and `iblai-user` context headers.
51055
+ *
51056
+ * Retrieve a list of projects with optional filtering and search.
51057
+ * @returns PaginatedProjectList
51058
+ * @throws ApiError
51059
+ */
51060
+ static v1ProjectsList({
51061
+ ordering,
51062
+ search,
51063
+ shared,
51064
+ sort,
51065
+ username,
51066
+ page,
51067
+ pageSize,
51068
+ iblaiUser
51069
+ }) {
51070
+ return request(OpenAPI, {
51071
+ method: 'GET',
51072
+ url: '/v1/projects',
51073
+ headers: {
51074
+ 'iblai-user': iblaiUser
51075
+ },
51076
+ query: {
51077
+ 'ordering': ordering,
51078
+ 'search': search,
51079
+ 'shared': shared,
51080
+ 'sort': sort,
51081
+ 'username': username,
51082
+ 'page': page,
51083
+ 'page_size': pageSize
51084
+ }
51085
+ });
51086
+ }
51087
+ /**
51088
+ * Create a new project
51089
+ * Requires the `iblai-org` and `iblai-user` context headers.
51090
+ *
51091
+ * Create a new project with optional mentors.
51092
+ * @returns Project
51093
+ * @throws ApiError
51094
+ */
51095
+ static v1ProjectsCreate({
51096
+ requestBody,
51097
+ iblaiUser
51098
+ }) {
51099
+ return request(OpenAPI, {
51100
+ method: 'POST',
51101
+ url: '/v1/projects',
51102
+ headers: {
51103
+ 'iblai-user': iblaiUser
51104
+ },
51105
+ body: requestBody,
51106
+ mediaType: 'application/json',
51107
+ errors: {
51108
+ 400: `Invalid data provided`
51109
+ }
51110
+ });
51111
+ }
51112
+ /**
51113
+ * Delete a project
51114
+ * Requires the `iblai-org` and `iblai-user` context headers.
51115
+ *
51116
+ * Delete a project permanently.
51117
+ * @returns void
51118
+ * @throws ApiError
51119
+ */
51120
+ static v1ProjectsDestroy({
51121
+ id,
51122
+ iblaiUser
51123
+ }) {
51124
+ return request(OpenAPI, {
51125
+ method: 'DELETE',
51126
+ url: '/v1/projects/{id}',
51127
+ path: {
51128
+ 'id': id
51129
+ },
51130
+ headers: {
51131
+ 'iblai-user': iblaiUser
51132
+ },
51133
+ errors: {
51134
+ 403: `Permission denied`
51135
+ }
51136
+ });
51137
+ }
51138
+ /**
51139
+ * Retrieve a project
51140
+ * Requires the `iblai-org` and `iblai-user` context headers.
51141
+ *
51142
+ * Get detailed information about a specific project including its mentors.
51143
+ * @returns Project
51144
+ * @throws ApiError
51145
+ */
51146
+ static v1ProjectsRetrieve({
51147
+ id,
51148
+ iblaiUser
51149
+ }) {
51150
+ return request(OpenAPI, {
51151
+ method: 'GET',
51152
+ url: '/v1/projects/{id}',
51153
+ path: {
51154
+ 'id': id
51155
+ },
51156
+ headers: {
51157
+ 'iblai-user': iblaiUser
51158
+ },
51159
+ errors: {
51160
+ 404: `Project not found`
51161
+ }
51162
+ });
51163
+ }
51164
+ /**
51165
+ * Requires the `iblai-org` and `iblai-user` context headers.
51166
+ *
51167
+ * API ViewSet for managing projects.
51168
+ *
51169
+ * Projects are groups of mentors that can be created by anyone (students and tenant admins).
51170
+ * They serve as a way to organize and group related mentors together.
51171
+ *
51172
+ * Projects can be:
51173
+ * - Personal (shared=False): Only visible to their owners
51174
+ * - Shared (shared=True): Visible to platform admins and potentially other users
51175
+ *
51176
+ * Projects are accessed through integrated URLs within the mentor router:
51177
+ * /orgs/<org>/projects/ - All accessible projects in a platform (admin access)
51178
+ * /orgs/<org>/projects/<id>/ - Specific project (admin access)
51179
+ * /orgs/<org>/users/<user_id>/projects/ - User's projects (user access)
51180
+ * /orgs/<org>/users/<user_id>/projects/<id>/ - User's specific project
51181
+ *
51182
+ * Query Parameters:
51183
+ * - username: Filter projects by owner's username (admin routes only)
51184
+ * - shared: Filter by shared status (true/false)
51185
+ * - search: Search in name and description
51186
+ * - sort: Order by field (prefix with - for descending). Example: sort=name or sort=-created_at
51187
+ *
51188
+ * Permissions:
51189
+ * - GET: Accessible to project owners and platform admins (for shared projects)
51190
+ * - POST: Any authenticated user can create projects
51191
+ * - PUT, PATCH, DELETE: Accessible to project owners only
51192
+ * @returns Project
51193
+ * @throws ApiError
51194
+ */
51195
+ static v1ProjectsPartialUpdate({
51196
+ id,
51197
+ iblaiUser,
51198
+ requestBody
51199
+ }) {
51200
+ return request(OpenAPI, {
51201
+ method: 'PATCH',
51202
+ url: '/v1/projects/{id}',
51203
+ path: {
51204
+ 'id': id
51205
+ },
51206
+ headers: {
51207
+ 'iblai-user': iblaiUser
51208
+ },
51209
+ body: requestBody,
51210
+ mediaType: 'application/json'
51211
+ });
51212
+ }
51213
+ /**
51214
+ * Update a project
51215
+ * Requires the `iblai-org` and `iblai-user` context headers.
51216
+ *
51217
+ * Update project information and optionally modify its mentors.
51218
+ * @returns Project
51219
+ * @throws ApiError
51220
+ */
51221
+ static v1ProjectsUpdate({
51222
+ id,
51223
+ requestBody,
51224
+ iblaiUser
51225
+ }) {
51226
+ return request(OpenAPI, {
51227
+ method: 'PUT',
51228
+ url: '/v1/projects/{id}',
51229
+ path: {
51230
+ 'id': id
51231
+ },
51232
+ headers: {
51233
+ 'iblai-user': iblaiUser
51234
+ },
51235
+ body: requestBody,
51236
+ mediaType: 'application/json',
51237
+ errors: {
51238
+ 400: `Invalid data provided`,
51239
+ 403: `Permission denied`
51240
+ }
51241
+ });
51242
+ }
51243
+ }
51244
+
51245
+ class V1RbacService {
51246
+ /**
51247
+ * Check user permissions
51248
+ * Check user permissions for specified resources
51249
+ * @returns any No response body
51250
+ * @throws ApiError
51251
+ */
51252
+ static v1RbacPermissionsCheckCreate({
51253
+ requestBody
51254
+ }) {
51255
+ return request(OpenAPI, {
51256
+ method: 'POST',
51257
+ url: '/v1/rbac/permissions/check',
51258
+ body: requestBody,
51259
+ mediaType: 'application/json',
51260
+ errors: {
51261
+ 400: `Invalid request data`,
51262
+ 401: `Authentication required`,
51263
+ 403: `Permission denied`
51264
+ }
51265
+ });
51266
+ }
51267
+ }
51268
+
51269
+ class V1SessionsService {
51270
+ /**
51271
+ * Retrieve user sessions filtered by start date and end date
51272
+ * Requires the `iblai-org` and `iblai-user` context headers.
51273
+ *
51274
+ * Retrieve user sessions filtered by start date and end date.
51275
+ *
51276
+ * Query Parameters:
51277
+ * start_date (optional, ISO format): Start date for filtering sessions.
51278
+ * end_date (optional, ISO format): End date for filtering sessions.
51279
+ *
51280
+ * Returns:
51281
+ * - 200: List of session IDs with insertion timestamps.
51282
+ * - 400: Invalid request parameters.
51283
+ * @returns ChatHistorySessionId
51284
+ * @throws ApiError
51285
+ */
51286
+ static v1SessionsList({
51287
+ endDate,
51288
+ startDate
51289
+ }) {
51290
+ return request(OpenAPI, {
51291
+ method: 'GET',
51292
+ url: '/v1/sessions',
51293
+ query: {
51294
+ 'end_date': endDate,
51295
+ 'start_date': startDate
51296
+ },
51297
+ errors: {
51298
+ 400: `Bad request`
51299
+ }
51300
+ });
51301
+ }
51302
+ /**
51303
+ * Retrieve or create a chat session with a mentor
51304
+ * Requires the `iblai-org` and `iblai-user` context headers.
51305
+ *
51306
+ * Retrieve or create a chat session with a mentor.
51307
+ *
51308
+ * Passing `null` as `tools` results in using all tools assigned to the mentor.
51309
+ * To specify that no tools be used, pass an empty list.
51310
+ *
51311
+ * Session identity is derived from the request itself, never from user
51312
+ * input: an authenticated caller is attributed via `request.user`
51313
+ * (tenant-scoped to `org`), while an anonymous caller gets no student
51314
+ * linkage and is only permitted on `allow_anonymous` mentors.
51315
+ *
51316
+ * Args:
51317
+ * request: HTTP request containing mentor details.
51318
+ * org: Organization key identifier.
51319
+ *
51320
+ * Returns:
51321
+ * Response: JSON object containing the session ID.
51322
+ *
51323
+ * Raises:
51324
+ * Http404: If the mentor is not found.
51325
+ * ValidationError: If the username is invalid.
51326
+ * ValidationError: If one or more tool slugs are invalid.
51327
+ * @returns ChatSessionResponse
51328
+ * @throws ApiError
51329
+ */
51330
+ static v1SessionsCreate({
51331
+ requestBody,
51332
+ iblaiUser
51333
+ }) {
51334
+ return request(OpenAPI, {
51335
+ method: 'POST',
51336
+ url: '/v1/sessions',
51337
+ headers: {
51338
+ 'iblai-user': iblaiUser
51339
+ },
51340
+ body: requestBody,
51341
+ mediaType: 'application/json'
51342
+ });
51343
+ }
51344
+ /**
51345
+ * Delete a pinned message for a user
51346
+ * Requires the `iblai-org` and `iblai-user` context headers.
51347
+ *
51348
+ * Delete a pinned message for a user.
51349
+ *
51350
+ * Args:
51351
+ * request: The HTTP request containing session details.
51352
+ * org: Organization key identifier.
51353
+ * user_id: The username of the student.
51354
+ *
51355
+ * Returns:
51356
+ * Response: Status 204 on success.
51357
+ *
51358
+ * Raises:
51359
+ * NotFound: If the student or pinned message does not exist.
51360
+ * ValidationError: If request data is invalid.
51361
+ * @returns void
51362
+ * @throws ApiError
51363
+ */
51364
+ static v1SessionsPinnedDestroy() {
51365
+ return request(OpenAPI, {
51366
+ method: 'DELETE',
51367
+ url: '/v1/sessions/pinned'
51368
+ });
51369
+ }
51370
+ /**
51371
+ * Retrieve pinned sessions for a user
51372
+ * Requires the `iblai-org` and `iblai-user` context headers.
51373
+ *
51374
+ * Retrieve pinned sessions for a user.
51375
+ *
51376
+ * Returns a lightweight paginated list of pinned sessions containing:
51377
+ * - session_id: UUID of the session
51378
+ * - mentor_unique_id: UUID of the mentor
51379
+ * - mentor: Object with unique_id (for backward compatibility)
51380
+ * - title: AI-generated session title
51381
+ * - messages: Array containing only the first message
51382
+ *
51383
+ * Query Parameters:
51384
+ * mentor: Filter by mentor unique_id, slug, or name (optional)
51385
+ *
51386
+ * Args:
51387
+ * request: The HTTP request.
51388
+ * org: Organization key identifier.
51389
+ * user_id: The username of the student.
51390
+ *
51391
+ * Returns:
51392
+ * Response: Paginated list of pinned sessions.
51393
+ * @returns SessionSummary
51394
+ * @throws ApiError
51395
+ */
51396
+ static v1SessionsPinnedList({
51397
+ mentor,
51398
+ search,
51399
+ page,
51400
+ pageSize
51401
+ }) {
51402
+ return request(OpenAPI, {
51403
+ method: 'GET',
51404
+ url: '/v1/sessions/pinned',
51405
+ query: {
51406
+ 'mentor': mentor,
51407
+ 'search': search,
51408
+ 'page': page,
51409
+ 'page_size': pageSize
51410
+ }
51411
+ });
51412
+ }
51413
+ /**
51414
+ * Create a pinned message for a user session
51415
+ * Requires the `iblai-org` and `iblai-user` context headers.
51416
+ *
51417
+ * Create a pinned message for a user session.
51418
+ *
51419
+ * Args:
51420
+ * request: The HTTP request containing session details.
51421
+ * org: Organization key identifier.
51422
+ * user_id: The username of the student.
51423
+ *
51424
+ * Returns:
51425
+ * Response: Status 201 on success.
51426
+ *
51427
+ * Raises:
51428
+ * NotFound: If the student does not exist.
51429
+ * ValidationError: If request data is invalid.
51430
+ * @returns PinnedMessageCreate
51431
+ * @throws ApiError
51432
+ */
51433
+ static v1SessionsPinnedCreate({
51434
+ requestBody
51435
+ }) {
51436
+ return request(OpenAPI, {
51437
+ method: 'POST',
51438
+ url: '/v1/sessions/pinned',
51439
+ body: requestBody,
51440
+ mediaType: 'application/json'
51441
+ });
51442
+ }
51443
+ /**
51444
+ * Get recent chat sessions of a user within an organization
51445
+ * Requires the `iblai-org` and `iblai-user` context headers.
51446
+ *
51447
+ * Get recent chat sessions of a user within an organization.
51448
+ * @returns SessionSummary
51449
+ * @throws ApiError
51450
+ */
51451
+ static v1SessionsRecentList({
51452
+ mentor,
51453
+ search,
51454
+ page,
51455
+ pageSize
51456
+ }) {
51457
+ return request(OpenAPI, {
51458
+ method: 'GET',
51459
+ url: '/v1/sessions/recent',
51460
+ query: {
51461
+ 'mentor': mentor,
51462
+ 'search': search,
51463
+ 'page': page,
51464
+ 'page_size': pageSize
51465
+ }
51466
+ });
51467
+ }
51468
+ /**
51469
+ * Update the title of a chat session and its tools
51470
+ * Requires the `iblai-org` and `iblai-user` context headers.
51471
+ *
51472
+ * Update the title of a chat session and its tools
51473
+ * @returns MessageViewUpdatResponse
51474
+ * @throws ApiError
51475
+ */
51476
+ static v1SessionsUpdate({
51477
+ sessionId,
51478
+ requestBody
51479
+ }) {
51480
+ return request(OpenAPI, {
51481
+ method: 'PUT',
51482
+ url: '/v1/sessions/{session_id}',
51483
+ path: {
51484
+ 'session_id': sessionId
51485
+ },
51486
+ body: requestBody,
51487
+ mediaType: 'application/json'
51488
+ });
51489
+ }
51490
+ /**
51491
+ * Retrieve guided prompts for a chat session
51492
+ * Requires the `iblai-org` and `iblai-user` context headers.
51493
+ *
51494
+ * Fetches AI-generated guided prompts for a given session and organization.
51495
+ * @returns GuidedPromptsResponse
51496
+ * @throws ApiError
51497
+ */
51498
+ static v1SessionsGuidedPromptsRetrieve({
51499
+ sessionId,
51500
+ count
51501
+ }) {
51502
+ return request(OpenAPI, {
51503
+ method: 'GET',
51504
+ url: '/v1/sessions/{session_id}/guided-prompts',
51505
+ path: {
51506
+ 'session_id': sessionId
51507
+ },
51508
+ query: {
51509
+ 'count': count
51510
+ }
51511
+ });
51512
+ }
51513
+ /**
51514
+ * Deletes all messages in a chat session
51515
+ * Requires the `iblai-org` and `iblai-user` context headers.
51516
+ *
51517
+ * Deletes all messages in a chat session.
51518
+ * @returns void
51519
+ * @throws ApiError
51520
+ */
51521
+ static v1SessionsMessagesDestroy({
51522
+ sessionId
51523
+ }) {
51524
+ return request(OpenAPI, {
51525
+ method: 'DELETE',
51526
+ url: '/v1/sessions/{session_id}/messages',
51527
+ path: {
51528
+ 'session_id': sessionId
51529
+ }
51530
+ });
51531
+ }
51532
+ /**
51533
+ * Retrieve Chat Messages
51534
+ * Requires the `iblai-org` and `iblai-user` context headers.
51535
+ *
51536
+ * Fetches chat messages for a specific session.
51537
+ * @returns MessageView
51538
+ * @throws ApiError
51539
+ */
51540
+ static v1SessionsMessagesRetrieve({
51541
+ sessionId,
51542
+ page,
51543
+ pageSize
51544
+ }) {
51545
+ return request(OpenAPI, {
51546
+ method: 'GET',
51547
+ url: '/v1/sessions/{session_id}/messages',
51548
+ path: {
51549
+ 'session_id': sessionId
51550
+ },
51551
+ query: {
51552
+ 'page': page,
51553
+ 'page_size': pageSize
51554
+ }
51555
+ });
51556
+ }
51557
+ /**
51558
+ * Retrieve and clean up vector results from a specific session
51559
+ * Requires the `iblai-org` and `iblai-user` context headers.
51560
+ *
51561
+ * Retrieve and clean up vector results from a specific session.
51562
+ *
51563
+ * This endpoint retrieves the documents last used by the mentor to answer
51564
+ * the most recent query from the user in the specified session, and cleans
51565
+ * them to remove any inappropriate content.
51566
+ *
51567
+ * Args:
51568
+ * request: The HTTP request.
51569
+ * org: The organization/tenant identifier.
51570
+ * user_id: The ID of the user making the request.
51571
+ * session_id: The ID of the session to retrieve vector results from.
51572
+ *
51573
+ * Returns:
51574
+ * Response: The cleaned vector results.
51575
+ *
51576
+ * Raises:
51577
+ * BadRequest: If the API key for the cleaning provider is not found.
51578
+ * NotFound: If no vector results are found for the session.
51579
+ * @returns VectorResult
51580
+ * @throws ApiError
51581
+ */
51582
+ static v1SessionsSourcesList({
51583
+ sessionId
51584
+ }) {
51585
+ return request(OpenAPI, {
51586
+ method: 'GET',
51587
+ url: '/v1/sessions/{session_id}/sources',
51588
+ path: {
51589
+ 'session_id': sessionId
51590
+ },
51591
+ errors: {
51592
+ 400: `API key not found`,
51593
+ 404: `Session or results not found`
51594
+ }
51595
+ });
51596
+ }
51597
+ }
51598
+
49998
51599
  exports.AiAccountService = AiAccountService;
49999
51600
  exports.AiAnalyticsService = AiAnalyticsService;
50000
51601
  exports.AiBotService = AiBotService;
@@ -50028,4 +51629,17 @@ exports.ReportsService = ReportsService;
50028
51629
  exports.ScimService = ScimService;
50029
51630
  exports.SearchService = SearchService;
50030
51631
  exports.SkillsService = SkillsService;
51632
+ exports.V1AgentsService = V1AgentsService;
51633
+ exports.V1AuditLogsService = V1AuditLogsService;
51634
+ exports.V1ChatService = V1ChatService;
51635
+ exports.V1ConfigurationsService = V1ConfigurationsService;
51636
+ exports.V1DisclaimersService = V1DisclaimersService;
51637
+ exports.V1FeaturesService = V1FeaturesService;
51638
+ exports.V1LlmsService = V1LlmsService;
51639
+ exports.V1MemsearchStatusService = V1MemsearchStatusService;
51640
+ exports.V1NotificationsService = V1NotificationsService;
51641
+ exports.V1OrganizationService = V1OrganizationService;
51642
+ exports.V1ProjectsService = V1ProjectsService;
51643
+ exports.V1RbacService = V1RbacService;
51644
+ exports.V1SessionsService = V1SessionsService;
50031
51645
  //# sourceMappingURL=index.cjs.js.map