@uniformdev/next-app-router 20.72.3-alpha.2 → 20.72.3-alpha.25

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
@@ -418,6 +418,7 @@ var __accessCheck2 = (obj, member, msg) => member.has(obj) || __typeError2("Cann
418
418
  var __privateGet2 = (obj, member, getter) => (__accessCheck2(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
419
419
  var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError2("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
420
420
  var defaultLimitPolicy = (0, import_p_limit.default)(6);
421
+ var UNIFORM_BEARER_TOKEN_NOT_VALID_OR_EXPIRED_MESSAGE = "Bearer token not valid or expired";
421
422
  var ApiClientError = class _ApiClientError extends Error {
422
423
  constructor(errorMessage, fetchMethod, fetchUri, statusCode, statusText, requestId) {
423
424
  super(
@@ -433,6 +434,12 @@ var ApiClientError = class _ApiClientError extends Error {
433
434
  Object.setPrototypeOf(this, _ApiClientError.prototype);
434
435
  }
435
436
  };
437
+ var BearerTokenNotValidOrExpiredError = class _BearerTokenNotValidOrExpiredError extends ApiClientError {
438
+ constructor(errorMessage, fetchMethod, fetchUri, statusCode, statusText, requestId) {
439
+ super(errorMessage, fetchMethod, fetchUri, statusCode, statusText, requestId);
440
+ Object.setPrototypeOf(this, _BearerTokenNotValidOrExpiredError.prototype);
441
+ }
442
+ };
436
443
  var ApiClient = class _ApiClient {
437
444
  constructor(options) {
438
445
  __publicField2(this, "options");
@@ -466,7 +473,7 @@ var ApiClient = class _ApiClient {
466
473
  }
467
474
  async apiClientWithResponse(fetchUri, options) {
468
475
  return this.options.limitPolicy(async () => {
469
- var _a;
476
+ var _a, _b;
470
477
  const coreHeaders = this.options.apiKey ? {
471
478
  "x-api-key": this.options.apiKey
472
479
  } : {
@@ -502,9 +509,19 @@ var ApiClient = class _ApiClient {
502
509
  } catch (e) {
503
510
  message = `General error`;
504
511
  }
512
+ if (apiResponse.status === 401 && message === UNIFORM_BEARER_TOKEN_NOT_VALID_OR_EXPIRED_MESSAGE) {
513
+ throw new BearerTokenNotValidOrExpiredError(
514
+ message,
515
+ (_a = options == null ? void 0 : options.method) != null ? _a : "GET",
516
+ fetchUri.toString(),
517
+ apiResponse.status,
518
+ apiResponse.statusText,
519
+ _ApiClient.getRequestId(apiResponse)
520
+ );
521
+ }
505
522
  throw new ApiClientError(
506
523
  message,
507
- (_a = options == null ? void 0 : options.method) != null ? _a : "GET",
524
+ (_b = options == null ? void 0 : options.method) != null ? _b : "GET",
508
525
  fetchUri.toString(),
509
526
  apiResponse.status,
510
527
  apiResponse.statusText,
@@ -1252,6 +1269,14 @@ function projectionToQuery(spec) {
1252
1269
  }
1253
1270
  return out;
1254
1271
  }
1272
+ var CANVAS_DRAFT_STATE = 0;
1273
+ var CANVAS_PUBLISHED_STATE = 64;
1274
+ var CANVAS_EDITOR_STATE = 63;
1275
+ var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
1276
+ var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
1277
+ var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
1278
+ var IN_CONTEXT_EDITOR_QUERY_STRING_PARAM = "is_incontext_editing_mode";
1279
+ var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
1255
1280
  var _contentTypesUrl;
1256
1281
  var _entriesUrl;
1257
1282
  var _ContentClient = class _ContentClient2 extends ApiClient {
@@ -1358,14 +1383,18 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
1358
1383
  constructor(options) {
1359
1384
  super(options);
1360
1385
  }
1361
- /** Fetches all DataTypes for a project */
1362
- async get(options) {
1386
+ /** Fetches a list of DataTypes for a project */
1387
+ async list(options) {
1363
1388
  const { projectId } = this.options;
1364
1389
  const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8), { ...options, projectId });
1365
1390
  return await this.apiClient(fetchUri);
1366
1391
  }
1392
+ /** @deprecated Use {@link list} instead. */
1393
+ async get(options) {
1394
+ return this.list(options);
1395
+ }
1367
1396
  /** Updates or creates (based on id) a DataType */
1368
- async upsert(body) {
1397
+ async save(body) {
1369
1398
  const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8));
1370
1399
  await this.apiClient(fetchUri, {
1371
1400
  method: "PUT",
@@ -1373,6 +1402,10 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
1373
1402
  expectNoContent: true
1374
1403
  });
1375
1404
  }
1405
+ /** @deprecated Use {@link save} instead. */
1406
+ async upsert(body) {
1407
+ return this.save(body);
1408
+ }
1376
1409
  /** Deletes a DataType */
1377
1410
  async remove(body) {
1378
1411
  const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8));
@@ -1385,14 +1418,6 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
1385
1418
  };
1386
1419
  _url8 = /* @__PURE__ */ new WeakMap();
1387
1420
  __privateAdd3(_DataTypeClient, _url8, "/api/v1/data-types");
1388
- var CANVAS_DRAFT_STATE = 0;
1389
- var CANVAS_PUBLISHED_STATE = 64;
1390
- var CANVAS_EDITOR_STATE = 63;
1391
- var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
1392
- var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
1393
- var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
1394
- var IN_CONTEXT_EDITOR_QUERY_STRING_PARAM = "is_incontext_editing_mode";
1395
- var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
1396
1421
  var _baseUrl;
1397
1422
  var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2 extends ApiClient {
1398
1423
  constructor(options) {
@@ -1435,6 +1460,48 @@ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2
1435
1460
  _baseUrl = /* @__PURE__ */ new WeakMap();
1436
1461
  __privateAdd3(_IntegrationPropertyEditorsClient, _baseUrl, "/api/v1/integration-property-editors");
1437
1462
  var _url22;
1463
+ var _NotificationsClient = class _NotificationsClient2 extends ApiClient {
1464
+ constructor(options) {
1465
+ super(options);
1466
+ }
1467
+ /**
1468
+ * Lists notifications for the current user.
1469
+ *
1470
+ * @deprecated This API is experimental and may change without notice.
1471
+ */
1472
+ async list(options) {
1473
+ const fetchUri = this.createUrl(__privateGet3(_NotificationsClient2, _url22), options);
1474
+ return await this.apiClient(fetchUri);
1475
+ }
1476
+ /**
1477
+ * Creates a notification for one or more recipients.
1478
+ *
1479
+ * @deprecated This API is experimental and may change without notice.
1480
+ */
1481
+ async create(body) {
1482
+ const fetchUri = this.createUrl(__privateGet3(_NotificationsClient2, _url22));
1483
+ return await this.apiClient(fetchUri, {
1484
+ method: "POST",
1485
+ body: JSON.stringify(body)
1486
+ });
1487
+ }
1488
+ /**
1489
+ * Updates the read state of the current user's notifications.
1490
+ *
1491
+ * @deprecated This API is experimental and may change without notice.
1492
+ */
1493
+ async setReadState(body) {
1494
+ const fetchUri = this.createUrl(__privateGet3(_NotificationsClient2, _url22));
1495
+ await this.apiClient(fetchUri, {
1496
+ method: "PATCH",
1497
+ body: JSON.stringify(body),
1498
+ expectNoContent: true
1499
+ });
1500
+ }
1501
+ };
1502
+ _url22 = /* @__PURE__ */ new WeakMap();
1503
+ __privateAdd3(_NotificationsClient, _url22, "/api/v1/notifications");
1504
+ var _url32;
1438
1505
  var _projectsUrl;
1439
1506
  var _ProjectClient = class _ProjectClient2 extends ApiClient {
1440
1507
  constructor(options) {
@@ -1442,7 +1509,7 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
1442
1509
  }
1443
1510
  /** Fetches single Project */
1444
1511
  async get(options) {
1445
- const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22), { ...options });
1512
+ const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url32), { ...options });
1446
1513
  return await this.apiClient(fetchUri);
1447
1514
  }
1448
1515
  /**
@@ -1450,31 +1517,43 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
1450
1517
  * When teamId is provided, returns a single team with its projects.
1451
1518
  * When omitted, returns all accessible teams and their projects.
1452
1519
  */
1453
- async getProjects(options) {
1520
+ async list(options) {
1454
1521
  const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
1455
1522
  return await this.apiClient(fetchUri);
1456
1523
  }
1524
+ /** @deprecated Use {@link list} instead. */
1525
+ async getProjects(options) {
1526
+ return this.list(options);
1527
+ }
1457
1528
  /** Updates or creates (based on id) a Project */
1458
- async upsert(body) {
1459
- const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22));
1529
+ async save(body) {
1530
+ const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url32));
1460
1531
  return await this.apiClient(fetchUri, {
1461
1532
  method: "PUT",
1462
1533
  body: JSON.stringify({ ...body })
1463
1534
  });
1464
1535
  }
1536
+ /** @deprecated Use {@link save} instead. */
1537
+ async upsert(body) {
1538
+ return this.save(body);
1539
+ }
1465
1540
  /** Deletes a Project */
1466
- async delete(body) {
1467
- const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22));
1541
+ async remove(body) {
1542
+ const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url32));
1468
1543
  await this.apiClient(fetchUri, {
1469
1544
  method: "DELETE",
1470
1545
  body: JSON.stringify({ ...body }),
1471
1546
  expectNoContent: true
1472
1547
  });
1473
1548
  }
1549
+ /** @deprecated Use {@link remove} instead. */
1550
+ async delete(body) {
1551
+ return this.remove(body);
1552
+ }
1474
1553
  };
1475
- _url22 = /* @__PURE__ */ new WeakMap();
1554
+ _url32 = /* @__PURE__ */ new WeakMap();
1476
1555
  _projectsUrl = /* @__PURE__ */ new WeakMap();
1477
- __privateAdd3(_ProjectClient, _url22, "/api/v1/project");
1556
+ __privateAdd3(_ProjectClient, _url32, "/api/v1/project");
1478
1557
  __privateAdd3(_ProjectClient, _projectsUrl, "/api/v1/projects");
1479
1558
  var ROUTE_URL = "/api/v1/route";
1480
1559
  var RouteClient = class extends ApiClient {
@@ -1486,8 +1565,14 @@ var RouteClient = class extends ApiClient {
1486
1565
  super(options);
1487
1566
  this.edgeApiHost = (_a = options.edgeApiHost) != null ? _a : "https://uniform.global";
1488
1567
  }
1489
- /** Fetches lists of Canvas compositions, optionally by type */
1490
- async getRoute(options) {
1568
+ /**
1569
+ * Resolves a route to a composition, redirect, or not-found result.
1570
+ *
1571
+ * An optional `select` projection applies to the resolved composition when
1572
+ * the route matches one; redirect / notFound responses pass through
1573
+ * untouched.
1574
+ */
1575
+ async get(options) {
1491
1576
  const { projectId } = this.options;
1492
1577
  const { select, ...rest } = options != null ? options : {};
1493
1578
  const rewrittenSelect = projectionToQuery(select);
@@ -1497,6 +1582,10 @@ var RouteClient = class extends ApiClient {
1497
1582
  this.options.disableSWR ? { headers: { "x-disable-swr": "true" } } : void 0
1498
1583
  );
1499
1584
  }
1585
+ /** @deprecated use {@link RouteClient.get} instead (renamed). */
1586
+ async getRoute(options) {
1587
+ return this.get(options);
1588
+ }
1500
1589
  };
1501
1590
  var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
1502
1591
  var _a, _b;
@@ -1957,14 +2046,14 @@ var DefaultDataClient = class {
1957
2046
  if (oldCachedRoute) {
1958
2047
  (0, import_functions.waitUntil)(
1959
2048
  (async () => {
1960
- const result2 = await routeClient.getRoute(route);
2049
+ const result2 = await routeClient.get(route);
1961
2050
  await cacheNewRoute(result2);
1962
2051
  })()
1963
2052
  );
1964
2053
  return oldCachedRoute;
1965
2054
  }
1966
2055
  }
1967
- const result = await routeClient.getRoute(route);
2056
+ const result = await routeClient.get(route);
1968
2057
  (0, import_functions.waitUntil)(
1969
2058
  (async () => {
1970
2059
  await Promise.all([
package/dist/cache.mjs CHANGED
@@ -405,6 +405,7 @@ var __accessCheck2 = (obj, member, msg) => member.has(obj) || __typeError2("Cann
405
405
  var __privateGet2 = (obj, member, getter) => (__accessCheck2(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
406
406
  var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError2("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
407
407
  var defaultLimitPolicy = (0, import_p_limit.default)(6);
408
+ var UNIFORM_BEARER_TOKEN_NOT_VALID_OR_EXPIRED_MESSAGE = "Bearer token not valid or expired";
408
409
  var ApiClientError = class _ApiClientError extends Error {
409
410
  constructor(errorMessage, fetchMethod, fetchUri, statusCode, statusText, requestId) {
410
411
  super(
@@ -420,6 +421,12 @@ var ApiClientError = class _ApiClientError extends Error {
420
421
  Object.setPrototypeOf(this, _ApiClientError.prototype);
421
422
  }
422
423
  };
424
+ var BearerTokenNotValidOrExpiredError = class _BearerTokenNotValidOrExpiredError extends ApiClientError {
425
+ constructor(errorMessage, fetchMethod, fetchUri, statusCode, statusText, requestId) {
426
+ super(errorMessage, fetchMethod, fetchUri, statusCode, statusText, requestId);
427
+ Object.setPrototypeOf(this, _BearerTokenNotValidOrExpiredError.prototype);
428
+ }
429
+ };
423
430
  var ApiClient = class _ApiClient {
424
431
  constructor(options) {
425
432
  __publicField2(this, "options");
@@ -453,7 +460,7 @@ var ApiClient = class _ApiClient {
453
460
  }
454
461
  async apiClientWithResponse(fetchUri, options) {
455
462
  return this.options.limitPolicy(async () => {
456
- var _a;
463
+ var _a, _b;
457
464
  const coreHeaders = this.options.apiKey ? {
458
465
  "x-api-key": this.options.apiKey
459
466
  } : {
@@ -489,9 +496,19 @@ var ApiClient = class _ApiClient {
489
496
  } catch (e) {
490
497
  message = `General error`;
491
498
  }
499
+ if (apiResponse.status === 401 && message === UNIFORM_BEARER_TOKEN_NOT_VALID_OR_EXPIRED_MESSAGE) {
500
+ throw new BearerTokenNotValidOrExpiredError(
501
+ message,
502
+ (_a = options == null ? void 0 : options.method) != null ? _a : "GET",
503
+ fetchUri.toString(),
504
+ apiResponse.status,
505
+ apiResponse.statusText,
506
+ _ApiClient.getRequestId(apiResponse)
507
+ );
508
+ }
492
509
  throw new ApiClientError(
493
510
  message,
494
- (_a = options == null ? void 0 : options.method) != null ? _a : "GET",
511
+ (_b = options == null ? void 0 : options.method) != null ? _b : "GET",
495
512
  fetchUri.toString(),
496
513
  apiResponse.status,
497
514
  apiResponse.statusText,
@@ -1239,6 +1256,14 @@ function projectionToQuery(spec) {
1239
1256
  }
1240
1257
  return out;
1241
1258
  }
1259
+ var CANVAS_DRAFT_STATE = 0;
1260
+ var CANVAS_PUBLISHED_STATE = 64;
1261
+ var CANVAS_EDITOR_STATE = 63;
1262
+ var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
1263
+ var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
1264
+ var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
1265
+ var IN_CONTEXT_EDITOR_QUERY_STRING_PARAM = "is_incontext_editing_mode";
1266
+ var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
1242
1267
  var _contentTypesUrl;
1243
1268
  var _entriesUrl;
1244
1269
  var _ContentClient = class _ContentClient2 extends ApiClient {
@@ -1345,14 +1370,18 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
1345
1370
  constructor(options) {
1346
1371
  super(options);
1347
1372
  }
1348
- /** Fetches all DataTypes for a project */
1349
- async get(options) {
1373
+ /** Fetches a list of DataTypes for a project */
1374
+ async list(options) {
1350
1375
  const { projectId } = this.options;
1351
1376
  const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8), { ...options, projectId });
1352
1377
  return await this.apiClient(fetchUri);
1353
1378
  }
1379
+ /** @deprecated Use {@link list} instead. */
1380
+ async get(options) {
1381
+ return this.list(options);
1382
+ }
1354
1383
  /** Updates or creates (based on id) a DataType */
1355
- async upsert(body) {
1384
+ async save(body) {
1356
1385
  const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8));
1357
1386
  await this.apiClient(fetchUri, {
1358
1387
  method: "PUT",
@@ -1360,6 +1389,10 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
1360
1389
  expectNoContent: true
1361
1390
  });
1362
1391
  }
1392
+ /** @deprecated Use {@link save} instead. */
1393
+ async upsert(body) {
1394
+ return this.save(body);
1395
+ }
1363
1396
  /** Deletes a DataType */
1364
1397
  async remove(body) {
1365
1398
  const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8));
@@ -1372,14 +1405,6 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
1372
1405
  };
1373
1406
  _url8 = /* @__PURE__ */ new WeakMap();
1374
1407
  __privateAdd3(_DataTypeClient, _url8, "/api/v1/data-types");
1375
- var CANVAS_DRAFT_STATE = 0;
1376
- var CANVAS_PUBLISHED_STATE = 64;
1377
- var CANVAS_EDITOR_STATE = 63;
1378
- var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
1379
- var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
1380
- var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
1381
- var IN_CONTEXT_EDITOR_QUERY_STRING_PARAM = "is_incontext_editing_mode";
1382
- var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
1383
1408
  var _baseUrl;
1384
1409
  var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2 extends ApiClient {
1385
1410
  constructor(options) {
@@ -1422,6 +1447,48 @@ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2
1422
1447
  _baseUrl = /* @__PURE__ */ new WeakMap();
1423
1448
  __privateAdd3(_IntegrationPropertyEditorsClient, _baseUrl, "/api/v1/integration-property-editors");
1424
1449
  var _url22;
1450
+ var _NotificationsClient = class _NotificationsClient2 extends ApiClient {
1451
+ constructor(options) {
1452
+ super(options);
1453
+ }
1454
+ /**
1455
+ * Lists notifications for the current user.
1456
+ *
1457
+ * @deprecated This API is experimental and may change without notice.
1458
+ */
1459
+ async list(options) {
1460
+ const fetchUri = this.createUrl(__privateGet3(_NotificationsClient2, _url22), options);
1461
+ return await this.apiClient(fetchUri);
1462
+ }
1463
+ /**
1464
+ * Creates a notification for one or more recipients.
1465
+ *
1466
+ * @deprecated This API is experimental and may change without notice.
1467
+ */
1468
+ async create(body) {
1469
+ const fetchUri = this.createUrl(__privateGet3(_NotificationsClient2, _url22));
1470
+ return await this.apiClient(fetchUri, {
1471
+ method: "POST",
1472
+ body: JSON.stringify(body)
1473
+ });
1474
+ }
1475
+ /**
1476
+ * Updates the read state of the current user's notifications.
1477
+ *
1478
+ * @deprecated This API is experimental and may change without notice.
1479
+ */
1480
+ async setReadState(body) {
1481
+ const fetchUri = this.createUrl(__privateGet3(_NotificationsClient2, _url22));
1482
+ await this.apiClient(fetchUri, {
1483
+ method: "PATCH",
1484
+ body: JSON.stringify(body),
1485
+ expectNoContent: true
1486
+ });
1487
+ }
1488
+ };
1489
+ _url22 = /* @__PURE__ */ new WeakMap();
1490
+ __privateAdd3(_NotificationsClient, _url22, "/api/v1/notifications");
1491
+ var _url32;
1425
1492
  var _projectsUrl;
1426
1493
  var _ProjectClient = class _ProjectClient2 extends ApiClient {
1427
1494
  constructor(options) {
@@ -1429,7 +1496,7 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
1429
1496
  }
1430
1497
  /** Fetches single Project */
1431
1498
  async get(options) {
1432
- const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22), { ...options });
1499
+ const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url32), { ...options });
1433
1500
  return await this.apiClient(fetchUri);
1434
1501
  }
1435
1502
  /**
@@ -1437,31 +1504,43 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
1437
1504
  * When teamId is provided, returns a single team with its projects.
1438
1505
  * When omitted, returns all accessible teams and their projects.
1439
1506
  */
1440
- async getProjects(options) {
1507
+ async list(options) {
1441
1508
  const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
1442
1509
  return await this.apiClient(fetchUri);
1443
1510
  }
1511
+ /** @deprecated Use {@link list} instead. */
1512
+ async getProjects(options) {
1513
+ return this.list(options);
1514
+ }
1444
1515
  /** Updates or creates (based on id) a Project */
1445
- async upsert(body) {
1446
- const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22));
1516
+ async save(body) {
1517
+ const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url32));
1447
1518
  return await this.apiClient(fetchUri, {
1448
1519
  method: "PUT",
1449
1520
  body: JSON.stringify({ ...body })
1450
1521
  });
1451
1522
  }
1523
+ /** @deprecated Use {@link save} instead. */
1524
+ async upsert(body) {
1525
+ return this.save(body);
1526
+ }
1452
1527
  /** Deletes a Project */
1453
- async delete(body) {
1454
- const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22));
1528
+ async remove(body) {
1529
+ const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url32));
1455
1530
  await this.apiClient(fetchUri, {
1456
1531
  method: "DELETE",
1457
1532
  body: JSON.stringify({ ...body }),
1458
1533
  expectNoContent: true
1459
1534
  });
1460
1535
  }
1536
+ /** @deprecated Use {@link remove} instead. */
1537
+ async delete(body) {
1538
+ return this.remove(body);
1539
+ }
1461
1540
  };
1462
- _url22 = /* @__PURE__ */ new WeakMap();
1541
+ _url32 = /* @__PURE__ */ new WeakMap();
1463
1542
  _projectsUrl = /* @__PURE__ */ new WeakMap();
1464
- __privateAdd3(_ProjectClient, _url22, "/api/v1/project");
1543
+ __privateAdd3(_ProjectClient, _url32, "/api/v1/project");
1465
1544
  __privateAdd3(_ProjectClient, _projectsUrl, "/api/v1/projects");
1466
1545
  var ROUTE_URL = "/api/v1/route";
1467
1546
  var RouteClient = class extends ApiClient {
@@ -1473,8 +1552,14 @@ var RouteClient = class extends ApiClient {
1473
1552
  super(options);
1474
1553
  this.edgeApiHost = (_a = options.edgeApiHost) != null ? _a : "https://uniform.global";
1475
1554
  }
1476
- /** Fetches lists of Canvas compositions, optionally by type */
1477
- async getRoute(options) {
1555
+ /**
1556
+ * Resolves a route to a composition, redirect, or not-found result.
1557
+ *
1558
+ * An optional `select` projection applies to the resolved composition when
1559
+ * the route matches one; redirect / notFound responses pass through
1560
+ * untouched.
1561
+ */
1562
+ async get(options) {
1478
1563
  const { projectId } = this.options;
1479
1564
  const { select, ...rest } = options != null ? options : {};
1480
1565
  const rewrittenSelect = projectionToQuery(select);
@@ -1484,6 +1569,10 @@ var RouteClient = class extends ApiClient {
1484
1569
  this.options.disableSWR ? { headers: { "x-disable-swr": "true" } } : void 0
1485
1570
  );
1486
1571
  }
1572
+ /** @deprecated use {@link RouteClient.get} instead (renamed). */
1573
+ async getRoute(options) {
1574
+ return this.get(options);
1575
+ }
1487
1576
  };
1488
1577
  var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
1489
1578
  var _a, _b;
@@ -1944,14 +2033,14 @@ var DefaultDataClient = class {
1944
2033
  if (oldCachedRoute) {
1945
2034
  waitUntil(
1946
2035
  (async () => {
1947
- const result2 = await routeClient.getRoute(route);
2036
+ const result2 = await routeClient.get(route);
1948
2037
  await cacheNewRoute(result2);
1949
2038
  })()
1950
2039
  );
1951
2040
  return oldCachedRoute;
1952
2041
  }
1953
2042
  }
1954
- const result = await routeClient.getRoute(route);
2043
+ const result = await routeClient.get(route);
1955
2044
  waitUntil(
1956
2045
  (async () => {
1957
2046
  await Promise.all([