@iblai/data-layer 1.8.6 → 1.8.7

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.js CHANGED
@@ -40241,8 +40241,8 @@ const USERS_ENDPOINTS = {
40241
40241
  path: () => `/api/ibl/users/manage/metadata/`,
40242
40242
  },
40243
40243
  RESET_PASSWORD: {
40244
- service: exports.SERVICES.LMS,
40245
- path: () => `/account/password`,
40244
+ service: exports.SERVICES.LEGACY_LMS,
40245
+ path: () => `/ibl/edx/account/api/reset-password-token`,
40246
40246
  },
40247
40247
  UPDATE_USER_ROLES: {
40248
40248
  service: exports.SERVICES.LMS,
@@ -40323,12 +40323,26 @@ const userApiSlice = react.createApi({
40323
40323
  invalidatesTags: USERS_QUERY_KEYS.GET_USER_METADATA(),
40324
40324
  }),
40325
40325
  resetPassword: builder.mutation({
40326
- query: (args) => ({
40327
- url: USERS_ENDPOINTS.RESET_PASSWORD.path(),
40328
- service: USERS_ENDPOINTS.RESET_PASSWORD.service,
40329
- body: args,
40330
- method: 'POST',
40331
- }),
40326
+ query: ({ email, platformKey, redirectTo, app }) => {
40327
+ const payload = {
40328
+ email,
40329
+ };
40330
+ if (platformKey) {
40331
+ payload.platform_key = platformKey;
40332
+ }
40333
+ if (redirectTo) {
40334
+ payload.redirect_to = redirectTo;
40335
+ }
40336
+ if (app) {
40337
+ payload.app = app;
40338
+ }
40339
+ return {
40340
+ url: USERS_ENDPOINTS.RESET_PASSWORD.path(),
40341
+ service: USERS_ENDPOINTS.RESET_PASSWORD.service,
40342
+ body: payload,
40343
+ method: 'POST',
40344
+ };
40345
+ },
40332
40346
  }),
40333
40347
  updateUserRole: builder.mutation({
40334
40348
  query: (args) => ({