@kwiz/common 1.0.48 → 1.0.49

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kwiz/common",
3
- "version": "1.0.48",
3
+ "version": "1.0.49",
4
4
  "description": "KWIZ common utilities and helpers for M365 platform",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1351,6 +1351,24 @@ export async function SearchList(siteUrl: string, listIdOrTitle: string, query:
1351
1351
  return mapped;
1352
1352
  } catch (e) {
1353
1353
  logger.error(e);
1354
- return [];
1355
1354
  }
1355
+
1356
+ return [];
1357
+ }
1358
+
1359
+ export async function UpdateListExperience(siteUrl: string, listId: string, experience: ListExperienceOptions) {
1360
+ try {
1361
+ let url = GetListRestUrl(siteUrl, listId);
1362
+ let data = {
1363
+ "ListExperienceOptions": experience
1364
+ };
1365
+ let result = await GetJson(url, JSON.stringify(data), {
1366
+ xHttpMethod: "MERGE",
1367
+ jsonMetadata: jsonTypes.nometadata
1368
+ });
1369
+ return isNullOrEmptyString(result);
1370
+ } catch (e) {
1371
+ logger.error(e);
1372
+ }
1373
+ return false;
1356
1374
  }