@uniformdev/next-app-router 20.74.6-alpha.3 → 20.74.6-alpha.6
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 +48 -18
- package/dist/cache.mjs +48 -18
- package/dist/component.js +30 -10
- package/dist/component.mjs +30 -10
- package/dist/handler.js +126 -138
- package/dist/handler.mjs +126 -138
- package/dist/index.d.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.esm.js +167 -40
- package/dist/index.js +168 -40
- package/dist/index.mjs +167 -40
- package/dist/middleware.js +146 -151
- package/dist/middleware.mjs +146 -151
- package/package.json +8 -8
package/dist/cache.js
CHANGED
|
@@ -1269,6 +1269,14 @@ function projectionToQuery(spec) {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
return out;
|
|
1271
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;
|
|
1272
1280
|
var _contentTypesUrl;
|
|
1273
1281
|
var _entriesUrl;
|
|
1274
1282
|
var _ContentClient = class _ContentClient2 extends ApiClient {
|
|
@@ -1375,14 +1383,18 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
1375
1383
|
constructor(options) {
|
|
1376
1384
|
super(options);
|
|
1377
1385
|
}
|
|
1378
|
-
/** Fetches
|
|
1379
|
-
async
|
|
1386
|
+
/** Fetches a list of DataTypes for a project */
|
|
1387
|
+
async list(options) {
|
|
1380
1388
|
const { projectId } = this.options;
|
|
1381
1389
|
const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8), { ...options, projectId });
|
|
1382
1390
|
return await this.apiClient(fetchUri);
|
|
1383
1391
|
}
|
|
1392
|
+
/** @deprecated Use {@link list} instead. */
|
|
1393
|
+
async get(options) {
|
|
1394
|
+
return this.list(options);
|
|
1395
|
+
}
|
|
1384
1396
|
/** Updates or creates (based on id) a DataType */
|
|
1385
|
-
async
|
|
1397
|
+
async save(body) {
|
|
1386
1398
|
const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8));
|
|
1387
1399
|
await this.apiClient(fetchUri, {
|
|
1388
1400
|
method: "PUT",
|
|
@@ -1390,6 +1402,10 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
1390
1402
|
expectNoContent: true
|
|
1391
1403
|
});
|
|
1392
1404
|
}
|
|
1405
|
+
/** @deprecated Use {@link save} instead. */
|
|
1406
|
+
async upsert(body) {
|
|
1407
|
+
return this.save(body);
|
|
1408
|
+
}
|
|
1393
1409
|
/** Deletes a DataType */
|
|
1394
1410
|
async remove(body) {
|
|
1395
1411
|
const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8));
|
|
@@ -1402,14 +1418,6 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
1402
1418
|
};
|
|
1403
1419
|
_url8 = /* @__PURE__ */ new WeakMap();
|
|
1404
1420
|
__privateAdd3(_DataTypeClient, _url8, "/api/v1/data-types");
|
|
1405
|
-
var CANVAS_DRAFT_STATE = 0;
|
|
1406
|
-
var CANVAS_PUBLISHED_STATE = 64;
|
|
1407
|
-
var CANVAS_EDITOR_STATE = 63;
|
|
1408
|
-
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
1409
|
-
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
1410
|
-
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
1411
|
-
var IN_CONTEXT_EDITOR_QUERY_STRING_PARAM = "is_incontext_editing_mode";
|
|
1412
|
-
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
1413
1421
|
var _baseUrl;
|
|
1414
1422
|
var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2 extends ApiClient {
|
|
1415
1423
|
constructor(options) {
|
|
@@ -1467,20 +1475,28 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
1467
1475
|
* When teamId is provided, returns a single team with its projects.
|
|
1468
1476
|
* When omitted, returns all accessible teams and their projects.
|
|
1469
1477
|
*/
|
|
1470
|
-
async
|
|
1478
|
+
async list(options) {
|
|
1471
1479
|
const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
|
|
1472
1480
|
return await this.apiClient(fetchUri);
|
|
1473
1481
|
}
|
|
1482
|
+
/** @deprecated Use {@link list} instead. */
|
|
1483
|
+
async getProjects(options) {
|
|
1484
|
+
return this.list(options);
|
|
1485
|
+
}
|
|
1474
1486
|
/** Updates or creates (based on id) a Project */
|
|
1475
|
-
async
|
|
1487
|
+
async save(body) {
|
|
1476
1488
|
const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22));
|
|
1477
1489
|
return await this.apiClient(fetchUri, {
|
|
1478
1490
|
method: "PUT",
|
|
1479
1491
|
body: JSON.stringify({ ...body })
|
|
1480
1492
|
});
|
|
1481
1493
|
}
|
|
1494
|
+
/** @deprecated Use {@link save} instead. */
|
|
1495
|
+
async upsert(body) {
|
|
1496
|
+
return this.save(body);
|
|
1497
|
+
}
|
|
1482
1498
|
/** Deletes a Project */
|
|
1483
|
-
async
|
|
1499
|
+
async remove(body) {
|
|
1484
1500
|
const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22));
|
|
1485
1501
|
await this.apiClient(fetchUri, {
|
|
1486
1502
|
method: "DELETE",
|
|
@@ -1488,6 +1504,10 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
1488
1504
|
expectNoContent: true
|
|
1489
1505
|
});
|
|
1490
1506
|
}
|
|
1507
|
+
/** @deprecated Use {@link remove} instead. */
|
|
1508
|
+
async delete(body) {
|
|
1509
|
+
return this.remove(body);
|
|
1510
|
+
}
|
|
1491
1511
|
};
|
|
1492
1512
|
_url22 = /* @__PURE__ */ new WeakMap();
|
|
1493
1513
|
_projectsUrl = /* @__PURE__ */ new WeakMap();
|
|
@@ -1503,8 +1523,14 @@ var RouteClient = class extends ApiClient {
|
|
|
1503
1523
|
super(options);
|
|
1504
1524
|
this.edgeApiHost = (_a = options.edgeApiHost) != null ? _a : "https://uniform.global";
|
|
1505
1525
|
}
|
|
1506
|
-
/**
|
|
1507
|
-
|
|
1526
|
+
/**
|
|
1527
|
+
* Resolves a route to a composition, redirect, or not-found result.
|
|
1528
|
+
*
|
|
1529
|
+
* An optional `select` projection applies to the resolved composition when
|
|
1530
|
+
* the route matches one; redirect / notFound responses pass through
|
|
1531
|
+
* untouched.
|
|
1532
|
+
*/
|
|
1533
|
+
async get(options) {
|
|
1508
1534
|
const { projectId } = this.options;
|
|
1509
1535
|
const { select, ...rest } = options != null ? options : {};
|
|
1510
1536
|
const rewrittenSelect = projectionToQuery(select);
|
|
@@ -1514,6 +1540,10 @@ var RouteClient = class extends ApiClient {
|
|
|
1514
1540
|
this.options.disableSWR ? { headers: { "x-disable-swr": "true" } } : void 0
|
|
1515
1541
|
);
|
|
1516
1542
|
}
|
|
1543
|
+
/** @deprecated use {@link RouteClient.get} instead (renamed). */
|
|
1544
|
+
async getRoute(options) {
|
|
1545
|
+
return this.get(options);
|
|
1546
|
+
}
|
|
1517
1547
|
};
|
|
1518
1548
|
var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
|
|
1519
1549
|
var _a, _b;
|
|
@@ -1974,14 +2004,14 @@ var DefaultDataClient = class {
|
|
|
1974
2004
|
if (oldCachedRoute) {
|
|
1975
2005
|
(0, import_functions.waitUntil)(
|
|
1976
2006
|
(async () => {
|
|
1977
|
-
const result2 = await routeClient.
|
|
2007
|
+
const result2 = await routeClient.get(route);
|
|
1978
2008
|
await cacheNewRoute(result2);
|
|
1979
2009
|
})()
|
|
1980
2010
|
);
|
|
1981
2011
|
return oldCachedRoute;
|
|
1982
2012
|
}
|
|
1983
2013
|
}
|
|
1984
|
-
const result = await routeClient.
|
|
2014
|
+
const result = await routeClient.get(route);
|
|
1985
2015
|
(0, import_functions.waitUntil)(
|
|
1986
2016
|
(async () => {
|
|
1987
2017
|
await Promise.all([
|
package/dist/cache.mjs
CHANGED
|
@@ -1256,6 +1256,14 @@ function projectionToQuery(spec) {
|
|
|
1256
1256
|
}
|
|
1257
1257
|
return out;
|
|
1258
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;
|
|
1259
1267
|
var _contentTypesUrl;
|
|
1260
1268
|
var _entriesUrl;
|
|
1261
1269
|
var _ContentClient = class _ContentClient2 extends ApiClient {
|
|
@@ -1362,14 +1370,18 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
1362
1370
|
constructor(options) {
|
|
1363
1371
|
super(options);
|
|
1364
1372
|
}
|
|
1365
|
-
/** Fetches
|
|
1366
|
-
async
|
|
1373
|
+
/** Fetches a list of DataTypes for a project */
|
|
1374
|
+
async list(options) {
|
|
1367
1375
|
const { projectId } = this.options;
|
|
1368
1376
|
const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8), { ...options, projectId });
|
|
1369
1377
|
return await this.apiClient(fetchUri);
|
|
1370
1378
|
}
|
|
1379
|
+
/** @deprecated Use {@link list} instead. */
|
|
1380
|
+
async get(options) {
|
|
1381
|
+
return this.list(options);
|
|
1382
|
+
}
|
|
1371
1383
|
/** Updates or creates (based on id) a DataType */
|
|
1372
|
-
async
|
|
1384
|
+
async save(body) {
|
|
1373
1385
|
const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8));
|
|
1374
1386
|
await this.apiClient(fetchUri, {
|
|
1375
1387
|
method: "PUT",
|
|
@@ -1377,6 +1389,10 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
1377
1389
|
expectNoContent: true
|
|
1378
1390
|
});
|
|
1379
1391
|
}
|
|
1392
|
+
/** @deprecated Use {@link save} instead. */
|
|
1393
|
+
async upsert(body) {
|
|
1394
|
+
return this.save(body);
|
|
1395
|
+
}
|
|
1380
1396
|
/** Deletes a DataType */
|
|
1381
1397
|
async remove(body) {
|
|
1382
1398
|
const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8));
|
|
@@ -1389,14 +1405,6 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
1389
1405
|
};
|
|
1390
1406
|
_url8 = /* @__PURE__ */ new WeakMap();
|
|
1391
1407
|
__privateAdd3(_DataTypeClient, _url8, "/api/v1/data-types");
|
|
1392
|
-
var CANVAS_DRAFT_STATE = 0;
|
|
1393
|
-
var CANVAS_PUBLISHED_STATE = 64;
|
|
1394
|
-
var CANVAS_EDITOR_STATE = 63;
|
|
1395
|
-
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
1396
|
-
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
1397
|
-
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
1398
|
-
var IN_CONTEXT_EDITOR_QUERY_STRING_PARAM = "is_incontext_editing_mode";
|
|
1399
|
-
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
1400
1408
|
var _baseUrl;
|
|
1401
1409
|
var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2 extends ApiClient {
|
|
1402
1410
|
constructor(options) {
|
|
@@ -1454,20 +1462,28 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
1454
1462
|
* When teamId is provided, returns a single team with its projects.
|
|
1455
1463
|
* When omitted, returns all accessible teams and their projects.
|
|
1456
1464
|
*/
|
|
1457
|
-
async
|
|
1465
|
+
async list(options) {
|
|
1458
1466
|
const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
|
|
1459
1467
|
return await this.apiClient(fetchUri);
|
|
1460
1468
|
}
|
|
1469
|
+
/** @deprecated Use {@link list} instead. */
|
|
1470
|
+
async getProjects(options) {
|
|
1471
|
+
return this.list(options);
|
|
1472
|
+
}
|
|
1461
1473
|
/** Updates or creates (based on id) a Project */
|
|
1462
|
-
async
|
|
1474
|
+
async save(body) {
|
|
1463
1475
|
const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22));
|
|
1464
1476
|
return await this.apiClient(fetchUri, {
|
|
1465
1477
|
method: "PUT",
|
|
1466
1478
|
body: JSON.stringify({ ...body })
|
|
1467
1479
|
});
|
|
1468
1480
|
}
|
|
1481
|
+
/** @deprecated Use {@link save} instead. */
|
|
1482
|
+
async upsert(body) {
|
|
1483
|
+
return this.save(body);
|
|
1484
|
+
}
|
|
1469
1485
|
/** Deletes a Project */
|
|
1470
|
-
async
|
|
1486
|
+
async remove(body) {
|
|
1471
1487
|
const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22));
|
|
1472
1488
|
await this.apiClient(fetchUri, {
|
|
1473
1489
|
method: "DELETE",
|
|
@@ -1475,6 +1491,10 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
1475
1491
|
expectNoContent: true
|
|
1476
1492
|
});
|
|
1477
1493
|
}
|
|
1494
|
+
/** @deprecated Use {@link remove} instead. */
|
|
1495
|
+
async delete(body) {
|
|
1496
|
+
return this.remove(body);
|
|
1497
|
+
}
|
|
1478
1498
|
};
|
|
1479
1499
|
_url22 = /* @__PURE__ */ new WeakMap();
|
|
1480
1500
|
_projectsUrl = /* @__PURE__ */ new WeakMap();
|
|
@@ -1490,8 +1510,14 @@ var RouteClient = class extends ApiClient {
|
|
|
1490
1510
|
super(options);
|
|
1491
1511
|
this.edgeApiHost = (_a = options.edgeApiHost) != null ? _a : "https://uniform.global";
|
|
1492
1512
|
}
|
|
1493
|
-
/**
|
|
1494
|
-
|
|
1513
|
+
/**
|
|
1514
|
+
* Resolves a route to a composition, redirect, or not-found result.
|
|
1515
|
+
*
|
|
1516
|
+
* An optional `select` projection applies to the resolved composition when
|
|
1517
|
+
* the route matches one; redirect / notFound responses pass through
|
|
1518
|
+
* untouched.
|
|
1519
|
+
*/
|
|
1520
|
+
async get(options) {
|
|
1495
1521
|
const { projectId } = this.options;
|
|
1496
1522
|
const { select, ...rest } = options != null ? options : {};
|
|
1497
1523
|
const rewrittenSelect = projectionToQuery(select);
|
|
@@ -1501,6 +1527,10 @@ var RouteClient = class extends ApiClient {
|
|
|
1501
1527
|
this.options.disableSWR ? { headers: { "x-disable-swr": "true" } } : void 0
|
|
1502
1528
|
);
|
|
1503
1529
|
}
|
|
1530
|
+
/** @deprecated use {@link RouteClient.get} instead (renamed). */
|
|
1531
|
+
async getRoute(options) {
|
|
1532
|
+
return this.get(options);
|
|
1533
|
+
}
|
|
1504
1534
|
};
|
|
1505
1535
|
var getDataSourceVariantFromRouteGetParams = (params, defaultPreviewState) => {
|
|
1506
1536
|
var _a, _b;
|
|
@@ -1961,14 +1991,14 @@ var DefaultDataClient = class {
|
|
|
1961
1991
|
if (oldCachedRoute) {
|
|
1962
1992
|
waitUntil(
|
|
1963
1993
|
(async () => {
|
|
1964
|
-
const result2 = await routeClient.
|
|
1994
|
+
const result2 = await routeClient.get(route);
|
|
1965
1995
|
await cacheNewRoute(result2);
|
|
1966
1996
|
})()
|
|
1967
1997
|
);
|
|
1968
1998
|
return oldCachedRoute;
|
|
1969
1999
|
}
|
|
1970
2000
|
}
|
|
1971
|
-
const result = await routeClient.
|
|
2001
|
+
const result = await routeClient.get(route);
|
|
1972
2002
|
waitUntil(
|
|
1973
2003
|
(async () => {
|
|
1974
2004
|
await Promise.all([
|
package/dist/component.js
CHANGED
|
@@ -691,6 +691,10 @@ function projectionToQuery(spec) {
|
|
|
691
691
|
}
|
|
692
692
|
return out;
|
|
693
693
|
}
|
|
694
|
+
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
695
|
+
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
696
|
+
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
697
|
+
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
694
698
|
var _contentTypesUrl;
|
|
695
699
|
var _entriesUrl;
|
|
696
700
|
var _ContentClient = class _ContentClient2 extends ApiClient {
|
|
@@ -797,14 +801,18 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
797
801
|
constructor(options) {
|
|
798
802
|
super(options);
|
|
799
803
|
}
|
|
800
|
-
/** Fetches
|
|
801
|
-
async
|
|
804
|
+
/** Fetches a list of DataTypes for a project */
|
|
805
|
+
async list(options) {
|
|
802
806
|
const { projectId } = this.options;
|
|
803
807
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8), { ...options, projectId });
|
|
804
808
|
return await this.apiClient(fetchUri);
|
|
805
809
|
}
|
|
810
|
+
/** @deprecated Use {@link list} instead. */
|
|
811
|
+
async get(options) {
|
|
812
|
+
return this.list(options);
|
|
813
|
+
}
|
|
806
814
|
/** Updates or creates (based on id) a DataType */
|
|
807
|
-
async
|
|
815
|
+
async save(body) {
|
|
808
816
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
|
|
809
817
|
await this.apiClient(fetchUri, {
|
|
810
818
|
method: "PUT",
|
|
@@ -812,6 +820,10 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
812
820
|
expectNoContent: true
|
|
813
821
|
});
|
|
814
822
|
}
|
|
823
|
+
/** @deprecated Use {@link save} instead. */
|
|
824
|
+
async upsert(body) {
|
|
825
|
+
return this.save(body);
|
|
826
|
+
}
|
|
815
827
|
/** Deletes a DataType */
|
|
816
828
|
async remove(body) {
|
|
817
829
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
|
|
@@ -824,10 +836,6 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
824
836
|
};
|
|
825
837
|
_url8 = /* @__PURE__ */ new WeakMap();
|
|
826
838
|
__privateAdd2(_DataTypeClient, _url8, "/api/v1/data-types");
|
|
827
|
-
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
828
|
-
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
829
|
-
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
830
|
-
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
831
839
|
var _baseUrl;
|
|
832
840
|
var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2 extends ApiClient {
|
|
833
841
|
constructor(options) {
|
|
@@ -885,20 +893,28 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
885
893
|
* When teamId is provided, returns a single team with its projects.
|
|
886
894
|
* When omitted, returns all accessible teams and their projects.
|
|
887
895
|
*/
|
|
888
|
-
async
|
|
896
|
+
async list(options) {
|
|
889
897
|
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
|
|
890
898
|
return await this.apiClient(fetchUri);
|
|
891
899
|
}
|
|
900
|
+
/** @deprecated Use {@link list} instead. */
|
|
901
|
+
async getProjects(options) {
|
|
902
|
+
return this.list(options);
|
|
903
|
+
}
|
|
892
904
|
/** Updates or creates (based on id) a Project */
|
|
893
|
-
async
|
|
905
|
+
async save(body) {
|
|
894
906
|
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22));
|
|
895
907
|
return await this.apiClient(fetchUri, {
|
|
896
908
|
method: "PUT",
|
|
897
909
|
body: JSON.stringify({ ...body })
|
|
898
910
|
});
|
|
899
911
|
}
|
|
912
|
+
/** @deprecated Use {@link save} instead. */
|
|
913
|
+
async upsert(body) {
|
|
914
|
+
return this.save(body);
|
|
915
|
+
}
|
|
900
916
|
/** Deletes a Project */
|
|
901
|
-
async
|
|
917
|
+
async remove(body) {
|
|
902
918
|
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22));
|
|
903
919
|
await this.apiClient(fetchUri, {
|
|
904
920
|
method: "DELETE",
|
|
@@ -906,6 +922,10 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
906
922
|
expectNoContent: true
|
|
907
923
|
});
|
|
908
924
|
}
|
|
925
|
+
/** @deprecated Use {@link remove} instead. */
|
|
926
|
+
async delete(body) {
|
|
927
|
+
return this.remove(body);
|
|
928
|
+
}
|
|
909
929
|
};
|
|
910
930
|
_url22 = /* @__PURE__ */ new WeakMap();
|
|
911
931
|
_projectsUrl = /* @__PURE__ */ new WeakMap();
|
package/dist/component.mjs
CHANGED
|
@@ -676,6 +676,10 @@ function projectionToQuery(spec) {
|
|
|
676
676
|
}
|
|
677
677
|
return out;
|
|
678
678
|
}
|
|
679
|
+
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
680
|
+
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
681
|
+
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
682
|
+
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
679
683
|
var _contentTypesUrl;
|
|
680
684
|
var _entriesUrl;
|
|
681
685
|
var _ContentClient = class _ContentClient2 extends ApiClient {
|
|
@@ -782,14 +786,18 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
782
786
|
constructor(options) {
|
|
783
787
|
super(options);
|
|
784
788
|
}
|
|
785
|
-
/** Fetches
|
|
786
|
-
async
|
|
789
|
+
/** Fetches a list of DataTypes for a project */
|
|
790
|
+
async list(options) {
|
|
787
791
|
const { projectId } = this.options;
|
|
788
792
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8), { ...options, projectId });
|
|
789
793
|
return await this.apiClient(fetchUri);
|
|
790
794
|
}
|
|
795
|
+
/** @deprecated Use {@link list} instead. */
|
|
796
|
+
async get(options) {
|
|
797
|
+
return this.list(options);
|
|
798
|
+
}
|
|
791
799
|
/** Updates or creates (based on id) a DataType */
|
|
792
|
-
async
|
|
800
|
+
async save(body) {
|
|
793
801
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
|
|
794
802
|
await this.apiClient(fetchUri, {
|
|
795
803
|
method: "PUT",
|
|
@@ -797,6 +805,10 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
797
805
|
expectNoContent: true
|
|
798
806
|
});
|
|
799
807
|
}
|
|
808
|
+
/** @deprecated Use {@link save} instead. */
|
|
809
|
+
async upsert(body) {
|
|
810
|
+
return this.save(body);
|
|
811
|
+
}
|
|
800
812
|
/** Deletes a DataType */
|
|
801
813
|
async remove(body) {
|
|
802
814
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
|
|
@@ -809,10 +821,6 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
809
821
|
};
|
|
810
822
|
_url8 = /* @__PURE__ */ new WeakMap();
|
|
811
823
|
__privateAdd2(_DataTypeClient, _url8, "/api/v1/data-types");
|
|
812
|
-
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
813
|
-
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
814
|
-
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
815
|
-
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
816
824
|
var _baseUrl;
|
|
817
825
|
var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2 extends ApiClient {
|
|
818
826
|
constructor(options) {
|
|
@@ -870,20 +878,28 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
870
878
|
* When teamId is provided, returns a single team with its projects.
|
|
871
879
|
* When omitted, returns all accessible teams and their projects.
|
|
872
880
|
*/
|
|
873
|
-
async
|
|
881
|
+
async list(options) {
|
|
874
882
|
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
|
|
875
883
|
return await this.apiClient(fetchUri);
|
|
876
884
|
}
|
|
885
|
+
/** @deprecated Use {@link list} instead. */
|
|
886
|
+
async getProjects(options) {
|
|
887
|
+
return this.list(options);
|
|
888
|
+
}
|
|
877
889
|
/** Updates or creates (based on id) a Project */
|
|
878
|
-
async
|
|
890
|
+
async save(body) {
|
|
879
891
|
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22));
|
|
880
892
|
return await this.apiClient(fetchUri, {
|
|
881
893
|
method: "PUT",
|
|
882
894
|
body: JSON.stringify({ ...body })
|
|
883
895
|
});
|
|
884
896
|
}
|
|
897
|
+
/** @deprecated Use {@link save} instead. */
|
|
898
|
+
async upsert(body) {
|
|
899
|
+
return this.save(body);
|
|
900
|
+
}
|
|
885
901
|
/** Deletes a Project */
|
|
886
|
-
async
|
|
902
|
+
async remove(body) {
|
|
887
903
|
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22));
|
|
888
904
|
await this.apiClient(fetchUri, {
|
|
889
905
|
method: "DELETE",
|
|
@@ -891,6 +907,10 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
891
907
|
expectNoContent: true
|
|
892
908
|
});
|
|
893
909
|
}
|
|
910
|
+
/** @deprecated Use {@link remove} instead. */
|
|
911
|
+
async delete(body) {
|
|
912
|
+
return this.remove(body);
|
|
913
|
+
}
|
|
894
914
|
};
|
|
895
915
|
_url22 = /* @__PURE__ */ new WeakMap();
|
|
896
916
|
_projectsUrl = /* @__PURE__ */ new WeakMap();
|