@iblai/data-layer 1.8.1 → 1.8.3
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.d.ts +2818 -1399
- package/dist/index.esm.js +91 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +102 -0
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/features/chat-privacy/api-slice.d.ts +1398 -0
- package/dist/src/features/chat-privacy/constants.d.ts +13 -0
- package/dist/src/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -41129,6 +41129,92 @@ const credentialsApiSlice = react.createApi({
|
|
|
41129
41129
|
});
|
|
41130
41130
|
const { useGetCredentialsQuery, useLazyGetCredentialsQuery, useGetUserCredentialsQuery, useLazyGetUserCredentialsQuery, useCreateCallCredentialsMutation, useGetIntegrationCredentialsQuery, useLazyGetIntegrationCredentialsQuery, useCreateIntegrationCredentialMutation, useUpdateIntegrationCredentialMutation, useGetLLMCredentialsQuery, useLazyGetLLMCredentialsQuery, useCreateLLMCredentialMutation, useGetConnectedServiceAuthUrlQuery, useLazyGetConnectedServiceAuthUrlQuery, useConnectedServicesCallbackQuery, useLazyConnectedServicesCallbackQuery, useGetUsersAsAssertionsQuery, useLazyGetUsersAsAssertionsQuery, useCreateCredentialAssertionMutation, useGetCredentialsListQuery, useLazyGetCredentialsListQuery, useCreateCredentialMutation, useUpdateCredentialMutation, useDeleteCourseCredentialMutation, useGetProviderConfigQuery, useLazyGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useLazyGetExternalMappingQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, } = credentialsApiSlice;
|
|
41131
41131
|
|
|
41132
|
+
const chatPrivacyApiSlice = react.createApi({
|
|
41133
|
+
reducerPath: 'chatPrivacyApiSlice',
|
|
41134
|
+
baseQuery: iblFetchBaseQuery,
|
|
41135
|
+
tagTypes: ['TenantChatPrivacyConfig', 'UserChatPrivacySettings', 'ChatPrivacyEffective'],
|
|
41136
|
+
endpoints: (builder) => ({
|
|
41137
|
+
getTenantChatPrivacyConfig: builder.query({
|
|
41138
|
+
query: ({ org, userId }) => ({
|
|
41139
|
+
url: `/api/ai-account/orgs/${org}/users/${userId}/chat-privacy-config/`,
|
|
41140
|
+
service: exports.SERVICES.DM,
|
|
41141
|
+
}),
|
|
41142
|
+
providesTags: ['TenantChatPrivacyConfig'],
|
|
41143
|
+
}),
|
|
41144
|
+
updateTenantChatPrivacyConfig: builder.mutation({
|
|
41145
|
+
query: ({ org, userId, requestBody }) => ({
|
|
41146
|
+
url: `/api/ai-account/orgs/${org}/users/${userId}/chat-privacy-config/`,
|
|
41147
|
+
method: 'PATCH',
|
|
41148
|
+
body: requestBody,
|
|
41149
|
+
service: exports.SERVICES.DM,
|
|
41150
|
+
}),
|
|
41151
|
+
invalidatesTags: ['TenantChatPrivacyConfig', 'ChatPrivacyEffective'],
|
|
41152
|
+
}),
|
|
41153
|
+
getUserChatPrivacySettings: builder.query({
|
|
41154
|
+
query: ({ org, userId }) => ({
|
|
41155
|
+
url: `/api/ai-account/orgs/${org}/users/${userId}/chat-privacy-settings/`,
|
|
41156
|
+
service: exports.SERVICES.DM,
|
|
41157
|
+
}),
|
|
41158
|
+
providesTags: ['UserChatPrivacySettings'],
|
|
41159
|
+
}),
|
|
41160
|
+
updateUserChatPrivacySettings: builder.mutation({
|
|
41161
|
+
query: ({ org, userId, requestBody }) => ({
|
|
41162
|
+
url: `/api/ai-account/orgs/${org}/users/${userId}/chat-privacy-settings/`,
|
|
41163
|
+
method: 'POST',
|
|
41164
|
+
body: requestBody,
|
|
41165
|
+
service: exports.SERVICES.DM,
|
|
41166
|
+
}),
|
|
41167
|
+
invalidatesTags: ['UserChatPrivacySettings', 'ChatPrivacyEffective'],
|
|
41168
|
+
}),
|
|
41169
|
+
getChatPrivacyEffective: builder.query({
|
|
41170
|
+
query: ({ org, userId, mentor, session }) => {
|
|
41171
|
+
const params = new URLSearchParams();
|
|
41172
|
+
if (mentor)
|
|
41173
|
+
params.append('mentor', mentor);
|
|
41174
|
+
if (session)
|
|
41175
|
+
params.append('session', session);
|
|
41176
|
+
const qs = params.toString();
|
|
41177
|
+
return {
|
|
41178
|
+
url: `/api/ai-account/orgs/${org}/users/${userId}/chat-privacy-effective/${qs ? `?${qs}` : ''}`,
|
|
41179
|
+
service: exports.SERVICES.DM,
|
|
41180
|
+
};
|
|
41181
|
+
},
|
|
41182
|
+
providesTags: ['ChatPrivacyEffective'],
|
|
41183
|
+
}),
|
|
41184
|
+
// One-way switch: flipping a session to disable_chathistory: true also
|
|
41185
|
+
// removes it from the user's history list (backend nulls Session.student).
|
|
41186
|
+
// Per the spec, true → false is rejected with 400; the user must start a
|
|
41187
|
+
// new conversation to resume history.
|
|
41188
|
+
//
|
|
41189
|
+
// Important — this endpoint lives under `/api/ai-mentor/…`, NOT under
|
|
41190
|
+
// `/api/ai-account/…` like the other chat-privacy endpoints. The
|
|
41191
|
+
// generated typed client is
|
|
41192
|
+
// `AiMentorService.aiMentorOrgsUsersSessionsDisableChathistoryCreate`.
|
|
41193
|
+
// (Both prefixes resolve to the same dm host, so SERVICES.DM is fine.)
|
|
41194
|
+
updateSessionDisableChathistory: builder.mutation({
|
|
41195
|
+
query: ({ org, userId, sessionId, requestBody }) => ({
|
|
41196
|
+
url: `/api/ai-mentor/orgs/${org}/users/${userId}/sessions/${sessionId}/disable-chathistory/`,
|
|
41197
|
+
method: 'POST',
|
|
41198
|
+
body: requestBody,
|
|
41199
|
+
service: exports.SERVICES.DM,
|
|
41200
|
+
}),
|
|
41201
|
+
invalidatesTags: ['ChatPrivacyEffective'],
|
|
41202
|
+
}),
|
|
41203
|
+
}),
|
|
41204
|
+
});
|
|
41205
|
+
const { useGetTenantChatPrivacyConfigQuery, useLazyGetTenantChatPrivacyConfigQuery, useUpdateTenantChatPrivacyConfigMutation, useGetUserChatPrivacySettingsQuery, useLazyGetUserChatPrivacySettingsQuery, useUpdateUserChatPrivacySettingsMutation, useGetChatPrivacyEffectiveQuery, useLazyGetChatPrivacyEffectiveQuery, useUpdateSessionDisableChathistoryMutation, } = chatPrivacyApiSlice;
|
|
41206
|
+
|
|
41207
|
+
const ChatPrivacyModeEnum = {
|
|
41208
|
+
NORMAL: 'normal',
|
|
41209
|
+
ANONYMIZED: 'anonymized',
|
|
41210
|
+
DISABLED: 'disabled',
|
|
41211
|
+
};
|
|
41212
|
+
const CHAT_PRIVACY_MODES = [
|
|
41213
|
+
ChatPrivacyModeEnum.NORMAL,
|
|
41214
|
+
ChatPrivacyModeEnum.ANONYMIZED,
|
|
41215
|
+
ChatPrivacyModeEnum.DISABLED,
|
|
41216
|
+
];
|
|
41217
|
+
|
|
41132
41218
|
const userInvitationsApiSlice = react.createApi({
|
|
41133
41219
|
reducerPath: 'userInvitationsApiSlice',
|
|
41134
41220
|
baseQuery: iblFakeBaseQuery,
|
|
@@ -45495,6 +45581,7 @@ const mentorReducer = {
|
|
|
45495
45581
|
[edxSsoApiSlice.reducerPath]: edxSsoApiSlice.reducer,
|
|
45496
45582
|
[clawApiSlice.reducerPath]: clawApiSlice.reducer,
|
|
45497
45583
|
[watchedGroupsApiSlice.reducerPath]: watchedGroupsApiSlice.reducer,
|
|
45584
|
+
[chatPrivacyApiSlice.reducerPath]: chatPrivacyApiSlice.reducer,
|
|
45498
45585
|
};
|
|
45499
45586
|
const mentorMiddleware = [
|
|
45500
45587
|
mentorApiSlice.middleware,
|
|
@@ -45550,6 +45637,7 @@ const mentorMiddleware = [
|
|
|
45550
45637
|
edxSsoApiSlice.middleware,
|
|
45551
45638
|
clawApiSlice.middleware,
|
|
45552
45639
|
watchedGroupsApiSlice.middleware,
|
|
45640
|
+
chatPrivacyApiSlice.middleware,
|
|
45553
45641
|
];
|
|
45554
45642
|
|
|
45555
45643
|
const skillsReducer = {
|
|
@@ -45592,6 +45680,7 @@ const skillsReducer = {
|
|
|
45592
45680
|
[courseMetadataApiSlice.reducerPath]: courseMetadataApiSlice.reducer,
|
|
45593
45681
|
[edxSsoApiSlice.reducerPath]: edxSsoApiSlice.reducer,
|
|
45594
45682
|
[watchedGroupsApiSlice.reducerPath]: watchedGroupsApiSlice.reducer,
|
|
45683
|
+
[chatPrivacyApiSlice.reducerPath]: chatPrivacyApiSlice.reducer,
|
|
45595
45684
|
};
|
|
45596
45685
|
const skillsMiddleware = [
|
|
45597
45686
|
perLearnerApiSlice.middleware,
|
|
@@ -45633,6 +45722,7 @@ const skillsMiddleware = [
|
|
|
45633
45722
|
courseMetadataApiSlice.middleware,
|
|
45634
45723
|
edxSsoApiSlice.middleware,
|
|
45635
45724
|
watchedGroupsApiSlice.middleware,
|
|
45725
|
+
chatPrivacyApiSlice.middleware,
|
|
45636
45726
|
];
|
|
45637
45727
|
|
|
45638
45728
|
const initializeDataLayer = (dmUrl, lmsUrl, legacyLmsUrl, storageService, httpErrorHandler = {}) => {
|
|
@@ -45650,6 +45740,7 @@ exports.AUDIT_LOGS_REDUCER_PATH = AUDIT_LOGS_REDUCER_PATH;
|
|
|
45650
45740
|
exports.CALL_CONFIGURATIONS_ENDPOINTS = CALL_CONFIGURATIONS_ENDPOINTS;
|
|
45651
45741
|
exports.CALL_CONFIGURATIONS_REDUCER_PATH = CALL_CONFIGURATIONS_REDUCER_PATH;
|
|
45652
45742
|
exports.CALL_CONFIGURATIONS_TAGS = CALL_CONFIGURATIONS_TAGS;
|
|
45743
|
+
exports.CHAT_PRIVACY_MODES = CHAT_PRIVACY_MODES;
|
|
45653
45744
|
exports.CLAW_ENDPOINTS = CLAW_ENDPOINTS;
|
|
45654
45745
|
exports.CLAW_REDUCER_PATH = CLAW_REDUCER_PATH;
|
|
45655
45746
|
exports.CLAW_TAG_TYPES = CLAW_TAG_TYPES;
|
|
@@ -45664,6 +45755,7 @@ exports.CUSTOM_AI_SEARCH_REDUCER_PATH = CUSTOM_AI_SEARCH_REDUCER_PATH;
|
|
|
45664
45755
|
exports.CUSTOM_DOMAIN_ENDPOINTS = CUSTOM_DOMAIN_ENDPOINTS;
|
|
45665
45756
|
exports.CUSTOM_DOMAIN_QUERY_KEYS = CUSTOM_DOMAIN_QUERY_KEYS;
|
|
45666
45757
|
exports.CUSTOM_DOMAIN_REDUCER_PATH = CUSTOM_DOMAIN_REDUCER_PATH;
|
|
45758
|
+
exports.ChatPrivacyModeEnum = ChatPrivacyModeEnum;
|
|
45667
45759
|
exports.DEFAULT_PRIVACY_ACTION = DEFAULT_PRIVACY_ACTION;
|
|
45668
45760
|
exports.DEFAULT_PRIVACY_RESPONSE = DEFAULT_PRIVACY_RESPONSE;
|
|
45669
45761
|
exports.DISCLAIMERS_ENDPOINTS = DISCLAIMERS_ENDPOINTS;
|
|
@@ -45734,6 +45826,7 @@ exports.chatApiSlice = chatApiSlice;
|
|
|
45734
45826
|
exports.chatCustomApiSlice = chatCustomApiSlice;
|
|
45735
45827
|
exports.chatFilesApiSlice = chatFilesApiSlice;
|
|
45736
45828
|
exports.chatHistoryApiSlice = chatHistoryApiSlice;
|
|
45829
|
+
exports.chatPrivacyApiSlice = chatPrivacyApiSlice;
|
|
45737
45830
|
exports.clawApiSlice = clawApiSlice;
|
|
45738
45831
|
exports.coreApiSlice = coreApiSlice;
|
|
45739
45832
|
exports.coreCustomApiSlice = coreCustomApiSlice;
|
|
@@ -45944,6 +46037,7 @@ exports.useGetChatHistoryFilterQuery = useGetChatHistoryFilterQuery;
|
|
|
45944
46037
|
exports.useGetChatHistoryQuery = useGetChatHistoryQuery;
|
|
45945
46038
|
exports.useGetChatMessageTtsQuery = useGetChatMessageTtsQuery;
|
|
45946
46039
|
exports.useGetChatMessagesForSessionQuery = useGetChatMessagesForSessionQuery;
|
|
46040
|
+
exports.useGetChatPrivacyEffectiveQuery = useGetChatPrivacyEffectiveQuery;
|
|
45947
46041
|
exports.useGetClawInstanceQuery = useGetClawInstanceQuery;
|
|
45948
46042
|
exports.useGetClawInstancesQuery = useGetClawInstancesQuery;
|
|
45949
46043
|
exports.useGetClawMentorConfigQuery = useGetClawMentorConfigQuery;
|
|
@@ -46075,6 +46169,7 @@ exports.useGetStripePricingPageSessionQuery = useGetStripePricingPageSessionQuer
|
|
|
46075
46169
|
exports.useGetStudentMentorCreationStatusQuery = useGetStudentMentorCreationStatusQuery;
|
|
46076
46170
|
exports.useGetTemplateDetailsQuery = useGetTemplateDetailsQuery;
|
|
46077
46171
|
exports.useGetTemplatesQuery = useGetTemplatesQuery;
|
|
46172
|
+
exports.useGetTenantChatPrivacyConfigQuery = useGetTenantChatPrivacyConfigQuery;
|
|
46078
46173
|
exports.useGetTenantMetadataQuery = useGetTenantMetadataQuery;
|
|
46079
46174
|
exports.useGetToolsQuery = useGetToolsQuery;
|
|
46080
46175
|
exports.useGetTopStudentsByChatMessagesQuery = useGetTopStudentsByChatMessagesQuery;
|
|
@@ -46092,6 +46187,7 @@ exports.useGetUserAppsQuery = useGetUserAppsQuery;
|
|
|
46092
46187
|
exports.useGetUserAssignedCoursesQuery = useGetUserAssignedCoursesQuery;
|
|
46093
46188
|
exports.useGetUserAssignedPathwaysQuery = useGetUserAssignedPathwaysQuery;
|
|
46094
46189
|
exports.useGetUserCatalogPathwaysQuery = useGetUserCatalogPathwaysQuery;
|
|
46190
|
+
exports.useGetUserChatPrivacySettingsQuery = useGetUserChatPrivacySettingsQuery;
|
|
46095
46191
|
exports.useGetUserCohortsOverTimeQuery = useGetUserCohortsOverTimeQuery;
|
|
46096
46192
|
exports.useGetUserCompaniesQuery = useGetUserCompaniesQuery;
|
|
46097
46193
|
exports.useGetUserCredentialsQuery = useGetUserCredentialsQuery;
|
|
@@ -46156,6 +46252,7 @@ exports.useLazyGetChatHistoryFilterQuery = useLazyGetChatHistoryFilterQuery;
|
|
|
46156
46252
|
exports.useLazyGetChatHistoryQuery = useLazyGetChatHistoryQuery;
|
|
46157
46253
|
exports.useLazyGetChatMessageTtsQuery = useLazyGetChatMessageTtsQuery;
|
|
46158
46254
|
exports.useLazyGetChatMessagesForSessionQuery = useLazyGetChatMessagesForSessionQuery;
|
|
46255
|
+
exports.useLazyGetChatPrivacyEffectiveQuery = useLazyGetChatPrivacyEffectiveQuery;
|
|
46159
46256
|
exports.useLazyGetClawInstanceQuery = useLazyGetClawInstanceQuery;
|
|
46160
46257
|
exports.useLazyGetClawInstancesQuery = useLazyGetClawInstancesQuery;
|
|
46161
46258
|
exports.useLazyGetClawMentorConfigQuery = useLazyGetClawMentorConfigQuery;
|
|
@@ -46260,6 +46357,7 @@ exports.useLazyGetStripeContextQuery = useLazyGetStripeContextQuery;
|
|
|
46260
46357
|
exports.useLazyGetStripePricingPageSessionQuery = useLazyGetStripePricingPageSessionQuery;
|
|
46261
46358
|
exports.useLazyGetTemplateDetailsQuery = useLazyGetTemplateDetailsQuery;
|
|
46262
46359
|
exports.useLazyGetTemplatesQuery = useLazyGetTemplatesQuery;
|
|
46360
|
+
exports.useLazyGetTenantChatPrivacyConfigQuery = useLazyGetTenantChatPrivacyConfigQuery;
|
|
46263
46361
|
exports.useLazyGetTenantMetadataQuery = useLazyGetTenantMetadataQuery;
|
|
46264
46362
|
exports.useLazyGetToolsQuery = useLazyGetToolsQuery;
|
|
46265
46363
|
exports.useLazyGetTrainingDocumentRetrainScheduleQuery = useLazyGetTrainingDocumentRetrainScheduleQuery;
|
|
@@ -46268,6 +46366,7 @@ exports.useLazyGetUserAppsQuery = useLazyGetUserAppsQuery;
|
|
|
46268
46366
|
exports.useLazyGetUserAssignedCoursesQuery = useLazyGetUserAssignedCoursesQuery;
|
|
46269
46367
|
exports.useLazyGetUserAssignedPathwaysQuery = useLazyGetUserAssignedPathwaysQuery;
|
|
46270
46368
|
exports.useLazyGetUserCatalogPathwaysQuery = useLazyGetUserCatalogPathwaysQuery;
|
|
46369
|
+
exports.useLazyGetUserChatPrivacySettingsQuery = useLazyGetUserChatPrivacySettingsQuery;
|
|
46271
46370
|
exports.useLazyGetUserCompaniesQuery = useLazyGetUserCompaniesQuery;
|
|
46272
46371
|
exports.useLazyGetUserCredentialsQuery = useLazyGetUserCredentialsQuery;
|
|
46273
46372
|
exports.useLazyGetUserDesiredSkillsQuery = useLazyGetUserDesiredSkillsQuery;
|
|
@@ -46387,10 +46486,13 @@ exports.useUpdateRbacMentorAccessMutation = useUpdateRbacMentorAccessMutation;
|
|
|
46387
46486
|
exports.useUpdateRbacPolicyMutation = useUpdateRbacPolicyMutation;
|
|
46388
46487
|
exports.useUpdateRbacRoleMutation = useUpdateRbacRoleMutation;
|
|
46389
46488
|
exports.useUpdateRecommendedPromptMutation = useUpdateRecommendedPromptMutation;
|
|
46489
|
+
exports.useUpdateSessionDisableChathistoryMutation = useUpdateSessionDisableChathistoryMutation;
|
|
46390
46490
|
exports.useUpdateShareableLinkMutation = useUpdateShareableLinkMutation;
|
|
46391
46491
|
exports.useUpdateTemplateMutation = useUpdateTemplateMutation;
|
|
46492
|
+
exports.useUpdateTenantChatPrivacyConfigMutation = useUpdateTenantChatPrivacyConfigMutation;
|
|
46392
46493
|
exports.useUpdateTenantMetadataMutation = useUpdateTenantMetadataMutation;
|
|
46393
46494
|
exports.useUpdateUserAccountMutation = useUpdateUserAccountMutation;
|
|
46495
|
+
exports.useUpdateUserChatPrivacySettingsMutation = useUpdateUserChatPrivacySettingsMutation;
|
|
46394
46496
|
exports.useUpdateUserEducationMutation = useUpdateUserEducationMutation;
|
|
46395
46497
|
exports.useUpdateUserExperienceMutation = useUpdateUserExperienceMutation;
|
|
46396
46498
|
exports.useUpdateUserMemorySettingsMutation = useUpdateUserMemorySettingsMutation;
|