@uniformdev/next-app-router 20.50.2-alpha.167 → 20.50.2-alpha.180
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 +18 -48
- package/dist/cache.mjs +18 -48
- package/dist/component.js +10 -30
- package/dist/component.mjs +10 -30
- package/dist/handler.js +135 -120
- package/dist/handler.mjs +135 -120
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +150 -144
- package/dist/index.js +150 -144
- package/dist/index.mjs +150 -144
- package/dist/middleware.js +148 -140
- package/dist/middleware.mjs +148 -140
- package/package.json +8 -8
package/dist/cache.js
CHANGED
|
@@ -1249,14 +1249,6 @@ function projectionToQuery(spec) {
|
|
|
1249
1249
|
}
|
|
1250
1250
|
return out;
|
|
1251
1251
|
}
|
|
1252
|
-
var CANVAS_DRAFT_STATE = 0;
|
|
1253
|
-
var CANVAS_PUBLISHED_STATE = 64;
|
|
1254
|
-
var CANVAS_EDITOR_STATE = 63;
|
|
1255
|
-
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
1256
|
-
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
1257
|
-
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
1258
|
-
var IN_CONTEXT_EDITOR_QUERY_STRING_PARAM = "is_incontext_editing_mode";
|
|
1259
|
-
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
1260
1252
|
var _contentTypesUrl;
|
|
1261
1253
|
var _entriesUrl;
|
|
1262
1254
|
var _ContentClient = class _ContentClient2 extends ApiClient {
|
|
@@ -1363,18 +1355,14 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
1363
1355
|
constructor(options) {
|
|
1364
1356
|
super(options);
|
|
1365
1357
|
}
|
|
1366
|
-
/** Fetches
|
|
1367
|
-
async
|
|
1358
|
+
/** Fetches all DataTypes for a project */
|
|
1359
|
+
async get(options) {
|
|
1368
1360
|
const { projectId } = this.options;
|
|
1369
1361
|
const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8), { ...options, projectId });
|
|
1370
1362
|
return await this.apiClient(fetchUri);
|
|
1371
1363
|
}
|
|
1372
|
-
/** @deprecated Use {@link list} instead. */
|
|
1373
|
-
async get(options) {
|
|
1374
|
-
return this.list(options);
|
|
1375
|
-
}
|
|
1376
1364
|
/** Updates or creates (based on id) a DataType */
|
|
1377
|
-
async
|
|
1365
|
+
async upsert(body) {
|
|
1378
1366
|
const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8));
|
|
1379
1367
|
await this.apiClient(fetchUri, {
|
|
1380
1368
|
method: "PUT",
|
|
@@ -1382,10 +1370,6 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
1382
1370
|
expectNoContent: true
|
|
1383
1371
|
});
|
|
1384
1372
|
}
|
|
1385
|
-
/** @deprecated Use {@link save} instead. */
|
|
1386
|
-
async upsert(body) {
|
|
1387
|
-
return this.save(body);
|
|
1388
|
-
}
|
|
1389
1373
|
/** Deletes a DataType */
|
|
1390
1374
|
async remove(body) {
|
|
1391
1375
|
const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8));
|
|
@@ -1398,6 +1382,14 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
1398
1382
|
};
|
|
1399
1383
|
_url8 = /* @__PURE__ */ new WeakMap();
|
|
1400
1384
|
__privateAdd3(_DataTypeClient, _url8, "/api/v1/data-types");
|
|
1385
|
+
var CANVAS_DRAFT_STATE = 0;
|
|
1386
|
+
var CANVAS_PUBLISHED_STATE = 64;
|
|
1387
|
+
var CANVAS_EDITOR_STATE = 63;
|
|
1388
|
+
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
1389
|
+
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
1390
|
+
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
1391
|
+
var IN_CONTEXT_EDITOR_QUERY_STRING_PARAM = "is_incontext_editing_mode";
|
|
1392
|
+
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
1401
1393
|
var _baseUrl;
|
|
1402
1394
|
var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2 extends ApiClient {
|
|
1403
1395
|
constructor(options) {
|
|
@@ -1455,28 +1447,20 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
1455
1447
|
* When teamId is provided, returns a single team with its projects.
|
|
1456
1448
|
* When omitted, returns all accessible teams and their projects.
|
|
1457
1449
|
*/
|
|
1458
|
-
async
|
|
1450
|
+
async getProjects(options) {
|
|
1459
1451
|
const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
|
|
1460
1452
|
return await this.apiClient(fetchUri);
|
|
1461
1453
|
}
|
|
1462
|
-
/** @deprecated Use {@link list} instead. */
|
|
1463
|
-
async getProjects(options) {
|
|
1464
|
-
return this.list(options);
|
|
1465
|
-
}
|
|
1466
1454
|
/** Updates or creates (based on id) a Project */
|
|
1467
|
-
async
|
|
1455
|
+
async upsert(body) {
|
|
1468
1456
|
const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22));
|
|
1469
1457
|
return await this.apiClient(fetchUri, {
|
|
1470
1458
|
method: "PUT",
|
|
1471
1459
|
body: JSON.stringify({ ...body })
|
|
1472
1460
|
});
|
|
1473
1461
|
}
|
|
1474
|
-
/** @deprecated Use {@link save} instead. */
|
|
1475
|
-
async upsert(body) {
|
|
1476
|
-
return this.save(body);
|
|
1477
|
-
}
|
|
1478
1462
|
/** Deletes a Project */
|
|
1479
|
-
async
|
|
1463
|
+
async delete(body) {
|
|
1480
1464
|
const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22));
|
|
1481
1465
|
await this.apiClient(fetchUri, {
|
|
1482
1466
|
method: "DELETE",
|
|
@@ -1484,10 +1468,6 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
1484
1468
|
expectNoContent: true
|
|
1485
1469
|
});
|
|
1486
1470
|
}
|
|
1487
|
-
/** @deprecated Use {@link remove} instead. */
|
|
1488
|
-
async delete(body) {
|
|
1489
|
-
return this.remove(body);
|
|
1490
|
-
}
|
|
1491
1471
|
};
|
|
1492
1472
|
_url22 = /* @__PURE__ */ new WeakMap();
|
|
1493
1473
|
_projectsUrl = /* @__PURE__ */ new WeakMap();
|
|
@@ -1503,14 +1483,8 @@ var RouteClient = class extends ApiClient {
|
|
|
1503
1483
|
super(options);
|
|
1504
1484
|
this.edgeApiHost = (_a = options.edgeApiHost) != null ? _a : "https://uniform.global";
|
|
1505
1485
|
}
|
|
1506
|
-
/**
|
|
1507
|
-
|
|
1508
|
-
*
|
|
1509
|
-
* An optional `select` projection applies to the resolved composition when
|
|
1510
|
-
* the route matches one; redirect / notFound responses pass through
|
|
1511
|
-
* untouched.
|
|
1512
|
-
*/
|
|
1513
|
-
async get(options) {
|
|
1486
|
+
/** Fetches lists of Canvas compositions, optionally by type */
|
|
1487
|
+
async getRoute(options) {
|
|
1514
1488
|
const { projectId } = this.options;
|
|
1515
1489
|
const { select, ...rest } = options != null ? options : {};
|
|
1516
1490
|
const rewrittenSelect = projectionToQuery(select);
|
|
@@ -1520,10 +1494,6 @@ var RouteClient = class extends ApiClient {
|
|
|
1520
1494
|
this.options.disableSWR ? { headers: { "x-disable-swr": "true" } } : void 0
|
|
1521
1495
|
);
|
|
1522
1496
|
}
|
|
1523
|
-
/** @deprecated use {@link RouteClient.get} instead (renamed). */
|
|
1524
|
-
async getRoute(options) {
|
|
1525
|
-
return this.get(options);
|
|
1526
|
-
}
|
|
1527
1497
|
};
|
|
1528
1498
|
|
|
1529
1499
|
// src/data/client.ts
|
|
@@ -1973,14 +1943,14 @@ var DefaultDataClient = class {
|
|
|
1973
1943
|
if (oldCachedRoute) {
|
|
1974
1944
|
(0, import_functions.waitUntil)(
|
|
1975
1945
|
(async () => {
|
|
1976
|
-
const result2 = await routeClient.
|
|
1946
|
+
const result2 = await routeClient.getRoute(route);
|
|
1977
1947
|
await cacheNewRoute(result2);
|
|
1978
1948
|
})()
|
|
1979
1949
|
);
|
|
1980
1950
|
return oldCachedRoute;
|
|
1981
1951
|
}
|
|
1982
1952
|
}
|
|
1983
|
-
const result = await routeClient.
|
|
1953
|
+
const result = await routeClient.getRoute(route);
|
|
1984
1954
|
(0, import_functions.waitUntil)(
|
|
1985
1955
|
(async () => {
|
|
1986
1956
|
await Promise.all([
|
package/dist/cache.mjs
CHANGED
|
@@ -1236,14 +1236,6 @@ function projectionToQuery(spec) {
|
|
|
1236
1236
|
}
|
|
1237
1237
|
return out;
|
|
1238
1238
|
}
|
|
1239
|
-
var CANVAS_DRAFT_STATE = 0;
|
|
1240
|
-
var CANVAS_PUBLISHED_STATE = 64;
|
|
1241
|
-
var CANVAS_EDITOR_STATE = 63;
|
|
1242
|
-
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
1243
|
-
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
1244
|
-
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
1245
|
-
var IN_CONTEXT_EDITOR_QUERY_STRING_PARAM = "is_incontext_editing_mode";
|
|
1246
|
-
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
1247
1239
|
var _contentTypesUrl;
|
|
1248
1240
|
var _entriesUrl;
|
|
1249
1241
|
var _ContentClient = class _ContentClient2 extends ApiClient {
|
|
@@ -1350,18 +1342,14 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
1350
1342
|
constructor(options) {
|
|
1351
1343
|
super(options);
|
|
1352
1344
|
}
|
|
1353
|
-
/** Fetches
|
|
1354
|
-
async
|
|
1345
|
+
/** Fetches all DataTypes for a project */
|
|
1346
|
+
async get(options) {
|
|
1355
1347
|
const { projectId } = this.options;
|
|
1356
1348
|
const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8), { ...options, projectId });
|
|
1357
1349
|
return await this.apiClient(fetchUri);
|
|
1358
1350
|
}
|
|
1359
|
-
/** @deprecated Use {@link list} instead. */
|
|
1360
|
-
async get(options) {
|
|
1361
|
-
return this.list(options);
|
|
1362
|
-
}
|
|
1363
1351
|
/** Updates or creates (based on id) a DataType */
|
|
1364
|
-
async
|
|
1352
|
+
async upsert(body) {
|
|
1365
1353
|
const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8));
|
|
1366
1354
|
await this.apiClient(fetchUri, {
|
|
1367
1355
|
method: "PUT",
|
|
@@ -1369,10 +1357,6 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
1369
1357
|
expectNoContent: true
|
|
1370
1358
|
});
|
|
1371
1359
|
}
|
|
1372
|
-
/** @deprecated Use {@link save} instead. */
|
|
1373
|
-
async upsert(body) {
|
|
1374
|
-
return this.save(body);
|
|
1375
|
-
}
|
|
1376
1360
|
/** Deletes a DataType */
|
|
1377
1361
|
async remove(body) {
|
|
1378
1362
|
const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8));
|
|
@@ -1385,6 +1369,14 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
1385
1369
|
};
|
|
1386
1370
|
_url8 = /* @__PURE__ */ new WeakMap();
|
|
1387
1371
|
__privateAdd3(_DataTypeClient, _url8, "/api/v1/data-types");
|
|
1372
|
+
var CANVAS_DRAFT_STATE = 0;
|
|
1373
|
+
var CANVAS_PUBLISHED_STATE = 64;
|
|
1374
|
+
var CANVAS_EDITOR_STATE = 63;
|
|
1375
|
+
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
1376
|
+
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
1377
|
+
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
1378
|
+
var IN_CONTEXT_EDITOR_QUERY_STRING_PARAM = "is_incontext_editing_mode";
|
|
1379
|
+
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
1388
1380
|
var _baseUrl;
|
|
1389
1381
|
var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2 extends ApiClient {
|
|
1390
1382
|
constructor(options) {
|
|
@@ -1442,28 +1434,20 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
1442
1434
|
* When teamId is provided, returns a single team with its projects.
|
|
1443
1435
|
* When omitted, returns all accessible teams and their projects.
|
|
1444
1436
|
*/
|
|
1445
|
-
async
|
|
1437
|
+
async getProjects(options) {
|
|
1446
1438
|
const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
|
|
1447
1439
|
return await this.apiClient(fetchUri);
|
|
1448
1440
|
}
|
|
1449
|
-
/** @deprecated Use {@link list} instead. */
|
|
1450
|
-
async getProjects(options) {
|
|
1451
|
-
return this.list(options);
|
|
1452
|
-
}
|
|
1453
1441
|
/** Updates or creates (based on id) a Project */
|
|
1454
|
-
async
|
|
1442
|
+
async upsert(body) {
|
|
1455
1443
|
const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22));
|
|
1456
1444
|
return await this.apiClient(fetchUri, {
|
|
1457
1445
|
method: "PUT",
|
|
1458
1446
|
body: JSON.stringify({ ...body })
|
|
1459
1447
|
});
|
|
1460
1448
|
}
|
|
1461
|
-
/** @deprecated Use {@link save} instead. */
|
|
1462
|
-
async upsert(body) {
|
|
1463
|
-
return this.save(body);
|
|
1464
|
-
}
|
|
1465
1449
|
/** Deletes a Project */
|
|
1466
|
-
async
|
|
1450
|
+
async delete(body) {
|
|
1467
1451
|
const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22));
|
|
1468
1452
|
await this.apiClient(fetchUri, {
|
|
1469
1453
|
method: "DELETE",
|
|
@@ -1471,10 +1455,6 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
1471
1455
|
expectNoContent: true
|
|
1472
1456
|
});
|
|
1473
1457
|
}
|
|
1474
|
-
/** @deprecated Use {@link remove} instead. */
|
|
1475
|
-
async delete(body) {
|
|
1476
|
-
return this.remove(body);
|
|
1477
|
-
}
|
|
1478
1458
|
};
|
|
1479
1459
|
_url22 = /* @__PURE__ */ new WeakMap();
|
|
1480
1460
|
_projectsUrl = /* @__PURE__ */ new WeakMap();
|
|
@@ -1490,14 +1470,8 @@ var RouteClient = class extends ApiClient {
|
|
|
1490
1470
|
super(options);
|
|
1491
1471
|
this.edgeApiHost = (_a = options.edgeApiHost) != null ? _a : "https://uniform.global";
|
|
1492
1472
|
}
|
|
1493
|
-
/**
|
|
1494
|
-
|
|
1495
|
-
*
|
|
1496
|
-
* An optional `select` projection applies to the resolved composition when
|
|
1497
|
-
* the route matches one; redirect / notFound responses pass through
|
|
1498
|
-
* untouched.
|
|
1499
|
-
*/
|
|
1500
|
-
async get(options) {
|
|
1473
|
+
/** Fetches lists of Canvas compositions, optionally by type */
|
|
1474
|
+
async getRoute(options) {
|
|
1501
1475
|
const { projectId } = this.options;
|
|
1502
1476
|
const { select, ...rest } = options != null ? options : {};
|
|
1503
1477
|
const rewrittenSelect = projectionToQuery(select);
|
|
@@ -1507,10 +1481,6 @@ var RouteClient = class extends ApiClient {
|
|
|
1507
1481
|
this.options.disableSWR ? { headers: { "x-disable-swr": "true" } } : void 0
|
|
1508
1482
|
);
|
|
1509
1483
|
}
|
|
1510
|
-
/** @deprecated use {@link RouteClient.get} instead (renamed). */
|
|
1511
|
-
async getRoute(options) {
|
|
1512
|
-
return this.get(options);
|
|
1513
|
-
}
|
|
1514
1484
|
};
|
|
1515
1485
|
|
|
1516
1486
|
// src/data/client.ts
|
|
@@ -1960,14 +1930,14 @@ var DefaultDataClient = class {
|
|
|
1960
1930
|
if (oldCachedRoute) {
|
|
1961
1931
|
waitUntil(
|
|
1962
1932
|
(async () => {
|
|
1963
|
-
const result2 = await routeClient.
|
|
1933
|
+
const result2 = await routeClient.getRoute(route);
|
|
1964
1934
|
await cacheNewRoute(result2);
|
|
1965
1935
|
})()
|
|
1966
1936
|
);
|
|
1967
1937
|
return oldCachedRoute;
|
|
1968
1938
|
}
|
|
1969
1939
|
}
|
|
1970
|
-
const result = await routeClient.
|
|
1940
|
+
const result = await routeClient.getRoute(route);
|
|
1971
1941
|
waitUntil(
|
|
1972
1942
|
(async () => {
|
|
1973
1943
|
await Promise.all([
|
package/dist/component.js
CHANGED
|
@@ -671,10 +671,6 @@ function projectionToQuery(spec) {
|
|
|
671
671
|
}
|
|
672
672
|
return out;
|
|
673
673
|
}
|
|
674
|
-
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
675
|
-
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
676
|
-
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
677
|
-
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
678
674
|
var _contentTypesUrl;
|
|
679
675
|
var _entriesUrl;
|
|
680
676
|
var _ContentClient = class _ContentClient2 extends ApiClient {
|
|
@@ -781,18 +777,14 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
781
777
|
constructor(options) {
|
|
782
778
|
super(options);
|
|
783
779
|
}
|
|
784
|
-
/** Fetches
|
|
785
|
-
async
|
|
780
|
+
/** Fetches all DataTypes for a project */
|
|
781
|
+
async get(options) {
|
|
786
782
|
const { projectId } = this.options;
|
|
787
783
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8), { ...options, projectId });
|
|
788
784
|
return await this.apiClient(fetchUri);
|
|
789
785
|
}
|
|
790
|
-
/** @deprecated Use {@link list} instead. */
|
|
791
|
-
async get(options) {
|
|
792
|
-
return this.list(options);
|
|
793
|
-
}
|
|
794
786
|
/** Updates or creates (based on id) a DataType */
|
|
795
|
-
async
|
|
787
|
+
async upsert(body) {
|
|
796
788
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
|
|
797
789
|
await this.apiClient(fetchUri, {
|
|
798
790
|
method: "PUT",
|
|
@@ -800,10 +792,6 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
800
792
|
expectNoContent: true
|
|
801
793
|
});
|
|
802
794
|
}
|
|
803
|
-
/** @deprecated Use {@link save} instead. */
|
|
804
|
-
async upsert(body) {
|
|
805
|
-
return this.save(body);
|
|
806
|
-
}
|
|
807
795
|
/** Deletes a DataType */
|
|
808
796
|
async remove(body) {
|
|
809
797
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
|
|
@@ -816,6 +804,10 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
816
804
|
};
|
|
817
805
|
_url8 = /* @__PURE__ */ new WeakMap();
|
|
818
806
|
__privateAdd2(_DataTypeClient, _url8, "/api/v1/data-types");
|
|
807
|
+
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
808
|
+
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
809
|
+
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
810
|
+
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
819
811
|
var _baseUrl;
|
|
820
812
|
var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2 extends ApiClient {
|
|
821
813
|
constructor(options) {
|
|
@@ -873,28 +865,20 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
873
865
|
* When teamId is provided, returns a single team with its projects.
|
|
874
866
|
* When omitted, returns all accessible teams and their projects.
|
|
875
867
|
*/
|
|
876
|
-
async
|
|
868
|
+
async getProjects(options) {
|
|
877
869
|
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
|
|
878
870
|
return await this.apiClient(fetchUri);
|
|
879
871
|
}
|
|
880
|
-
/** @deprecated Use {@link list} instead. */
|
|
881
|
-
async getProjects(options) {
|
|
882
|
-
return this.list(options);
|
|
883
|
-
}
|
|
884
872
|
/** Updates or creates (based on id) a Project */
|
|
885
|
-
async
|
|
873
|
+
async upsert(body) {
|
|
886
874
|
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22));
|
|
887
875
|
return await this.apiClient(fetchUri, {
|
|
888
876
|
method: "PUT",
|
|
889
877
|
body: JSON.stringify({ ...body })
|
|
890
878
|
});
|
|
891
879
|
}
|
|
892
|
-
/** @deprecated Use {@link save} instead. */
|
|
893
|
-
async upsert(body) {
|
|
894
|
-
return this.save(body);
|
|
895
|
-
}
|
|
896
880
|
/** Deletes a Project */
|
|
897
|
-
async
|
|
881
|
+
async delete(body) {
|
|
898
882
|
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22));
|
|
899
883
|
await this.apiClient(fetchUri, {
|
|
900
884
|
method: "DELETE",
|
|
@@ -902,10 +886,6 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
902
886
|
expectNoContent: true
|
|
903
887
|
});
|
|
904
888
|
}
|
|
905
|
-
/** @deprecated Use {@link remove} instead. */
|
|
906
|
-
async delete(body) {
|
|
907
|
-
return this.remove(body);
|
|
908
|
-
}
|
|
909
889
|
};
|
|
910
890
|
_url22 = /* @__PURE__ */ new WeakMap();
|
|
911
891
|
_projectsUrl = /* @__PURE__ */ new WeakMap();
|
package/dist/component.mjs
CHANGED
|
@@ -656,10 +656,6 @@ function projectionToQuery(spec) {
|
|
|
656
656
|
}
|
|
657
657
|
return out;
|
|
658
658
|
}
|
|
659
|
-
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
660
|
-
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
661
|
-
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
662
|
-
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
663
659
|
var _contentTypesUrl;
|
|
664
660
|
var _entriesUrl;
|
|
665
661
|
var _ContentClient = class _ContentClient2 extends ApiClient {
|
|
@@ -766,18 +762,14 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
766
762
|
constructor(options) {
|
|
767
763
|
super(options);
|
|
768
764
|
}
|
|
769
|
-
/** Fetches
|
|
770
|
-
async
|
|
765
|
+
/** Fetches all DataTypes for a project */
|
|
766
|
+
async get(options) {
|
|
771
767
|
const { projectId } = this.options;
|
|
772
768
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8), { ...options, projectId });
|
|
773
769
|
return await this.apiClient(fetchUri);
|
|
774
770
|
}
|
|
775
|
-
/** @deprecated Use {@link list} instead. */
|
|
776
|
-
async get(options) {
|
|
777
|
-
return this.list(options);
|
|
778
|
-
}
|
|
779
771
|
/** Updates or creates (based on id) a DataType */
|
|
780
|
-
async
|
|
772
|
+
async upsert(body) {
|
|
781
773
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
|
|
782
774
|
await this.apiClient(fetchUri, {
|
|
783
775
|
method: "PUT",
|
|
@@ -785,10 +777,6 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
785
777
|
expectNoContent: true
|
|
786
778
|
});
|
|
787
779
|
}
|
|
788
|
-
/** @deprecated Use {@link save} instead. */
|
|
789
|
-
async upsert(body) {
|
|
790
|
-
return this.save(body);
|
|
791
|
-
}
|
|
792
780
|
/** Deletes a DataType */
|
|
793
781
|
async remove(body) {
|
|
794
782
|
const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
|
|
@@ -801,6 +789,10 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
|
|
|
801
789
|
};
|
|
802
790
|
_url8 = /* @__PURE__ */ new WeakMap();
|
|
803
791
|
__privateAdd2(_DataTypeClient, _url8, "/api/v1/data-types");
|
|
792
|
+
var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
|
|
793
|
+
var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
|
|
794
|
+
var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
|
|
795
|
+
var EDGE_MAX_CACHE_TTL = 24 * 60 * 60;
|
|
804
796
|
var _baseUrl;
|
|
805
797
|
var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2 extends ApiClient {
|
|
806
798
|
constructor(options) {
|
|
@@ -858,28 +850,20 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
858
850
|
* When teamId is provided, returns a single team with its projects.
|
|
859
851
|
* When omitted, returns all accessible teams and their projects.
|
|
860
852
|
*/
|
|
861
|
-
async
|
|
853
|
+
async getProjects(options) {
|
|
862
854
|
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
|
|
863
855
|
return await this.apiClient(fetchUri);
|
|
864
856
|
}
|
|
865
|
-
/** @deprecated Use {@link list} instead. */
|
|
866
|
-
async getProjects(options) {
|
|
867
|
-
return this.list(options);
|
|
868
|
-
}
|
|
869
857
|
/** Updates or creates (based on id) a Project */
|
|
870
|
-
async
|
|
858
|
+
async upsert(body) {
|
|
871
859
|
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22));
|
|
872
860
|
return await this.apiClient(fetchUri, {
|
|
873
861
|
method: "PUT",
|
|
874
862
|
body: JSON.stringify({ ...body })
|
|
875
863
|
});
|
|
876
864
|
}
|
|
877
|
-
/** @deprecated Use {@link save} instead. */
|
|
878
|
-
async upsert(body) {
|
|
879
|
-
return this.save(body);
|
|
880
|
-
}
|
|
881
865
|
/** Deletes a Project */
|
|
882
|
-
async
|
|
866
|
+
async delete(body) {
|
|
883
867
|
const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22));
|
|
884
868
|
await this.apiClient(fetchUri, {
|
|
885
869
|
method: "DELETE",
|
|
@@ -887,10 +871,6 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
|
|
|
887
871
|
expectNoContent: true
|
|
888
872
|
});
|
|
889
873
|
}
|
|
890
|
-
/** @deprecated Use {@link remove} instead. */
|
|
891
|
-
async delete(body) {
|
|
892
|
-
return this.remove(body);
|
|
893
|
-
}
|
|
894
874
|
};
|
|
895
875
|
_url22 = /* @__PURE__ */ new WeakMap();
|
|
896
876
|
_projectsUrl = /* @__PURE__ */ new WeakMap();
|