@iblai/data-layer 1.7.6 → 1.8.1
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 +791 -33
- package/dist/index.esm.js +47 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +51 -2
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/features/core/__tests__/rbac-actions-definition.test.d.ts +1 -0
- package/dist/src/features/core/api-slice.d.ts +303 -1
- package/dist/src/features/core/types.d.ts +5 -0
- package/dist/src/features/user/api-slice.d.ts +426 -1
- package/dist/src/features/user/constants.d.ts +5 -0
- package/dist/src/features/user/types.d.ts +22 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -40257,9 +40257,16 @@ const USERS_ENDPOINTS = {
|
|
|
40257
40257
|
service: exports.SERVICES.LMS,
|
|
40258
40258
|
path: (username) => `/api/profile_images/v1/${username}/remove`,
|
|
40259
40259
|
},
|
|
40260
|
+
// Per-user, per-platform metadata (free-form JSON keyed per platform).
|
|
40261
|
+
// `platform_key` is passed as a query param; serves both GET and PATCH.
|
|
40262
|
+
GET_USER_PLATFORM_METADATA: {
|
|
40263
|
+
service: exports.SERVICES.DM,
|
|
40264
|
+
path: () => `/api/core/users/platform-metadata/`,
|
|
40265
|
+
},
|
|
40260
40266
|
};
|
|
40261
40267
|
const USERS_QUERY_KEYS = {
|
|
40262
40268
|
GET_USER_METADATA: () => ['USER_METADATA'],
|
|
40269
|
+
GET_USER_PLATFORM_METADATA: () => ['USER_PLATFORM_METADATA'],
|
|
40263
40270
|
GET_USER_METADATA_EDX: () => ['USER_METADATA_EDX'],
|
|
40264
40271
|
RESET_PASSWORD: () => ['RESET_PASSWORD'],
|
|
40265
40272
|
UPDATE_USER_ROLES: () => ['UPDATE_USER_ROLES'],
|
|
@@ -40276,6 +40283,7 @@ const userApiSlice = react.createApi({
|
|
|
40276
40283
|
tagTypes: [
|
|
40277
40284
|
...USERS_QUERY_KEYS.GET_USER_METADATA(),
|
|
40278
40285
|
...USERS_QUERY_KEYS.GET_USER_METADATA_EDX(),
|
|
40286
|
+
...USERS_QUERY_KEYS.GET_USER_PLATFORM_METADATA(),
|
|
40279
40287
|
featureTags.PLATFORM_USERS,
|
|
40280
40288
|
],
|
|
40281
40289
|
endpoints: (builder) => ({
|
|
@@ -40370,9 +40378,28 @@ const userApiSlice = react.createApi({
|
|
|
40370
40378
|
}),
|
|
40371
40379
|
invalidatesTags: USERS_QUERY_KEYS.GET_USER_METADATA_EDX(),
|
|
40372
40380
|
}),
|
|
40381
|
+
// Per-user, per-platform metadata — a free-form JSON blob keyed by platform.
|
|
40382
|
+
getUserPlatformMetadata: builder.query({
|
|
40383
|
+
query: (args) => ({
|
|
40384
|
+
url: USERS_ENDPOINTS.GET_USER_PLATFORM_METADATA.path(),
|
|
40385
|
+
service: USERS_ENDPOINTS.GET_USER_PLATFORM_METADATA.service,
|
|
40386
|
+
params: { platform_key: args.tenantKey },
|
|
40387
|
+
}),
|
|
40388
|
+
providesTags: USERS_QUERY_KEYS.GET_USER_PLATFORM_METADATA(),
|
|
40389
|
+
}),
|
|
40390
|
+
updateUserPlatformMetadata: builder.mutation({
|
|
40391
|
+
query: (args) => ({
|
|
40392
|
+
url: USERS_ENDPOINTS.GET_USER_PLATFORM_METADATA.path(),
|
|
40393
|
+
service: USERS_ENDPOINTS.GET_USER_PLATFORM_METADATA.service,
|
|
40394
|
+
method: 'PATCH',
|
|
40395
|
+
params: { platform_key: args.tenantKey },
|
|
40396
|
+
body: { metadata: args.metadata },
|
|
40397
|
+
}),
|
|
40398
|
+
invalidatesTags: USERS_QUERY_KEYS.GET_USER_PLATFORM_METADATA(),
|
|
40399
|
+
}),
|
|
40373
40400
|
}),
|
|
40374
40401
|
});
|
|
40375
|
-
const { useGetUserMetadataQuery, useLazyGetUserMetadataQuery, useUpdateUserMetadataMutation, useUpdateUserAccountMutation, useResetPasswordMutation, useUpdateUserRoleMutation, useUploadProfileImageMutation, useRemoveProfileImageMutation, useGetUserMetadataEdxQuery, useLazyGetUserMetadataEdxQuery, useUpdateUserMetadataEdxMutation, } = userApiSlice;
|
|
40402
|
+
const { useGetUserMetadataQuery, useLazyGetUserMetadataQuery, useUpdateUserMetadataMutation, useUpdateUserAccountMutation, useResetPasswordMutation, useUpdateUserRoleMutation, useUploadProfileImageMutation, useRemoveProfileImageMutation, useGetUserMetadataEdxQuery, useLazyGetUserMetadataEdxQuery, useUpdateUserMetadataEdxMutation, useGetUserPlatformMetadataQuery, useLazyGetUserPlatformMetadataQuery, useUpdateUserPlatformMetadataMutation, } = userApiSlice;
|
|
40376
40403
|
|
|
40377
40404
|
const coreApiSlice = react.createApi({
|
|
40378
40405
|
reducerPath: 'coreApiSlice',
|
|
@@ -40643,6 +40670,23 @@ const coreApiSlice = react.createApi({
|
|
|
40643
40670
|
updateRbacMentorAccess: builder.mutation({
|
|
40644
40671
|
...buildEndpointFromDmService(CoreService.coreRbacMentorAccessCreate),
|
|
40645
40672
|
}),
|
|
40673
|
+
getRbacActionsDefinition: builder.query({
|
|
40674
|
+
...buildEndpointFromService(exports.SERVICES.DM, async () => {
|
|
40675
|
+
const url = `${OpenAPI.BASE}/api/core/rbac/actions/definitions/`;
|
|
40676
|
+
const response = await fetch(url, {
|
|
40677
|
+
method: 'GET',
|
|
40678
|
+
headers: OpenAPI.HEADERS,
|
|
40679
|
+
credentials: 'omit',
|
|
40680
|
+
});
|
|
40681
|
+
if (!response.ok) {
|
|
40682
|
+
throw Object.assign(new Error('Failed to fetch RBAC actions definitions'), {
|
|
40683
|
+
status: response.status,
|
|
40684
|
+
body: await response.text(),
|
|
40685
|
+
});
|
|
40686
|
+
}
|
|
40687
|
+
return response.json();
|
|
40688
|
+
}),
|
|
40689
|
+
}),
|
|
40646
40690
|
getRbacTeamsAccessList: builder.query({
|
|
40647
40691
|
...buildEndpointFromDmService(CoreService.coreRbacTeamsAccessList),
|
|
40648
40692
|
providesTags: ['RbacTeamsAccess'],
|
|
@@ -40653,7 +40697,7 @@ const coreApiSlice = react.createApi({
|
|
|
40653
40697
|
}),
|
|
40654
40698
|
}),
|
|
40655
40699
|
});
|
|
40656
|
-
const { useCreateRedirectTokenMutation, useGetPlatformInfoQuery, useGetRbacPermissionsMutation, useLazyGetPlatformInfoQuery, useUpdatePlatformInfoMutation, useUpdateUserStatusMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, useGetRbacGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useGetRbacGroupDetailsQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetRbacRolesQuery, useLazyGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, usePartialUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetDepartmentMemberCheckQuery, useLazyGetDepartmentMemberCheckQuery, useGetRbacMentorAccessListQuery, useUpdateRbacMentorAccessMutation, useGetRbacTeamsAccessListQuery, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, } = coreApiSlice;
|
|
40700
|
+
const { useCreateRedirectTokenMutation, useGetPlatformInfoQuery, useGetRbacPermissionsMutation, useLazyGetPlatformInfoQuery, useUpdatePlatformInfoMutation, useUpdateUserStatusMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, useGetRbacGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useGetRbacGroupDetailsQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetRbacRolesQuery, useLazyGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, usePartialUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetDepartmentMemberCheckQuery, useLazyGetDepartmentMemberCheckQuery, useGetRbacMentorAccessListQuery, useUpdateRbacMentorAccessMutation, useGetRbacActionsDefinitionQuery, useLazyGetRbacActionsDefinitionQuery, useGetRbacTeamsAccessListQuery, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, } = coreApiSlice;
|
|
40657
40701
|
|
|
40658
40702
|
const LOGO_ENDPOINTS = {
|
|
40659
40703
|
light_logo: (platformKey) => getServiceUrl(exports.SERVICES.AXD) + `/api/core/orgs/${platformKey}/logo`,
|
|
@@ -45998,6 +46042,7 @@ exports.useGetPublicMentorsQuery = useGetPublicMentorsQuery;
|
|
|
45998
46042
|
exports.useGetPublicPlatformImageAssetFileUrlQuery = useGetPublicPlatformImageAssetFileUrlQuery;
|
|
45999
46043
|
exports.useGetPublicPlatformMembershipQuery = useGetPublicPlatformMembershipQuery;
|
|
46000
46044
|
exports.useGetPublicPricingQuery = useGetPublicPricingQuery;
|
|
46045
|
+
exports.useGetRbacActionsDefinitionQuery = useGetRbacActionsDefinitionQuery;
|
|
46001
46046
|
exports.useGetRbacGroupDetailsQuery = useGetRbacGroupDetailsQuery;
|
|
46002
46047
|
exports.useGetRbacGroupsQuery = useGetRbacGroupsQuery;
|
|
46003
46048
|
exports.useGetRbacMentorAccessListQuery = useGetRbacMentorAccessListQuery;
|
|
@@ -46065,6 +46110,7 @@ exports.useGetUserMetadataEdxQuery = useGetUserMetadataEdxQuery;
|
|
|
46065
46110
|
exports.useGetUserMetadataQuery = useGetUserMetadataQuery;
|
|
46066
46111
|
exports.useGetUserMetricsPieChartQuery = useGetUserMetricsPieChartQuery;
|
|
46067
46112
|
exports.useGetUserMetricsQuery = useGetUserMetricsQuery;
|
|
46113
|
+
exports.useGetUserPlatformMetadataQuery = useGetUserPlatformMetadataQuery;
|
|
46068
46114
|
exports.useGetUserProjectDetailsQuery = useGetUserProjectDetailsQuery;
|
|
46069
46115
|
exports.useGetUserProjectsQuery = useGetUserProjectsQuery;
|
|
46070
46116
|
exports.useGetUserReportedSkillsQuery = useGetUserReportedSkillsQuery;
|
|
@@ -46191,6 +46237,7 @@ exports.useLazyGetPublicMentorsQuery = useLazyGetPublicMentorsQuery;
|
|
|
46191
46237
|
exports.useLazyGetPublicPlatformImageAssetFileUrlQuery = useLazyGetPublicPlatformImageAssetFileUrlQuery;
|
|
46192
46238
|
exports.useLazyGetPublicPlatformMembershipQuery = useLazyGetPublicPlatformMembershipQuery;
|
|
46193
46239
|
exports.useLazyGetPublicPricingQuery = useLazyGetPublicPricingQuery;
|
|
46240
|
+
exports.useLazyGetRbacActionsDefinitionQuery = useLazyGetRbacActionsDefinitionQuery;
|
|
46194
46241
|
exports.useLazyGetRbacRolesQuery = useLazyGetRbacRolesQuery;
|
|
46195
46242
|
exports.useLazyGetRbacTeamsAccessListQuery = useLazyGetRbacTeamsAccessListQuery;
|
|
46196
46243
|
exports.useLazyGetRecentMessageQuery = useLazyGetRecentMessageQuery;
|
|
@@ -46235,6 +46282,7 @@ exports.useLazyGetUserInvitationsQuery = useLazyGetUserInvitationsQuery;
|
|
|
46235
46282
|
exports.useLazyGetUserMemorySettingsQuery = useLazyGetUserMemorySettingsQuery;
|
|
46236
46283
|
exports.useLazyGetUserMetadataEdxQuery = useLazyGetUserMetadataEdxQuery;
|
|
46237
46284
|
exports.useLazyGetUserMetadataQuery = useLazyGetUserMetadataQuery;
|
|
46285
|
+
exports.useLazyGetUserPlatformMetadataQuery = useLazyGetUserPlatformMetadataQuery;
|
|
46238
46286
|
exports.useLazyGetUserProjectDetailsQuery = useLazyGetUserProjectDetailsQuery;
|
|
46239
46287
|
exports.useLazyGetUserProjectsQuery = useLazyGetUserProjectsQuery;
|
|
46240
46288
|
exports.useLazyGetUserReportedSkillsQuery = useLazyGetUserReportedSkillsQuery;
|
|
@@ -46349,6 +46397,7 @@ exports.useUpdateUserMemorySettingsMutation = useUpdateUserMemorySettingsMutatio
|
|
|
46349
46397
|
exports.useUpdateUserMetadataEdxMutation = useUpdateUserMetadataEdxMutation;
|
|
46350
46398
|
exports.useUpdateUserMetadataMutation = useUpdateUserMetadataMutation;
|
|
46351
46399
|
exports.useUpdateUserOnboardingStatusMutation = useUpdateUserOnboardingStatusMutation;
|
|
46400
|
+
exports.useUpdateUserPlatformMetadataMutation = useUpdateUserPlatformMetadataMutation;
|
|
46352
46401
|
exports.useUpdateUserProjectMutation = useUpdateUserProjectMutation;
|
|
46353
46402
|
exports.useUpdateUserRoleMutation = useUpdateUserRoleMutation;
|
|
46354
46403
|
exports.useUpdateUserStatusMutation = useUpdateUserStatusMutation;
|