@uniformdev/canvas 19.63.3-alpha.0 → 19.66.1
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/index.d.mts +2628 -1129
- package/dist/index.d.ts +2628 -1129
- package/dist/index.esm.js +15 -16
- package/dist/index.js +15 -16
- package/dist/index.mjs +15 -16
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
@@ -478,19 +478,10 @@ var CanvasClient = class extends ApiClient {
|
|
478
478
|
this.edgeApiHost = (_a = options.edgeApiHost) != null ? _a : "https://uniform.global";
|
479
479
|
}
|
480
480
|
/** Fetches lists of Canvas compositions, optionally by type */
|
481
|
-
async getCompositionList(
|
481
|
+
async getCompositionList(options) {
|
482
482
|
const { projectId } = this.options;
|
483
|
-
|
484
|
-
|
485
|
-
return this.apiClient(fetchUri);
|
486
|
-
}
|
487
|
-
const edgeParams = {
|
488
|
-
...params,
|
489
|
-
projectId,
|
490
|
-
...params.diagnostics ? { diagnostics: "true" } : {}
|
491
|
-
};
|
492
|
-
const edgeUrl = this.createUrl("/api/v1/compositions", edgeParams, this.edgeApiHost);
|
493
|
-
return this.apiClient(edgeUrl);
|
483
|
+
const fetchUri = this.createUrl(CANVAS_URL, { ...options, projectId });
|
484
|
+
return await this.apiClient(fetchUri);
|
494
485
|
}
|
495
486
|
getCompositionByNodePath(options) {
|
496
487
|
return this.getOneComposition(options);
|
@@ -508,12 +499,12 @@ var CanvasClient = class extends ApiClient {
|
|
508
499
|
return this.getOneComposition(options);
|
509
500
|
}
|
510
501
|
/** Fetches historical versions of a composition or pattern */
|
511
|
-
async
|
512
|
-
const
|
502
|
+
async getCompositionHistory(options) {
|
503
|
+
const historyUrl = this.createUrl("/api/v1/canvas-history", {
|
513
504
|
...options,
|
514
505
|
projectId: this.options.projectId
|
515
506
|
});
|
516
|
-
return this.apiClient(
|
507
|
+
return this.apiClient(historyUrl);
|
517
508
|
}
|
518
509
|
getOneComposition({
|
519
510
|
skipDataResolution,
|
@@ -555,7 +546,7 @@ var CanvasClient = class extends ApiClient {
|
|
555
546
|
async getComponentDefinitions(options) {
|
556
547
|
const { projectId } = this.options;
|
557
548
|
const fetchUri = this.createUrl("/api/v1/canvas-definitions", { ...options, projectId });
|
558
|
-
return this.apiClient(fetchUri);
|
549
|
+
return await this.apiClient(fetchUri);
|
559
550
|
}
|
560
551
|
/** Updates or creates a Canvas component definition */
|
561
552
|
async updateComponentDefinition(body) {
|
@@ -708,6 +699,14 @@ var _ContentClient = class _ContentClient extends ApiClient4 {
|
|
708
699
|
const fetchUri = skipDataResolution ? this.createUrl(__privateGet(_ContentClient, _entriesUrl), { ...params, projectId }) : this.createUrl(__privateGet(_ContentClient, _entriesUrl), this.getEdgeOptions(params), this.edgeApiHost);
|
709
700
|
return this.apiClient(fetchUri);
|
710
701
|
}
|
702
|
+
/** Fetches historical versions of an entry */
|
703
|
+
async getEntryHistory(options) {
|
704
|
+
const historyUrl = this.createUrl("/api/v1/entries-history", {
|
705
|
+
...options,
|
706
|
+
projectId: this.options.projectId
|
707
|
+
});
|
708
|
+
return this.apiClient(historyUrl);
|
709
|
+
}
|
711
710
|
async upsertContentType(body) {
|
712
711
|
const fetchUri = this.createUrl(__privateGet(_ContentClient, _contentTypesUrl));
|
713
712
|
await this.apiClient(fetchUri, {
|
package/dist/index.js
CHANGED
@@ -590,19 +590,10 @@ var CanvasClient = class extends import_api2.ApiClient {
|
|
590
590
|
this.edgeApiHost = (_a = options.edgeApiHost) != null ? _a : "https://uniform.global";
|
591
591
|
}
|
592
592
|
/** Fetches lists of Canvas compositions, optionally by type */
|
593
|
-
async getCompositionList(
|
593
|
+
async getCompositionList(options) {
|
594
594
|
const { projectId } = this.options;
|
595
|
-
|
596
|
-
|
597
|
-
return this.apiClient(fetchUri);
|
598
|
-
}
|
599
|
-
const edgeParams = {
|
600
|
-
...params,
|
601
|
-
projectId,
|
602
|
-
...params.diagnostics ? { diagnostics: "true" } : {}
|
603
|
-
};
|
604
|
-
const edgeUrl = this.createUrl("/api/v1/compositions", edgeParams, this.edgeApiHost);
|
605
|
-
return this.apiClient(edgeUrl);
|
595
|
+
const fetchUri = this.createUrl(CANVAS_URL, { ...options, projectId });
|
596
|
+
return await this.apiClient(fetchUri);
|
606
597
|
}
|
607
598
|
getCompositionByNodePath(options) {
|
608
599
|
return this.getOneComposition(options);
|
@@ -620,12 +611,12 @@ var CanvasClient = class extends import_api2.ApiClient {
|
|
620
611
|
return this.getOneComposition(options);
|
621
612
|
}
|
622
613
|
/** Fetches historical versions of a composition or pattern */
|
623
|
-
async
|
624
|
-
const
|
614
|
+
async getCompositionHistory(options) {
|
615
|
+
const historyUrl = this.createUrl("/api/v1/canvas-history", {
|
625
616
|
...options,
|
626
617
|
projectId: this.options.projectId
|
627
618
|
});
|
628
|
-
return this.apiClient(
|
619
|
+
return this.apiClient(historyUrl);
|
629
620
|
}
|
630
621
|
getOneComposition({
|
631
622
|
skipDataResolution,
|
@@ -667,7 +658,7 @@ var CanvasClient = class extends import_api2.ApiClient {
|
|
667
658
|
async getComponentDefinitions(options) {
|
668
659
|
const { projectId } = this.options;
|
669
660
|
const fetchUri = this.createUrl("/api/v1/canvas-definitions", { ...options, projectId });
|
670
|
-
return this.apiClient(fetchUri);
|
661
|
+
return await this.apiClient(fetchUri);
|
671
662
|
}
|
672
663
|
/** Updates or creates a Canvas component definition */
|
673
664
|
async updateComponentDefinition(body) {
|
@@ -820,6 +811,14 @@ var _ContentClient = class _ContentClient extends import_api5.ApiClient {
|
|
820
811
|
const fetchUri = skipDataResolution ? this.createUrl(__privateGet(_ContentClient, _entriesUrl), { ...params, projectId }) : this.createUrl(__privateGet(_ContentClient, _entriesUrl), this.getEdgeOptions(params), this.edgeApiHost);
|
821
812
|
return this.apiClient(fetchUri);
|
822
813
|
}
|
814
|
+
/** Fetches historical versions of an entry */
|
815
|
+
async getEntryHistory(options) {
|
816
|
+
const historyUrl = this.createUrl("/api/v1/entries-history", {
|
817
|
+
...options,
|
818
|
+
projectId: this.options.projectId
|
819
|
+
});
|
820
|
+
return this.apiClient(historyUrl);
|
821
|
+
}
|
823
822
|
async upsertContentType(body) {
|
824
823
|
const fetchUri = this.createUrl(__privateGet(_ContentClient, _contentTypesUrl));
|
825
824
|
await this.apiClient(fetchUri, {
|
package/dist/index.mjs
CHANGED
@@ -478,19 +478,10 @@ var CanvasClient = class extends ApiClient {
|
|
478
478
|
this.edgeApiHost = (_a = options.edgeApiHost) != null ? _a : "https://uniform.global";
|
479
479
|
}
|
480
480
|
/** Fetches lists of Canvas compositions, optionally by type */
|
481
|
-
async getCompositionList(
|
481
|
+
async getCompositionList(options) {
|
482
482
|
const { projectId } = this.options;
|
483
|
-
|
484
|
-
|
485
|
-
return this.apiClient(fetchUri);
|
486
|
-
}
|
487
|
-
const edgeParams = {
|
488
|
-
...params,
|
489
|
-
projectId,
|
490
|
-
...params.diagnostics ? { diagnostics: "true" } : {}
|
491
|
-
};
|
492
|
-
const edgeUrl = this.createUrl("/api/v1/compositions", edgeParams, this.edgeApiHost);
|
493
|
-
return this.apiClient(edgeUrl);
|
483
|
+
const fetchUri = this.createUrl(CANVAS_URL, { ...options, projectId });
|
484
|
+
return await this.apiClient(fetchUri);
|
494
485
|
}
|
495
486
|
getCompositionByNodePath(options) {
|
496
487
|
return this.getOneComposition(options);
|
@@ -508,12 +499,12 @@ var CanvasClient = class extends ApiClient {
|
|
508
499
|
return this.getOneComposition(options);
|
509
500
|
}
|
510
501
|
/** Fetches historical versions of a composition or pattern */
|
511
|
-
async
|
512
|
-
const
|
502
|
+
async getCompositionHistory(options) {
|
503
|
+
const historyUrl = this.createUrl("/api/v1/canvas-history", {
|
513
504
|
...options,
|
514
505
|
projectId: this.options.projectId
|
515
506
|
});
|
516
|
-
return this.apiClient(
|
507
|
+
return this.apiClient(historyUrl);
|
517
508
|
}
|
518
509
|
getOneComposition({
|
519
510
|
skipDataResolution,
|
@@ -555,7 +546,7 @@ var CanvasClient = class extends ApiClient {
|
|
555
546
|
async getComponentDefinitions(options) {
|
556
547
|
const { projectId } = this.options;
|
557
548
|
const fetchUri = this.createUrl("/api/v1/canvas-definitions", { ...options, projectId });
|
558
|
-
return this.apiClient(fetchUri);
|
549
|
+
return await this.apiClient(fetchUri);
|
559
550
|
}
|
560
551
|
/** Updates or creates a Canvas component definition */
|
561
552
|
async updateComponentDefinition(body) {
|
@@ -708,6 +699,14 @@ var _ContentClient = class _ContentClient extends ApiClient4 {
|
|
708
699
|
const fetchUri = skipDataResolution ? this.createUrl(__privateGet(_ContentClient, _entriesUrl), { ...params, projectId }) : this.createUrl(__privateGet(_ContentClient, _entriesUrl), this.getEdgeOptions(params), this.edgeApiHost);
|
709
700
|
return this.apiClient(fetchUri);
|
710
701
|
}
|
702
|
+
/** Fetches historical versions of an entry */
|
703
|
+
async getEntryHistory(options) {
|
704
|
+
const historyUrl = this.createUrl("/api/v1/entries-history", {
|
705
|
+
...options,
|
706
|
+
projectId: this.options.projectId
|
707
|
+
});
|
708
|
+
return this.apiClient(historyUrl);
|
709
|
+
}
|
711
710
|
async upsertContentType(body) {
|
712
711
|
const fetchUri = this.createUrl(__privateGet(_ContentClient, _contentTypesUrl));
|
713
712
|
await this.apiClient(fetchUri, {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uniformdev/canvas",
|
3
|
-
"version": "19.
|
3
|
+
"version": "19.66.1",
|
4
4
|
"description": "Common functionality and types for Uniform Canvas",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"main": "./dist/index.js",
|
@@ -38,7 +38,7 @@
|
|
38
38
|
"pusher-js": "8.2.0"
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
|
-
"@uniformdev/context": "19.
|
41
|
+
"@uniformdev/context": "19.66.1",
|
42
42
|
"immer": "9.0.21"
|
43
43
|
},
|
44
44
|
"files": [
|
@@ -47,5 +47,5 @@
|
|
47
47
|
"publishConfig": {
|
48
48
|
"access": "public"
|
49
49
|
},
|
50
|
-
"gitHead": "
|
50
|
+
"gitHead": "80e9cf7f60f95245269938596f00813b48a304f3"
|
51
51
|
}
|