jamespot-front-business 1.2.44 → 1.2.46

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/esm.js CHANGED
@@ -557,11 +557,12 @@ const initialState$o = {
557
557
  const fetchBookableAsset = createAsyncThunk('BookableAsset/fetchBookableAsset', async (_, { extra }) => {
558
558
  const filterSpec = {
559
559
  type: 'bookableAsset',
560
- format: 'raw-list',
561
560
  limit: 50,
562
561
  public: true,
563
562
  };
564
- return await extra.jApi.article.list(filterSpec);
563
+ return await extra.jApi.article.list(filterSpec, {
564
+ format: 'raw-list',
565
+ });
565
566
  });
566
567
  const BookableAssetSlice = createSlice({
567
568
  name: 'bookableAsset',
@@ -1424,7 +1425,7 @@ const saveExtraBot = createAsyncThunk('extraBot/save', async ({ extraBot }, { ex
1424
1425
  user = (await extra.jApi.extraBot.updateBot(res.uri)).result;
1425
1426
  }
1426
1427
  else {
1427
- res = (await extra.jApi.article.create({ ...data }, Format.VIEW)).result[0];
1428
+ res = (await extra.jApi.article.create({ ...data }, { format: Format.VIEW })).result[0];
1428
1429
  if (!res) {
1429
1430
  throw new Error('ExtraBot configuration creation failed');
1430
1431
  }
@@ -1726,11 +1727,11 @@ const fetchJLandMaps = createAsyncThunk('/fetchMaps', async ({ jlandUrlBase, ret
1726
1727
  return await new Promise((resolve, reject) => {
1727
1728
  const config = {
1728
1729
  type: 'jlandmap',
1729
- format: 'raw-list',
1730
1730
  };
1731
1731
  const mapsPromise = retrieveAllMaps
1732
1732
  ? jApi.jland.getAllMapsAsAdmin()
1733
1733
  : jApi.article.list(config, {
1734
+ format: 'raw-list',
1734
1735
  formatExtension: ['licenses'],
1735
1736
  });
1736
1737
  mapsPromise
@@ -1968,13 +1969,18 @@ const createMap = createAsyncThunk('mapCreate/create', async ({ map, jlandUrlBas
1968
1969
  const jApi = extra.jApi;
1969
1970
  return await new Promise((resolve, reject) => {
1970
1971
  jApi.article
1971
- .create(payload, 'raw-list')
1972
+ .create(payload, {
1973
+ format: 'raw-list',
1974
+ formatExtension: ['licenses'],
1975
+ })
1972
1976
  .then(async (response) => {
1973
1977
  if (response.error) {
1974
1978
  reject({ error: 1, errorMsg: response.errorMsg });
1975
1979
  return;
1976
1980
  }
1977
- const createdMap = response.result[0];
1981
+ const createdMap = response.result[0]
1982
+ ? { ...response.result[0], urlToJland: undefined }
1983
+ : undefined;
1978
1984
  if (map.assignLicense && createdMap !== undefined) {
1979
1985
  const hostname = await jApi.network.getHostname();
1980
1986
  createdMap.urlToJland = buildUrlToJland(createdMap, hostname, jlandUrlBase);
@@ -2127,11 +2133,12 @@ const fetchPads = createAsyncThunk('magicPad/fetchPads', async (params, { extra,
2127
2133
  return (await extra.jApi.article.list({
2128
2134
  type: 'magicpad',
2129
2135
  limit: state.limit,
2130
- format: 'raw-view',
2131
2136
  page,
2132
2137
  query,
2133
2138
  orders,
2134
2139
  filters,
2140
+ }, {
2141
+ format: 'raw-view',
2135
2142
  })).result;
2136
2143
  }
2137
2144
  catch (error) {
@@ -2262,11 +2269,12 @@ const mediaLibrarySlice = createSlice({
2262
2269
  const fetchMediaLibraryFolders = createAsyncThunk('MediaLibrary/fetchMediaLibraryFolders', async (_, { extra, rejectWithValue, dispatch }) => {
2263
2270
  const args = {
2264
2271
  type: MediaLibraryAppConst.typeMediaLibraryFolder,
2265
- format: 'raw-little',
2266
2272
  limit: 10,
2267
2273
  };
2268
2274
  try {
2269
- return await extra.jApi.article.list(args);
2275
+ return await extra.jApi.article.list(args, {
2276
+ format: 'raw-list',
2277
+ });
2270
2278
  }
2271
2279
  catch (error) {
2272
2280
  dispatch(Toast.actions.error({ label: getErrorMessage(error) }));
@@ -2743,12 +2751,13 @@ const fetchChannels = createAsyncThunk('/fetchChannels', async (page, { extra })
2743
2751
  return await new Promise((resolve, reject) => {
2744
2752
  const config = {
2745
2753
  type: 'tvDisplayChannel',
2746
- format: 'raw-list',
2747
2754
  page: askedPage,
2748
2755
  orders: [{ name: 'id', sort: 'DESC' }],
2749
2756
  };
2750
2757
  jApi.article
2751
- .list(config)
2758
+ .list(config, {
2759
+ format: 'raw-list',
2760
+ })
2752
2761
  .then((channelsResp) => {
2753
2762
  resolve(channelsResp.result);
2754
2763
  })