@uniformdev/canvas 19.63.2 → 19.65.1-alpha.4
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 +2633 -1124
- package/dist/index.d.ts +2633 -1124
- package/dist/index.esm.js +25 -7
- package/dist/index.js +25 -7
- package/dist/index.mjs +25 -7
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
@@ -478,10 +478,20 @@ 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(params = {}) {
|
482
482
|
const { projectId } = this.options;
|
483
|
-
const
|
484
|
-
|
483
|
+
const { resolveData, ...originParams } = params;
|
484
|
+
if (!resolveData) {
|
485
|
+
const fetchUri = this.createUrl(CANVAS_URL, { ...originParams, projectId });
|
486
|
+
return this.apiClient(fetchUri);
|
487
|
+
}
|
488
|
+
const edgeParams = {
|
489
|
+
...originParams,
|
490
|
+
projectId,
|
491
|
+
...params.diagnostics ? { diagnostics: "true" } : {}
|
492
|
+
};
|
493
|
+
const edgeUrl = this.createUrl("/api/v1/compositions", edgeParams, this.edgeApiHost);
|
494
|
+
return this.apiClient(edgeUrl);
|
485
495
|
}
|
486
496
|
getCompositionByNodePath(options) {
|
487
497
|
return this.getOneComposition(options);
|
@@ -499,12 +509,12 @@ var CanvasClient = class extends ApiClient {
|
|
499
509
|
return this.getOneComposition(options);
|
500
510
|
}
|
501
511
|
/** Fetches historical versions of a composition or pattern */
|
502
|
-
async
|
503
|
-
const
|
512
|
+
async getCompositionHistory(options) {
|
513
|
+
const historyUrl = this.createUrl("/api/v1/canvas-history", {
|
504
514
|
...options,
|
505
515
|
projectId: this.options.projectId
|
506
516
|
});
|
507
|
-
return this.apiClient(
|
517
|
+
return this.apiClient(historyUrl);
|
508
518
|
}
|
509
519
|
getOneComposition({
|
510
520
|
skipDataResolution,
|
@@ -546,7 +556,7 @@ var CanvasClient = class extends ApiClient {
|
|
546
556
|
async getComponentDefinitions(options) {
|
547
557
|
const { projectId } = this.options;
|
548
558
|
const fetchUri = this.createUrl("/api/v1/canvas-definitions", { ...options, projectId });
|
549
|
-
return
|
559
|
+
return this.apiClient(fetchUri);
|
550
560
|
}
|
551
561
|
/** Updates or creates a Canvas component definition */
|
552
562
|
async updateComponentDefinition(body) {
|
@@ -699,6 +709,14 @@ var _ContentClient = class _ContentClient extends ApiClient4 {
|
|
699
709
|
const fetchUri = skipDataResolution ? this.createUrl(__privateGet(_ContentClient, _entriesUrl), { ...params, projectId }) : this.createUrl(__privateGet(_ContentClient, _entriesUrl), this.getEdgeOptions(params), this.edgeApiHost);
|
700
710
|
return this.apiClient(fetchUri);
|
701
711
|
}
|
712
|
+
/** Fetches historical versions of an entry */
|
713
|
+
async getEntryHistory(options) {
|
714
|
+
const historyUrl = this.createUrl("/api/v1/entries-history", {
|
715
|
+
...options,
|
716
|
+
projectId: this.options.projectId
|
717
|
+
});
|
718
|
+
return this.apiClient(historyUrl);
|
719
|
+
}
|
702
720
|
async upsertContentType(body) {
|
703
721
|
const fetchUri = this.createUrl(__privateGet(_ContentClient, _contentTypesUrl));
|
704
722
|
await this.apiClient(fetchUri, {
|
package/dist/index.js
CHANGED
@@ -590,10 +590,20 @@ 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(params = {}) {
|
594
594
|
const { projectId } = this.options;
|
595
|
-
const
|
596
|
-
|
595
|
+
const { resolveData, ...originParams } = params;
|
596
|
+
if (!resolveData) {
|
597
|
+
const fetchUri = this.createUrl(CANVAS_URL, { ...originParams, projectId });
|
598
|
+
return this.apiClient(fetchUri);
|
599
|
+
}
|
600
|
+
const edgeParams = {
|
601
|
+
...originParams,
|
602
|
+
projectId,
|
603
|
+
...params.diagnostics ? { diagnostics: "true" } : {}
|
604
|
+
};
|
605
|
+
const edgeUrl = this.createUrl("/api/v1/compositions", edgeParams, this.edgeApiHost);
|
606
|
+
return this.apiClient(edgeUrl);
|
597
607
|
}
|
598
608
|
getCompositionByNodePath(options) {
|
599
609
|
return this.getOneComposition(options);
|
@@ -611,12 +621,12 @@ var CanvasClient = class extends import_api2.ApiClient {
|
|
611
621
|
return this.getOneComposition(options);
|
612
622
|
}
|
613
623
|
/** Fetches historical versions of a composition or pattern */
|
614
|
-
async
|
615
|
-
const
|
624
|
+
async getCompositionHistory(options) {
|
625
|
+
const historyUrl = this.createUrl("/api/v1/canvas-history", {
|
616
626
|
...options,
|
617
627
|
projectId: this.options.projectId
|
618
628
|
});
|
619
|
-
return this.apiClient(
|
629
|
+
return this.apiClient(historyUrl);
|
620
630
|
}
|
621
631
|
getOneComposition({
|
622
632
|
skipDataResolution,
|
@@ -658,7 +668,7 @@ var CanvasClient = class extends import_api2.ApiClient {
|
|
658
668
|
async getComponentDefinitions(options) {
|
659
669
|
const { projectId } = this.options;
|
660
670
|
const fetchUri = this.createUrl("/api/v1/canvas-definitions", { ...options, projectId });
|
661
|
-
return
|
671
|
+
return this.apiClient(fetchUri);
|
662
672
|
}
|
663
673
|
/** Updates or creates a Canvas component definition */
|
664
674
|
async updateComponentDefinition(body) {
|
@@ -811,6 +821,14 @@ var _ContentClient = class _ContentClient extends import_api5.ApiClient {
|
|
811
821
|
const fetchUri = skipDataResolution ? this.createUrl(__privateGet(_ContentClient, _entriesUrl), { ...params, projectId }) : this.createUrl(__privateGet(_ContentClient, _entriesUrl), this.getEdgeOptions(params), this.edgeApiHost);
|
812
822
|
return this.apiClient(fetchUri);
|
813
823
|
}
|
824
|
+
/** Fetches historical versions of an entry */
|
825
|
+
async getEntryHistory(options) {
|
826
|
+
const historyUrl = this.createUrl("/api/v1/entries-history", {
|
827
|
+
...options,
|
828
|
+
projectId: this.options.projectId
|
829
|
+
});
|
830
|
+
return this.apiClient(historyUrl);
|
831
|
+
}
|
814
832
|
async upsertContentType(body) {
|
815
833
|
const fetchUri = this.createUrl(__privateGet(_ContentClient, _contentTypesUrl));
|
816
834
|
await this.apiClient(fetchUri, {
|
package/dist/index.mjs
CHANGED
@@ -478,10 +478,20 @@ 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(params = {}) {
|
482
482
|
const { projectId } = this.options;
|
483
|
-
const
|
484
|
-
|
483
|
+
const { resolveData, ...originParams } = params;
|
484
|
+
if (!resolveData) {
|
485
|
+
const fetchUri = this.createUrl(CANVAS_URL, { ...originParams, projectId });
|
486
|
+
return this.apiClient(fetchUri);
|
487
|
+
}
|
488
|
+
const edgeParams = {
|
489
|
+
...originParams,
|
490
|
+
projectId,
|
491
|
+
...params.diagnostics ? { diagnostics: "true" } : {}
|
492
|
+
};
|
493
|
+
const edgeUrl = this.createUrl("/api/v1/compositions", edgeParams, this.edgeApiHost);
|
494
|
+
return this.apiClient(edgeUrl);
|
485
495
|
}
|
486
496
|
getCompositionByNodePath(options) {
|
487
497
|
return this.getOneComposition(options);
|
@@ -499,12 +509,12 @@ var CanvasClient = class extends ApiClient {
|
|
499
509
|
return this.getOneComposition(options);
|
500
510
|
}
|
501
511
|
/** Fetches historical versions of a composition or pattern */
|
502
|
-
async
|
503
|
-
const
|
512
|
+
async getCompositionHistory(options) {
|
513
|
+
const historyUrl = this.createUrl("/api/v1/canvas-history", {
|
504
514
|
...options,
|
505
515
|
projectId: this.options.projectId
|
506
516
|
});
|
507
|
-
return this.apiClient(
|
517
|
+
return this.apiClient(historyUrl);
|
508
518
|
}
|
509
519
|
getOneComposition({
|
510
520
|
skipDataResolution,
|
@@ -546,7 +556,7 @@ var CanvasClient = class extends ApiClient {
|
|
546
556
|
async getComponentDefinitions(options) {
|
547
557
|
const { projectId } = this.options;
|
548
558
|
const fetchUri = this.createUrl("/api/v1/canvas-definitions", { ...options, projectId });
|
549
|
-
return
|
559
|
+
return this.apiClient(fetchUri);
|
550
560
|
}
|
551
561
|
/** Updates or creates a Canvas component definition */
|
552
562
|
async updateComponentDefinition(body) {
|
@@ -699,6 +709,14 @@ var _ContentClient = class _ContentClient extends ApiClient4 {
|
|
699
709
|
const fetchUri = skipDataResolution ? this.createUrl(__privateGet(_ContentClient, _entriesUrl), { ...params, projectId }) : this.createUrl(__privateGet(_ContentClient, _entriesUrl), this.getEdgeOptions(params), this.edgeApiHost);
|
700
710
|
return this.apiClient(fetchUri);
|
701
711
|
}
|
712
|
+
/** Fetches historical versions of an entry */
|
713
|
+
async getEntryHistory(options) {
|
714
|
+
const historyUrl = this.createUrl("/api/v1/entries-history", {
|
715
|
+
...options,
|
716
|
+
projectId: this.options.projectId
|
717
|
+
});
|
718
|
+
return this.apiClient(historyUrl);
|
719
|
+
}
|
702
720
|
async upsertContentType(body) {
|
703
721
|
const fetchUri = this.createUrl(__privateGet(_ContentClient, _contentTypesUrl));
|
704
722
|
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.65.1-alpha.4+d9220a0f9",
|
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.65.1-alpha.4+d9220a0f9",
|
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": "d9220a0f9c51bae1ae6b97d356ae510ffc484394"
|
51
51
|
}
|