@uniformdev/next-app-router 20.50.3-alpha.6 → 20.51.1-alpha.14

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/cache.js CHANGED
@@ -335,6 +335,20 @@ async function handleRateLimits(callApi) {
335
335
  }
336
336
  return response;
337
337
  }
338
+ var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
339
+ function rewriteFiltersForApi(filters) {
340
+ return Object.entries(filters != null ? filters : {}).reduce(
341
+ (acc, [key, value]) => {
342
+ const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
343
+ const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
344
+ return {
345
+ ...acc,
346
+ [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
347
+ };
348
+ },
349
+ {}
350
+ );
351
+ }
338
352
  var _url;
339
353
  var _AggregateClient = class _AggregateClient2 extends ApiClient {
340
354
  constructor(options) {
@@ -1118,20 +1132,6 @@ function createLimitPolicy({
1118
1132
  return currentFunc();
1119
1133
  };
1120
1134
  }
1121
- var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
1122
- function rewriteFilters(filters) {
1123
- return Object.entries(filters != null ? filters : {}).reduce(
1124
- (acc, [key, value]) => {
1125
- const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
1126
- const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
1127
- return {
1128
- ...acc,
1129
- [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
1130
- };
1131
- },
1132
- {}
1133
- );
1134
- }
1135
1135
  var _contentTypesUrl;
1136
1136
  var _entriesUrl;
1137
1137
  var _ContentClient = class _ContentClient2 extends ApiClient {
@@ -1148,7 +1148,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1148
1148
  getEntries(options) {
1149
1149
  const { projectId } = this.options;
1150
1150
  const { skipDataResolution, filters, ...params } = options;
1151
- const rewrittenFilters = rewriteFilters(filters);
1151
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1152
1152
  if (skipDataResolution) {
1153
1153
  const url = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl), { ...params, ...rewrittenFilters, projectId });
1154
1154
  return this.apiClient(url);
package/dist/cache.mjs CHANGED
@@ -322,6 +322,20 @@ async function handleRateLimits(callApi) {
322
322
  }
323
323
  return response;
324
324
  }
325
+ var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
326
+ function rewriteFiltersForApi(filters) {
327
+ return Object.entries(filters != null ? filters : {}).reduce(
328
+ (acc, [key, value]) => {
329
+ const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
330
+ const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
331
+ return {
332
+ ...acc,
333
+ [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
334
+ };
335
+ },
336
+ {}
337
+ );
338
+ }
325
339
  var _url;
326
340
  var _AggregateClient = class _AggregateClient2 extends ApiClient {
327
341
  constructor(options) {
@@ -1105,20 +1119,6 @@ function createLimitPolicy({
1105
1119
  return currentFunc();
1106
1120
  };
1107
1121
  }
1108
- var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
1109
- function rewriteFilters(filters) {
1110
- return Object.entries(filters != null ? filters : {}).reduce(
1111
- (acc, [key, value]) => {
1112
- const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
1113
- const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
1114
- return {
1115
- ...acc,
1116
- [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
1117
- };
1118
- },
1119
- {}
1120
- );
1121
- }
1122
1122
  var _contentTypesUrl;
1123
1123
  var _entriesUrl;
1124
1124
  var _ContentClient = class _ContentClient2 extends ApiClient {
@@ -1135,7 +1135,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1135
1135
  getEntries(options) {
1136
1136
  const { projectId } = this.options;
1137
1137
  const { skipDataResolution, filters, ...params } = options;
1138
- const rewrittenFilters = rewriteFilters(filters);
1138
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1139
1139
  if (skipDataResolution) {
1140
1140
  const url = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl), { ...params, ...rewrittenFilters, projectId });
1141
1141
  return this.apiClient(url);
package/dist/component.js CHANGED
@@ -390,6 +390,20 @@ async function handleRateLimits(callApi) {
390
390
  }
391
391
  return response;
392
392
  }
393
+ var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
394
+ function rewriteFiltersForApi(filters) {
395
+ return Object.entries(filters != null ? filters : {}).reduce(
396
+ (acc, [key, value]) => {
397
+ const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
398
+ const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
399
+ return {
400
+ ...acc,
401
+ [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
402
+ };
403
+ },
404
+ {}
405
+ );
406
+ }
393
407
  var _url;
394
408
  var _AggregateClient = class _AggregateClient2 extends ApiClient {
395
409
  constructor(options) {
@@ -982,20 +996,6 @@ var require_retry2 = __commonJS2({
982
996
  });
983
997
  var import_p_limit2 = __toESM2(require_p_limit2());
984
998
  var import_retry = __toESM2(require_retry2(), 1);
985
- var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
986
- function rewriteFilters(filters) {
987
- return Object.entries(filters != null ? filters : {}).reduce(
988
- (acc, [key, value]) => {
989
- const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
990
- const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
991
- return {
992
- ...acc,
993
- [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
994
- };
995
- },
996
- {}
997
- );
998
- }
999
999
  var _contentTypesUrl;
1000
1000
  var _entriesUrl;
1001
1001
  var _ContentClient = class _ContentClient2 extends ApiClient {
@@ -1012,7 +1012,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1012
1012
  getEntries(options) {
1013
1013
  const { projectId } = this.options;
1014
1014
  const { skipDataResolution, filters, ...params } = options;
1015
- const rewrittenFilters = rewriteFilters(filters);
1015
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1016
1016
  if (skipDataResolution) {
1017
1017
  const url = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl), { ...params, ...rewrittenFilters, projectId });
1018
1018
  return this.apiClient(url);
@@ -375,6 +375,20 @@ async function handleRateLimits(callApi) {
375
375
  }
376
376
  return response;
377
377
  }
378
+ var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
379
+ function rewriteFiltersForApi(filters) {
380
+ return Object.entries(filters != null ? filters : {}).reduce(
381
+ (acc, [key, value]) => {
382
+ const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
383
+ const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
384
+ return {
385
+ ...acc,
386
+ [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
387
+ };
388
+ },
389
+ {}
390
+ );
391
+ }
378
392
  var _url;
379
393
  var _AggregateClient = class _AggregateClient2 extends ApiClient {
380
394
  constructor(options) {
@@ -967,20 +981,6 @@ var require_retry2 = __commonJS2({
967
981
  });
968
982
  var import_p_limit2 = __toESM2(require_p_limit2());
969
983
  var import_retry = __toESM2(require_retry2(), 1);
970
- var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
971
- function rewriteFilters(filters) {
972
- return Object.entries(filters != null ? filters : {}).reduce(
973
- (acc, [key, value]) => {
974
- const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
975
- const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
976
- return {
977
- ...acc,
978
- [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
979
- };
980
- },
981
- {}
982
- );
983
- }
984
984
  var _contentTypesUrl;
985
985
  var _entriesUrl;
986
986
  var _ContentClient = class _ContentClient2 extends ApiClient {
@@ -997,7 +997,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
997
997
  getEntries(options) {
998
998
  const { projectId } = this.options;
999
999
  const { skipDataResolution, filters, ...params } = options;
1000
- const rewrittenFilters = rewriteFilters(filters);
1000
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1001
1001
  if (skipDataResolution) {
1002
1002
  const url = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl), { ...params, ...rewrittenFilters, projectId });
1003
1003
  return this.apiClient(url);
package/dist/handler.js CHANGED
@@ -334,6 +334,20 @@ async function handleRateLimits(callApi) {
334
334
  }
335
335
  return response;
336
336
  }
337
+ var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
338
+ function rewriteFiltersForApi(filters) {
339
+ return Object.entries(filters != null ? filters : {}).reduce(
340
+ (acc, [key, value]) => {
341
+ const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
342
+ const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
343
+ return {
344
+ ...acc,
345
+ [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
346
+ };
347
+ },
348
+ {}
349
+ );
350
+ }
337
351
  var _url;
338
352
  var _AggregateClient = class _AggregateClient2 extends ApiClient {
339
353
  constructor(options) {
@@ -1116,20 +1130,6 @@ function createLimitPolicy({
1116
1130
  return currentFunc();
1117
1131
  };
1118
1132
  }
1119
- var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
1120
- function rewriteFilters(filters) {
1121
- return Object.entries(filters != null ? filters : {}).reduce(
1122
- (acc, [key, value]) => {
1123
- const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
1124
- const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
1125
- return {
1126
- ...acc,
1127
- [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
1128
- };
1129
- },
1130
- {}
1131
- );
1132
- }
1133
1133
  var CANVAS_URL = "/api/v1/canvas";
1134
1134
  var CanvasClient = class extends ApiClient {
1135
1135
  constructor(options) {
@@ -1145,7 +1145,7 @@ var CanvasClient = class extends ApiClient {
1145
1145
  async getCompositionList(params = {}) {
1146
1146
  const { projectId } = this.options;
1147
1147
  const { resolveData, filters, ...originParams } = params;
1148
- const rewrittenFilters = rewriteFilters(filters);
1148
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1149
1149
  if (!resolveData) {
1150
1150
  const fetchUri = this.createUrl(CANVAS_URL, { ...originParams, projectId, ...rewrittenFilters });
1151
1151
  return this.apiClient(fetchUri);
@@ -1265,7 +1265,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1265
1265
  getEntries(options) {
1266
1266
  const { projectId } = this.options;
1267
1267
  const { skipDataResolution, filters, ...params } = options;
1268
- const rewrittenFilters = rewriteFilters(filters);
1268
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1269
1269
  if (skipDataResolution) {
1270
1270
  const url = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl), { ...params, ...rewrittenFilters, projectId });
1271
1271
  return this.apiClient(url);
package/dist/handler.mjs CHANGED
@@ -319,6 +319,20 @@ async function handleRateLimits(callApi) {
319
319
  }
320
320
  return response;
321
321
  }
322
+ var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
323
+ function rewriteFiltersForApi(filters) {
324
+ return Object.entries(filters != null ? filters : {}).reduce(
325
+ (acc, [key, value]) => {
326
+ const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
327
+ const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
328
+ return {
329
+ ...acc,
330
+ [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
331
+ };
332
+ },
333
+ {}
334
+ );
335
+ }
322
336
  var _url;
323
337
  var _AggregateClient = class _AggregateClient2 extends ApiClient {
324
338
  constructor(options) {
@@ -1101,20 +1115,6 @@ function createLimitPolicy({
1101
1115
  return currentFunc();
1102
1116
  };
1103
1117
  }
1104
- var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
1105
- function rewriteFilters(filters) {
1106
- return Object.entries(filters != null ? filters : {}).reduce(
1107
- (acc, [key, value]) => {
1108
- const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
1109
- const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
1110
- return {
1111
- ...acc,
1112
- [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
1113
- };
1114
- },
1115
- {}
1116
- );
1117
- }
1118
1118
  var CANVAS_URL = "/api/v1/canvas";
1119
1119
  var CanvasClient = class extends ApiClient {
1120
1120
  constructor(options) {
@@ -1130,7 +1130,7 @@ var CanvasClient = class extends ApiClient {
1130
1130
  async getCompositionList(params = {}) {
1131
1131
  const { projectId } = this.options;
1132
1132
  const { resolveData, filters, ...originParams } = params;
1133
- const rewrittenFilters = rewriteFilters(filters);
1133
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1134
1134
  if (!resolveData) {
1135
1135
  const fetchUri = this.createUrl(CANVAS_URL, { ...originParams, projectId, ...rewrittenFilters });
1136
1136
  return this.apiClient(fetchUri);
@@ -1250,7 +1250,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1250
1250
  getEntries(options) {
1251
1251
  const { projectId } = this.options;
1252
1252
  const { skipDataResolution, filters, ...params } = options;
1253
- const rewrittenFilters = rewriteFilters(filters);
1253
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1254
1254
  if (skipDataResolution) {
1255
1255
  const url = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl), { ...params, ...rewrittenFilters, projectId });
1256
1256
  return this.apiClient(url);
package/dist/index.esm.js CHANGED
@@ -325,6 +325,20 @@ async function handleRateLimits(callApi) {
325
325
  }
326
326
  return response;
327
327
  }
328
+ var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
329
+ function rewriteFiltersForApi(filters) {
330
+ return Object.entries(filters != null ? filters : {}).reduce(
331
+ (acc, [key, value]) => {
332
+ const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
333
+ const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
334
+ return {
335
+ ...acc,
336
+ [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
337
+ };
338
+ },
339
+ {}
340
+ );
341
+ }
328
342
  var _url;
329
343
  var _AggregateClient = class _AggregateClient2 extends ApiClient {
330
344
  constructor(options) {
@@ -1108,20 +1122,6 @@ function createLimitPolicy({
1108
1122
  return currentFunc();
1109
1123
  };
1110
1124
  }
1111
- var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
1112
- function rewriteFilters(filters) {
1113
- return Object.entries(filters != null ? filters : {}).reduce(
1114
- (acc, [key, value]) => {
1115
- const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
1116
- const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
1117
- return {
1118
- ...acc,
1119
- [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
1120
- };
1121
- },
1122
- {}
1123
- );
1124
- }
1125
1125
  var CANVAS_URL = "/api/v1/canvas";
1126
1126
  var CanvasClient = class extends ApiClient {
1127
1127
  constructor(options) {
@@ -1137,7 +1137,7 @@ var CanvasClient = class extends ApiClient {
1137
1137
  async getCompositionList(params = {}) {
1138
1138
  const { projectId } = this.options;
1139
1139
  const { resolveData, filters, ...originParams } = params;
1140
- const rewrittenFilters = rewriteFilters(filters);
1140
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1141
1141
  if (!resolveData) {
1142
1142
  const fetchUri = this.createUrl(CANVAS_URL, { ...originParams, projectId, ...rewrittenFilters });
1143
1143
  return this.apiClient(fetchUri);
@@ -1257,7 +1257,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1257
1257
  getEntries(options) {
1258
1258
  const { projectId } = this.options;
1259
1259
  const { skipDataResolution, filters, ...params } = options;
1260
- const rewrittenFilters = rewriteFilters(filters);
1260
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1261
1261
  if (skipDataResolution) {
1262
1262
  const url = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl), { ...params, ...rewrittenFilters, projectId });
1263
1263
  return this.apiClient(url);
package/dist/index.js CHANGED
@@ -352,6 +352,20 @@ async function handleRateLimits(callApi) {
352
352
  }
353
353
  return response;
354
354
  }
355
+ var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
356
+ function rewriteFiltersForApi(filters) {
357
+ return Object.entries(filters != null ? filters : {}).reduce(
358
+ (acc, [key, value]) => {
359
+ const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
360
+ const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
361
+ return {
362
+ ...acc,
363
+ [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
364
+ };
365
+ },
366
+ {}
367
+ );
368
+ }
355
369
  var _url;
356
370
  var _AggregateClient = class _AggregateClient2 extends ApiClient {
357
371
  constructor(options) {
@@ -1135,20 +1149,6 @@ function createLimitPolicy({
1135
1149
  return currentFunc();
1136
1150
  };
1137
1151
  }
1138
- var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
1139
- function rewriteFilters(filters) {
1140
- return Object.entries(filters != null ? filters : {}).reduce(
1141
- (acc, [key, value]) => {
1142
- const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
1143
- const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
1144
- return {
1145
- ...acc,
1146
- [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
1147
- };
1148
- },
1149
- {}
1150
- );
1151
- }
1152
1152
  var CANVAS_URL = "/api/v1/canvas";
1153
1153
  var CanvasClient = class extends ApiClient {
1154
1154
  constructor(options) {
@@ -1164,7 +1164,7 @@ var CanvasClient = class extends ApiClient {
1164
1164
  async getCompositionList(params = {}) {
1165
1165
  const { projectId } = this.options;
1166
1166
  const { resolveData, filters, ...originParams } = params;
1167
- const rewrittenFilters = rewriteFilters(filters);
1167
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1168
1168
  if (!resolveData) {
1169
1169
  const fetchUri = this.createUrl(CANVAS_URL, { ...originParams, projectId, ...rewrittenFilters });
1170
1170
  return this.apiClient(fetchUri);
@@ -1284,7 +1284,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1284
1284
  getEntries(options) {
1285
1285
  const { projectId } = this.options;
1286
1286
  const { skipDataResolution, filters, ...params } = options;
1287
- const rewrittenFilters = rewriteFilters(filters);
1287
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1288
1288
  if (skipDataResolution) {
1289
1289
  const url = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl), { ...params, ...rewrittenFilters, projectId });
1290
1290
  return this.apiClient(url);
package/dist/index.mjs CHANGED
@@ -325,6 +325,20 @@ async function handleRateLimits(callApi) {
325
325
  }
326
326
  return response;
327
327
  }
328
+ var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
329
+ function rewriteFiltersForApi(filters) {
330
+ return Object.entries(filters != null ? filters : {}).reduce(
331
+ (acc, [key, value]) => {
332
+ const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
333
+ const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
334
+ return {
335
+ ...acc,
336
+ [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
337
+ };
338
+ },
339
+ {}
340
+ );
341
+ }
328
342
  var _url;
329
343
  var _AggregateClient = class _AggregateClient2 extends ApiClient {
330
344
  constructor(options) {
@@ -1108,20 +1122,6 @@ function createLimitPolicy({
1108
1122
  return currentFunc();
1109
1123
  };
1110
1124
  }
1111
- var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
1112
- function rewriteFilters(filters) {
1113
- return Object.entries(filters != null ? filters : {}).reduce(
1114
- (acc, [key, value]) => {
1115
- const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
1116
- const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
1117
- return {
1118
- ...acc,
1119
- [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
1120
- };
1121
- },
1122
- {}
1123
- );
1124
- }
1125
1125
  var CANVAS_URL = "/api/v1/canvas";
1126
1126
  var CanvasClient = class extends ApiClient {
1127
1127
  constructor(options) {
@@ -1137,7 +1137,7 @@ var CanvasClient = class extends ApiClient {
1137
1137
  async getCompositionList(params = {}) {
1138
1138
  const { projectId } = this.options;
1139
1139
  const { resolveData, filters, ...originParams } = params;
1140
- const rewrittenFilters = rewriteFilters(filters);
1140
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1141
1141
  if (!resolveData) {
1142
1142
  const fetchUri = this.createUrl(CANVAS_URL, { ...originParams, projectId, ...rewrittenFilters });
1143
1143
  return this.apiClient(fetchUri);
@@ -1257,7 +1257,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1257
1257
  getEntries(options) {
1258
1258
  const { projectId } = this.options;
1259
1259
  const { skipDataResolution, filters, ...params } = options;
1260
- const rewrittenFilters = rewriteFilters(filters);
1260
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1261
1261
  if (skipDataResolution) {
1262
1262
  const url = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl), { ...params, ...rewrittenFilters, projectId });
1263
1263
  return this.apiClient(url);
@@ -530,6 +530,20 @@ async function handleRateLimits(callApi) {
530
530
  }
531
531
  return response;
532
532
  }
533
+ var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
534
+ function rewriteFiltersForApi(filters) {
535
+ return Object.entries(filters != null ? filters : {}).reduce(
536
+ (acc, [key, value]) => {
537
+ const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
538
+ const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
539
+ return {
540
+ ...acc,
541
+ [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
542
+ };
543
+ },
544
+ {}
545
+ );
546
+ }
533
547
  var _url;
534
548
  var _AggregateClient = class _AggregateClient2 extends ApiClient {
535
549
  constructor(options) {
@@ -1313,20 +1327,6 @@ function createLimitPolicy({
1313
1327
  return currentFunc();
1314
1328
  };
1315
1329
  }
1316
- var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
1317
- function rewriteFilters(filters) {
1318
- return Object.entries(filters != null ? filters : {}).reduce(
1319
- (acc, [key, value]) => {
1320
- const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
1321
- const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
1322
- return {
1323
- ...acc,
1324
- [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
1325
- };
1326
- },
1327
- {}
1328
- );
1329
- }
1330
1330
  var CANVAS_URL = "/api/v1/canvas";
1331
1331
  var CanvasClient = class extends ApiClient {
1332
1332
  constructor(options) {
@@ -1342,7 +1342,7 @@ var CanvasClient = class extends ApiClient {
1342
1342
  async getCompositionList(params = {}) {
1343
1343
  const { projectId } = this.options;
1344
1344
  const { resolveData, filters, ...originParams } = params;
1345
- const rewrittenFilters = rewriteFilters(filters);
1345
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1346
1346
  if (!resolveData) {
1347
1347
  const fetchUri = this.createUrl(CANVAS_URL, { ...originParams, projectId, ...rewrittenFilters });
1348
1348
  return this.apiClient(fetchUri);
@@ -1462,7 +1462,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1462
1462
  getEntries(options) {
1463
1463
  const { projectId } = this.options;
1464
1464
  const { skipDataResolution, filters, ...params } = options;
1465
- const rewrittenFilters = rewriteFilters(filters);
1465
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1466
1466
  if (skipDataResolution) {
1467
1467
  const url = this.createUrl(__privateGet3(_ContentClient2, _entriesUrl), { ...params, ...rewrittenFilters, projectId });
1468
1468
  return this.apiClient(url);
@@ -515,6 +515,20 @@ async function handleRateLimits(callApi) {
515
515
  }
516
516
  return response;
517
517
  }
518
+ var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
519
+ function rewriteFiltersForApi(filters) {
520
+ return Object.entries(filters != null ? filters : {}).reduce(
521
+ (acc, [key, value]) => {
522
+ const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
523
+ const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
524
+ return {
525
+ ...acc,
526
+ [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
527
+ };
528
+ },
529
+ {}
530
+ );
531
+ }
518
532
  var _url;
519
533
  var _AggregateClient = class _AggregateClient2 extends ApiClient {
520
534
  constructor(options) {
@@ -1298,20 +1312,6 @@ function createLimitPolicy({
1298
1312
  return currentFunc();
1299
1313
  };
1300
1314
  }
1301
- var isPlainObject = (obj) => typeof obj === "object" && obj !== null && !Array.isArray(obj);
1302
- function rewriteFilters(filters) {
1303
- return Object.entries(filters != null ? filters : {}).reduce(
1304
- (acc, [key, value]) => {
1305
- const lhs = `filters.${key}` + (isPlainObject(value) ? `[${Object.keys(value)[0]}]` : "");
1306
- const rhs = isPlainObject(value) ? Object.values(value)[0] : value;
1307
- return {
1308
- ...acc,
1309
- [lhs]: Array.isArray(rhs) ? rhs.map((v) => `${v}`.trim()).join(",") : `${rhs}`.trim()
1310
- };
1311
- },
1312
- {}
1313
- );
1314
- }
1315
1315
  var CANVAS_URL = "/api/v1/canvas";
1316
1316
  var CanvasClient = class extends ApiClient {
1317
1317
  constructor(options) {
@@ -1327,7 +1327,7 @@ var CanvasClient = class extends ApiClient {
1327
1327
  async getCompositionList(params = {}) {
1328
1328
  const { projectId } = this.options;
1329
1329
  const { resolveData, filters, ...originParams } = params;
1330
- const rewrittenFilters = rewriteFilters(filters);
1330
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1331
1331
  if (!resolveData) {
1332
1332
  const fetchUri = this.createUrl(CANVAS_URL, { ...originParams, projectId, ...rewrittenFilters });
1333
1333
  return this.apiClient(fetchUri);
@@ -1447,7 +1447,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1447
1447
  getEntries(options) {
1448
1448
  const { projectId } = this.options;
1449
1449
  const { skipDataResolution, filters, ...params } = options;
1450
- const rewrittenFilters = rewriteFilters(filters);
1450
+ const rewrittenFilters = rewriteFiltersForApi(filters);
1451
1451
  if (skipDataResolution) {
1452
1452
  const url = this.createUrl(__privateGet3(_ContentClient2, _entriesUrl), { ...params, ...rewrittenFilters, projectId });
1453
1453
  return this.apiClient(url);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/next-app-router",
3
- "version": "20.50.3-alpha.6+3ffd0d8a44",
3
+ "version": "20.51.1-alpha.14+1acdc51f11",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "scripts": {
6
6
  "build": "tsup",
@@ -99,12 +99,12 @@
99
99
  "vitest": "3.2.4"
100
100
  },
101
101
  "dependencies": {
102
- "@uniformdev/canvas-react": "20.50.3-alpha.6+3ffd0d8a44",
103
- "@uniformdev/next-app-router-client": "20.50.3-alpha.6+3ffd0d8a44",
104
- "@uniformdev/next-app-router-shared": "20.50.3-alpha.6+3ffd0d8a44",
105
- "@uniformdev/redirect": "20.50.3-alpha.6+3ffd0d8a44",
106
- "@uniformdev/richtext": "20.50.3-alpha.6+3ffd0d8a44",
107
- "@uniformdev/webhooks": "20.50.3-alpha.6+3ffd0d8a44",
102
+ "@uniformdev/canvas-react": "20.51.1-alpha.14+1acdc51f11",
103
+ "@uniformdev/next-app-router-client": "20.51.1-alpha.14+1acdc51f11",
104
+ "@uniformdev/next-app-router-shared": "20.51.1-alpha.14+1acdc51f11",
105
+ "@uniformdev/redirect": "20.51.1-alpha.14+1acdc51f11",
106
+ "@uniformdev/richtext": "20.51.1-alpha.14+1acdc51f11",
107
+ "@uniformdev/webhooks": "20.51.1-alpha.14+1acdc51f11",
108
108
  "@vercel/functions": "^2.2.2",
109
109
  "encoding": "^0.1.13",
110
110
  "server-only": "^0.0.1",
@@ -121,5 +121,5 @@
121
121
  "publishConfig": {
122
122
  "access": "public"
123
123
  },
124
- "gitHead": "3ffd0d8a44f3ab6b90835250a33f61db016e9e19"
124
+ "gitHead": "1acdc51f11d2e4d35097fcb2f0e2d0777fab0c24"
125
125
  }