@uniformdev/canvas 19.95.0 → 19.96.1-alpha.0
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 +259 -258
- package/dist/index.d.ts +259 -258
- package/dist/index.esm.js +68 -76
- package/dist/index.js +69 -77
- package/dist/index.mjs +68 -76
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
@@ -627,75 +627,10 @@ var UncachedCategoryClient = class extends CategoryClient {
|
|
627
627
|
}
|
628
628
|
};
|
629
629
|
|
630
|
-
// src/CompositionRelationshipClient.ts
|
631
|
-
import { ApiClient as ApiClient3 } from "@uniformdev/context/api";
|
632
|
-
var COMPOSITION_RELATIONSHIP_URL = "/api/v1/composition-relationships";
|
633
|
-
var unstable_CompositionRelationshipClient = class extends ApiClient3 {
|
634
|
-
constructor(options) {
|
635
|
-
super(options);
|
636
|
-
this.getDefinitionsRelationships = async ({
|
637
|
-
definitionIds,
|
638
|
-
withCompositions,
|
639
|
-
entityType = "composition"
|
640
|
-
}) => {
|
641
|
-
const url = this.createUrl(COMPOSITION_RELATIONSHIP_URL, {
|
642
|
-
type: "definition",
|
643
|
-
projectId: this._options.projectId,
|
644
|
-
definitionIds: definitionIds.join(","),
|
645
|
-
withCompositions,
|
646
|
-
entityType
|
647
|
-
});
|
648
|
-
return this.apiClient(url);
|
649
|
-
};
|
650
|
-
this.clearAllRelationships = async () => {
|
651
|
-
const url = this.createUrl(COMPOSITION_RELATIONSHIP_URL);
|
652
|
-
return this.apiClient(url, {
|
653
|
-
method: "POST",
|
654
|
-
body: JSON.stringify({
|
655
|
-
type: "clear",
|
656
|
-
projectId: this._options.projectId
|
657
|
-
})
|
658
|
-
});
|
659
|
-
};
|
660
|
-
this.indexCompositionRelationships = async ({
|
661
|
-
state,
|
662
|
-
compositionId
|
663
|
-
}) => {
|
664
|
-
const url = this.createUrl(COMPOSITION_RELATIONSHIP_URL);
|
665
|
-
return this.apiClient(url, {
|
666
|
-
method: "POST",
|
667
|
-
body: JSON.stringify({
|
668
|
-
type: "index",
|
669
|
-
projectId: this._options.projectId,
|
670
|
-
state,
|
671
|
-
compositionId
|
672
|
-
})
|
673
|
-
});
|
674
|
-
};
|
675
|
-
this.getVersion = async () => {
|
676
|
-
const url = this.createUrl("/api/v1/usage-tracking", {
|
677
|
-
projectId: this._options.projectId
|
678
|
-
});
|
679
|
-
return this.apiClient(url).then((response) => response.version);
|
680
|
-
};
|
681
|
-
this.setVersion = async (version) => {
|
682
|
-
const url = this.createUrl("/api/v1/usage-tracking");
|
683
|
-
return this.apiClient(url, {
|
684
|
-
method: "POST",
|
685
|
-
body: JSON.stringify({
|
686
|
-
projectId: this._options.projectId,
|
687
|
-
version
|
688
|
-
})
|
689
|
-
});
|
690
|
-
};
|
691
|
-
this._options = options;
|
692
|
-
}
|
693
|
-
};
|
694
|
-
|
695
630
|
// src/ContentClient.ts
|
696
|
-
import { ApiClient as
|
631
|
+
import { ApiClient as ApiClient3 } from "@uniformdev/context/api";
|
697
632
|
var _contentTypesUrl, _entriesUrl;
|
698
|
-
var _ContentClient = class _ContentClient extends
|
633
|
+
var _ContentClient = class _ContentClient extends ApiClient3 {
|
699
634
|
constructor(options) {
|
700
635
|
var _a;
|
701
636
|
super(options);
|
@@ -782,10 +717,10 @@ var UncachedContentClient = class extends ContentClient {
|
|
782
717
|
};
|
783
718
|
|
784
719
|
// src/DataSourceClient.ts
|
785
|
-
import { ApiClient as
|
720
|
+
import { ApiClient as ApiClient4 } from "@uniformdev/context/api";
|
786
721
|
var dataSourceUrl = "/api/v1/data-source";
|
787
722
|
var dataSourcesUrl = "/api/v1/data-sources";
|
788
|
-
var DataSourceClient = class extends
|
723
|
+
var DataSourceClient = class extends ApiClient4 {
|
789
724
|
constructor(options) {
|
790
725
|
super(options);
|
791
726
|
}
|
@@ -822,9 +757,9 @@ var DataSourceClient = class extends ApiClient5 {
|
|
822
757
|
};
|
823
758
|
|
824
759
|
// src/DataTypeClient.ts
|
825
|
-
import { ApiClient as
|
760
|
+
import { ApiClient as ApiClient5 } from "@uniformdev/context/api";
|
826
761
|
var _url;
|
827
|
-
var _DataTypeClient = class _DataTypeClient extends
|
762
|
+
var _DataTypeClient = class _DataTypeClient extends ApiClient5 {
|
828
763
|
constructor(options) {
|
829
764
|
super(options);
|
830
765
|
}
|
@@ -1867,9 +1802,9 @@ function walkComponentTree(component, visitor, initialContext) {
|
|
1867
1802
|
}
|
1868
1803
|
|
1869
1804
|
// src/LocaleClient.ts
|
1870
|
-
import { ApiClient as
|
1805
|
+
import { ApiClient as ApiClient6 } from "@uniformdev/context/api";
|
1871
1806
|
var localesUrl = "/api/v1/locales";
|
1872
|
-
var LocaleClient = class extends
|
1807
|
+
var LocaleClient = class extends ApiClient6 {
|
1873
1808
|
constructor(options) {
|
1874
1809
|
super(options);
|
1875
1810
|
}
|
@@ -2256,9 +2191,9 @@ function subscribeToComposition({
|
|
2256
2191
|
}
|
2257
2192
|
|
2258
2193
|
// src/PromptClient.ts
|
2259
|
-
import { ApiClient as
|
2194
|
+
import { ApiClient as ApiClient7 } from "@uniformdev/context/api";
|
2260
2195
|
var PromptsUrl = "/api/v1/prompts";
|
2261
|
-
var PromptClient = class extends
|
2196
|
+
var PromptClient = class extends ApiClient7 {
|
2262
2197
|
constructor(options) {
|
2263
2198
|
super(options);
|
2264
2199
|
}
|
@@ -2288,6 +2223,63 @@ var PromptClient = class extends ApiClient8 {
|
|
2288
2223
|
}
|
2289
2224
|
};
|
2290
2225
|
|
2226
|
+
// src/RelationshipClient.ts
|
2227
|
+
import { ApiClient as ApiClient8 } from "@uniformdev/context/api";
|
2228
|
+
var RELATIONSHIPS_URL = "/api/v1/relationships";
|
2229
|
+
var RelationshipClient = class extends ApiClient8 {
|
2230
|
+
constructor(options) {
|
2231
|
+
super(options);
|
2232
|
+
this.get = async (options) => {
|
2233
|
+
const { projectId } = this.options;
|
2234
|
+
const url = this.createUrl(RELATIONSHIPS_URL, { ...options, projectId });
|
2235
|
+
return this.apiClient(url);
|
2236
|
+
};
|
2237
|
+
this.clearProjectRelationships = async () => {
|
2238
|
+
const { projectId } = this.options;
|
2239
|
+
const url = this.createUrl(RELATIONSHIPS_URL);
|
2240
|
+
return this.apiClient(url, {
|
2241
|
+
method: "POST",
|
2242
|
+
body: JSON.stringify({
|
2243
|
+
action: "clear",
|
2244
|
+
projectId
|
2245
|
+
})
|
2246
|
+
});
|
2247
|
+
};
|
2248
|
+
this.indexRelationships = async ({ state, id, type }) => {
|
2249
|
+
const { projectId } = this.options;
|
2250
|
+
const url = this.createUrl(RELATIONSHIPS_URL);
|
2251
|
+
return this.apiClient(url, {
|
2252
|
+
method: "POST",
|
2253
|
+
body: JSON.stringify({
|
2254
|
+
action: "index",
|
2255
|
+
type,
|
2256
|
+
projectId,
|
2257
|
+
state,
|
2258
|
+
id
|
2259
|
+
})
|
2260
|
+
});
|
2261
|
+
};
|
2262
|
+
this.getVersion = async () => {
|
2263
|
+
const { projectId } = this.options;
|
2264
|
+
const url = this.createUrl("/api/v1/usage-tracking", {
|
2265
|
+
projectId
|
2266
|
+
});
|
2267
|
+
return this.apiClient(url).then((response) => response.version);
|
2268
|
+
};
|
2269
|
+
this.setVersion = async (version) => {
|
2270
|
+
const { projectId } = this.options;
|
2271
|
+
const url = this.createUrl("/api/v1/usage-tracking");
|
2272
|
+
return this.apiClient(url, {
|
2273
|
+
method: "POST",
|
2274
|
+
body: JSON.stringify({
|
2275
|
+
projectId,
|
2276
|
+
version
|
2277
|
+
})
|
2278
|
+
});
|
2279
|
+
};
|
2280
|
+
}
|
2281
|
+
};
|
2282
|
+
|
2291
2283
|
// src/RouteClient.ts
|
2292
2284
|
import { ApiClient as ApiClient9 } from "@uniformdev/context/api";
|
2293
2285
|
var ROUTE_URL = "/api/v1/route";
|
@@ -2686,6 +2678,7 @@ export {
|
|
2686
2678
|
LocaleClient,
|
2687
2679
|
PLACEHOLDER_ID,
|
2688
2680
|
PromptClient,
|
2681
|
+
RelationshipClient,
|
2689
2682
|
RouteClient,
|
2690
2683
|
SECRET_QUERY_STRING_PARAM,
|
2691
2684
|
UncachedCanvasClient,
|
@@ -2748,7 +2741,6 @@ export {
|
|
2748
2741
|
nullLimitPolicy,
|
2749
2742
|
parseVariableExpression,
|
2750
2743
|
subscribeToComposition,
|
2751
|
-
unstable_CompositionRelationshipClient,
|
2752
2744
|
walkComponentTree,
|
2753
2745
|
walkNodeTree
|
2754
2746
|
};
|
package/dist/index.js
CHANGED
@@ -327,6 +327,7 @@ __export(src_exports, {
|
|
327
327
|
LocaleClient: () => LocaleClient,
|
328
328
|
PLACEHOLDER_ID: () => PLACEHOLDER_ID,
|
329
329
|
PromptClient: () => PromptClient,
|
330
|
+
RelationshipClient: () => RelationshipClient,
|
330
331
|
RouteClient: () => RouteClient,
|
331
332
|
SECRET_QUERY_STRING_PARAM: () => SECRET_QUERY_STRING_PARAM,
|
332
333
|
UncachedCanvasClient: () => UncachedCanvasClient,
|
@@ -389,7 +390,6 @@ __export(src_exports, {
|
|
389
390
|
nullLimitPolicy: () => nullLimitPolicy,
|
390
391
|
parseVariableExpression: () => parseVariableExpression,
|
391
392
|
subscribeToComposition: () => subscribeToComposition,
|
392
|
-
unstable_CompositionRelationshipClient: () => unstable_CompositionRelationshipClient,
|
393
393
|
walkComponentTree: () => walkComponentTree,
|
394
394
|
walkNodeTree: () => walkNodeTree
|
395
395
|
});
|
@@ -754,75 +754,10 @@ var UncachedCategoryClient = class extends CategoryClient {
|
|
754
754
|
}
|
755
755
|
};
|
756
756
|
|
757
|
-
// src/CompositionRelationshipClient.ts
|
758
|
-
var import_api4 = require("@uniformdev/context/api");
|
759
|
-
var COMPOSITION_RELATIONSHIP_URL = "/api/v1/composition-relationships";
|
760
|
-
var unstable_CompositionRelationshipClient = class extends import_api4.ApiClient {
|
761
|
-
constructor(options) {
|
762
|
-
super(options);
|
763
|
-
this.getDefinitionsRelationships = async ({
|
764
|
-
definitionIds,
|
765
|
-
withCompositions,
|
766
|
-
entityType = "composition"
|
767
|
-
}) => {
|
768
|
-
const url = this.createUrl(COMPOSITION_RELATIONSHIP_URL, {
|
769
|
-
type: "definition",
|
770
|
-
projectId: this._options.projectId,
|
771
|
-
definitionIds: definitionIds.join(","),
|
772
|
-
withCompositions,
|
773
|
-
entityType
|
774
|
-
});
|
775
|
-
return this.apiClient(url);
|
776
|
-
};
|
777
|
-
this.clearAllRelationships = async () => {
|
778
|
-
const url = this.createUrl(COMPOSITION_RELATIONSHIP_URL);
|
779
|
-
return this.apiClient(url, {
|
780
|
-
method: "POST",
|
781
|
-
body: JSON.stringify({
|
782
|
-
type: "clear",
|
783
|
-
projectId: this._options.projectId
|
784
|
-
})
|
785
|
-
});
|
786
|
-
};
|
787
|
-
this.indexCompositionRelationships = async ({
|
788
|
-
state,
|
789
|
-
compositionId
|
790
|
-
}) => {
|
791
|
-
const url = this.createUrl(COMPOSITION_RELATIONSHIP_URL);
|
792
|
-
return this.apiClient(url, {
|
793
|
-
method: "POST",
|
794
|
-
body: JSON.stringify({
|
795
|
-
type: "index",
|
796
|
-
projectId: this._options.projectId,
|
797
|
-
state,
|
798
|
-
compositionId
|
799
|
-
})
|
800
|
-
});
|
801
|
-
};
|
802
|
-
this.getVersion = async () => {
|
803
|
-
const url = this.createUrl("/api/v1/usage-tracking", {
|
804
|
-
projectId: this._options.projectId
|
805
|
-
});
|
806
|
-
return this.apiClient(url).then((response) => response.version);
|
807
|
-
};
|
808
|
-
this.setVersion = async (version) => {
|
809
|
-
const url = this.createUrl("/api/v1/usage-tracking");
|
810
|
-
return this.apiClient(url, {
|
811
|
-
method: "POST",
|
812
|
-
body: JSON.stringify({
|
813
|
-
projectId: this._options.projectId,
|
814
|
-
version
|
815
|
-
})
|
816
|
-
});
|
817
|
-
};
|
818
|
-
this._options = options;
|
819
|
-
}
|
820
|
-
};
|
821
|
-
|
822
757
|
// src/ContentClient.ts
|
823
|
-
var
|
758
|
+
var import_api4 = require("@uniformdev/context/api");
|
824
759
|
var _contentTypesUrl, _entriesUrl;
|
825
|
-
var _ContentClient = class _ContentClient extends
|
760
|
+
var _ContentClient = class _ContentClient extends import_api4.ApiClient {
|
826
761
|
constructor(options) {
|
827
762
|
var _a;
|
828
763
|
super(options);
|
@@ -909,10 +844,10 @@ var UncachedContentClient = class extends ContentClient {
|
|
909
844
|
};
|
910
845
|
|
911
846
|
// src/DataSourceClient.ts
|
912
|
-
var
|
847
|
+
var import_api5 = require("@uniformdev/context/api");
|
913
848
|
var dataSourceUrl = "/api/v1/data-source";
|
914
849
|
var dataSourcesUrl = "/api/v1/data-sources";
|
915
|
-
var DataSourceClient = class extends
|
850
|
+
var DataSourceClient = class extends import_api5.ApiClient {
|
916
851
|
constructor(options) {
|
917
852
|
super(options);
|
918
853
|
}
|
@@ -949,9 +884,9 @@ var DataSourceClient = class extends import_api6.ApiClient {
|
|
949
884
|
};
|
950
885
|
|
951
886
|
// src/DataTypeClient.ts
|
952
|
-
var
|
887
|
+
var import_api6 = require("@uniformdev/context/api");
|
953
888
|
var _url;
|
954
|
-
var _DataTypeClient = class _DataTypeClient extends
|
889
|
+
var _DataTypeClient = class _DataTypeClient extends import_api6.ApiClient {
|
955
890
|
constructor(options) {
|
956
891
|
super(options);
|
957
892
|
}
|
@@ -1994,9 +1929,9 @@ function walkComponentTree(component, visitor, initialContext) {
|
|
1994
1929
|
}
|
1995
1930
|
|
1996
1931
|
// src/LocaleClient.ts
|
1997
|
-
var
|
1932
|
+
var import_api7 = require("@uniformdev/context/api");
|
1998
1933
|
var localesUrl = "/api/v1/locales";
|
1999
|
-
var LocaleClient = class extends
|
1934
|
+
var LocaleClient = class extends import_api7.ApiClient {
|
2000
1935
|
constructor(options) {
|
2001
1936
|
super(options);
|
2002
1937
|
}
|
@@ -2383,9 +2318,9 @@ function subscribeToComposition({
|
|
2383
2318
|
}
|
2384
2319
|
|
2385
2320
|
// src/PromptClient.ts
|
2386
|
-
var
|
2321
|
+
var import_api8 = require("@uniformdev/context/api");
|
2387
2322
|
var PromptsUrl = "/api/v1/prompts";
|
2388
|
-
var PromptClient = class extends
|
2323
|
+
var PromptClient = class extends import_api8.ApiClient {
|
2389
2324
|
constructor(options) {
|
2390
2325
|
super(options);
|
2391
2326
|
}
|
@@ -2415,6 +2350,63 @@ var PromptClient = class extends import_api9.ApiClient {
|
|
2415
2350
|
}
|
2416
2351
|
};
|
2417
2352
|
|
2353
|
+
// src/RelationshipClient.ts
|
2354
|
+
var import_api9 = require("@uniformdev/context/api");
|
2355
|
+
var RELATIONSHIPS_URL = "/api/v1/relationships";
|
2356
|
+
var RelationshipClient = class extends import_api9.ApiClient {
|
2357
|
+
constructor(options) {
|
2358
|
+
super(options);
|
2359
|
+
this.get = async (options) => {
|
2360
|
+
const { projectId } = this.options;
|
2361
|
+
const url = this.createUrl(RELATIONSHIPS_URL, { ...options, projectId });
|
2362
|
+
return this.apiClient(url);
|
2363
|
+
};
|
2364
|
+
this.clearProjectRelationships = async () => {
|
2365
|
+
const { projectId } = this.options;
|
2366
|
+
const url = this.createUrl(RELATIONSHIPS_URL);
|
2367
|
+
return this.apiClient(url, {
|
2368
|
+
method: "POST",
|
2369
|
+
body: JSON.stringify({
|
2370
|
+
action: "clear",
|
2371
|
+
projectId
|
2372
|
+
})
|
2373
|
+
});
|
2374
|
+
};
|
2375
|
+
this.indexRelationships = async ({ state, id, type }) => {
|
2376
|
+
const { projectId } = this.options;
|
2377
|
+
const url = this.createUrl(RELATIONSHIPS_URL);
|
2378
|
+
return this.apiClient(url, {
|
2379
|
+
method: "POST",
|
2380
|
+
body: JSON.stringify({
|
2381
|
+
action: "index",
|
2382
|
+
type,
|
2383
|
+
projectId,
|
2384
|
+
state,
|
2385
|
+
id
|
2386
|
+
})
|
2387
|
+
});
|
2388
|
+
};
|
2389
|
+
this.getVersion = async () => {
|
2390
|
+
const { projectId } = this.options;
|
2391
|
+
const url = this.createUrl("/api/v1/usage-tracking", {
|
2392
|
+
projectId
|
2393
|
+
});
|
2394
|
+
return this.apiClient(url).then((response) => response.version);
|
2395
|
+
};
|
2396
|
+
this.setVersion = async (version) => {
|
2397
|
+
const { projectId } = this.options;
|
2398
|
+
const url = this.createUrl("/api/v1/usage-tracking");
|
2399
|
+
return this.apiClient(url, {
|
2400
|
+
method: "POST",
|
2401
|
+
body: JSON.stringify({
|
2402
|
+
projectId,
|
2403
|
+
version
|
2404
|
+
})
|
2405
|
+
});
|
2406
|
+
};
|
2407
|
+
}
|
2408
|
+
};
|
2409
|
+
|
2418
2410
|
// src/RouteClient.ts
|
2419
2411
|
var import_api10 = require("@uniformdev/context/api");
|
2420
2412
|
var ROUTE_URL = "/api/v1/route";
|
@@ -2814,6 +2806,7 @@ var CanvasClientError = import_api11.ApiClientError;
|
|
2814
2806
|
LocaleClient,
|
2815
2807
|
PLACEHOLDER_ID,
|
2816
2808
|
PromptClient,
|
2809
|
+
RelationshipClient,
|
2817
2810
|
RouteClient,
|
2818
2811
|
SECRET_QUERY_STRING_PARAM,
|
2819
2812
|
UncachedCanvasClient,
|
@@ -2876,7 +2869,6 @@ var CanvasClientError = import_api11.ApiClientError;
|
|
2876
2869
|
nullLimitPolicy,
|
2877
2870
|
parseVariableExpression,
|
2878
2871
|
subscribeToComposition,
|
2879
|
-
unstable_CompositionRelationshipClient,
|
2880
2872
|
walkComponentTree,
|
2881
2873
|
walkNodeTree
|
2882
2874
|
});
|
package/dist/index.mjs
CHANGED
@@ -627,75 +627,10 @@ var UncachedCategoryClient = class extends CategoryClient {
|
|
627
627
|
}
|
628
628
|
};
|
629
629
|
|
630
|
-
// src/CompositionRelationshipClient.ts
|
631
|
-
import { ApiClient as ApiClient3 } from "@uniformdev/context/api";
|
632
|
-
var COMPOSITION_RELATIONSHIP_URL = "/api/v1/composition-relationships";
|
633
|
-
var unstable_CompositionRelationshipClient = class extends ApiClient3 {
|
634
|
-
constructor(options) {
|
635
|
-
super(options);
|
636
|
-
this.getDefinitionsRelationships = async ({
|
637
|
-
definitionIds,
|
638
|
-
withCompositions,
|
639
|
-
entityType = "composition"
|
640
|
-
}) => {
|
641
|
-
const url = this.createUrl(COMPOSITION_RELATIONSHIP_URL, {
|
642
|
-
type: "definition",
|
643
|
-
projectId: this._options.projectId,
|
644
|
-
definitionIds: definitionIds.join(","),
|
645
|
-
withCompositions,
|
646
|
-
entityType
|
647
|
-
});
|
648
|
-
return this.apiClient(url);
|
649
|
-
};
|
650
|
-
this.clearAllRelationships = async () => {
|
651
|
-
const url = this.createUrl(COMPOSITION_RELATIONSHIP_URL);
|
652
|
-
return this.apiClient(url, {
|
653
|
-
method: "POST",
|
654
|
-
body: JSON.stringify({
|
655
|
-
type: "clear",
|
656
|
-
projectId: this._options.projectId
|
657
|
-
})
|
658
|
-
});
|
659
|
-
};
|
660
|
-
this.indexCompositionRelationships = async ({
|
661
|
-
state,
|
662
|
-
compositionId
|
663
|
-
}) => {
|
664
|
-
const url = this.createUrl(COMPOSITION_RELATIONSHIP_URL);
|
665
|
-
return this.apiClient(url, {
|
666
|
-
method: "POST",
|
667
|
-
body: JSON.stringify({
|
668
|
-
type: "index",
|
669
|
-
projectId: this._options.projectId,
|
670
|
-
state,
|
671
|
-
compositionId
|
672
|
-
})
|
673
|
-
});
|
674
|
-
};
|
675
|
-
this.getVersion = async () => {
|
676
|
-
const url = this.createUrl("/api/v1/usage-tracking", {
|
677
|
-
projectId: this._options.projectId
|
678
|
-
});
|
679
|
-
return this.apiClient(url).then((response) => response.version);
|
680
|
-
};
|
681
|
-
this.setVersion = async (version) => {
|
682
|
-
const url = this.createUrl("/api/v1/usage-tracking");
|
683
|
-
return this.apiClient(url, {
|
684
|
-
method: "POST",
|
685
|
-
body: JSON.stringify({
|
686
|
-
projectId: this._options.projectId,
|
687
|
-
version
|
688
|
-
})
|
689
|
-
});
|
690
|
-
};
|
691
|
-
this._options = options;
|
692
|
-
}
|
693
|
-
};
|
694
|
-
|
695
630
|
// src/ContentClient.ts
|
696
|
-
import { ApiClient as
|
631
|
+
import { ApiClient as ApiClient3 } from "@uniformdev/context/api";
|
697
632
|
var _contentTypesUrl, _entriesUrl;
|
698
|
-
var _ContentClient = class _ContentClient extends
|
633
|
+
var _ContentClient = class _ContentClient extends ApiClient3 {
|
699
634
|
constructor(options) {
|
700
635
|
var _a;
|
701
636
|
super(options);
|
@@ -782,10 +717,10 @@ var UncachedContentClient = class extends ContentClient {
|
|
782
717
|
};
|
783
718
|
|
784
719
|
// src/DataSourceClient.ts
|
785
|
-
import { ApiClient as
|
720
|
+
import { ApiClient as ApiClient4 } from "@uniformdev/context/api";
|
786
721
|
var dataSourceUrl = "/api/v1/data-source";
|
787
722
|
var dataSourcesUrl = "/api/v1/data-sources";
|
788
|
-
var DataSourceClient = class extends
|
723
|
+
var DataSourceClient = class extends ApiClient4 {
|
789
724
|
constructor(options) {
|
790
725
|
super(options);
|
791
726
|
}
|
@@ -822,9 +757,9 @@ var DataSourceClient = class extends ApiClient5 {
|
|
822
757
|
};
|
823
758
|
|
824
759
|
// src/DataTypeClient.ts
|
825
|
-
import { ApiClient as
|
760
|
+
import { ApiClient as ApiClient5 } from "@uniformdev/context/api";
|
826
761
|
var _url;
|
827
|
-
var _DataTypeClient = class _DataTypeClient extends
|
762
|
+
var _DataTypeClient = class _DataTypeClient extends ApiClient5 {
|
828
763
|
constructor(options) {
|
829
764
|
super(options);
|
830
765
|
}
|
@@ -1867,9 +1802,9 @@ function walkComponentTree(component, visitor, initialContext) {
|
|
1867
1802
|
}
|
1868
1803
|
|
1869
1804
|
// src/LocaleClient.ts
|
1870
|
-
import { ApiClient as
|
1805
|
+
import { ApiClient as ApiClient6 } from "@uniformdev/context/api";
|
1871
1806
|
var localesUrl = "/api/v1/locales";
|
1872
|
-
var LocaleClient = class extends
|
1807
|
+
var LocaleClient = class extends ApiClient6 {
|
1873
1808
|
constructor(options) {
|
1874
1809
|
super(options);
|
1875
1810
|
}
|
@@ -2256,9 +2191,9 @@ function subscribeToComposition({
|
|
2256
2191
|
}
|
2257
2192
|
|
2258
2193
|
// src/PromptClient.ts
|
2259
|
-
import { ApiClient as
|
2194
|
+
import { ApiClient as ApiClient7 } from "@uniformdev/context/api";
|
2260
2195
|
var PromptsUrl = "/api/v1/prompts";
|
2261
|
-
var PromptClient = class extends
|
2196
|
+
var PromptClient = class extends ApiClient7 {
|
2262
2197
|
constructor(options) {
|
2263
2198
|
super(options);
|
2264
2199
|
}
|
@@ -2288,6 +2223,63 @@ var PromptClient = class extends ApiClient8 {
|
|
2288
2223
|
}
|
2289
2224
|
};
|
2290
2225
|
|
2226
|
+
// src/RelationshipClient.ts
|
2227
|
+
import { ApiClient as ApiClient8 } from "@uniformdev/context/api";
|
2228
|
+
var RELATIONSHIPS_URL = "/api/v1/relationships";
|
2229
|
+
var RelationshipClient = class extends ApiClient8 {
|
2230
|
+
constructor(options) {
|
2231
|
+
super(options);
|
2232
|
+
this.get = async (options) => {
|
2233
|
+
const { projectId } = this.options;
|
2234
|
+
const url = this.createUrl(RELATIONSHIPS_URL, { ...options, projectId });
|
2235
|
+
return this.apiClient(url);
|
2236
|
+
};
|
2237
|
+
this.clearProjectRelationships = async () => {
|
2238
|
+
const { projectId } = this.options;
|
2239
|
+
const url = this.createUrl(RELATIONSHIPS_URL);
|
2240
|
+
return this.apiClient(url, {
|
2241
|
+
method: "POST",
|
2242
|
+
body: JSON.stringify({
|
2243
|
+
action: "clear",
|
2244
|
+
projectId
|
2245
|
+
})
|
2246
|
+
});
|
2247
|
+
};
|
2248
|
+
this.indexRelationships = async ({ state, id, type }) => {
|
2249
|
+
const { projectId } = this.options;
|
2250
|
+
const url = this.createUrl(RELATIONSHIPS_URL);
|
2251
|
+
return this.apiClient(url, {
|
2252
|
+
method: "POST",
|
2253
|
+
body: JSON.stringify({
|
2254
|
+
action: "index",
|
2255
|
+
type,
|
2256
|
+
projectId,
|
2257
|
+
state,
|
2258
|
+
id
|
2259
|
+
})
|
2260
|
+
});
|
2261
|
+
};
|
2262
|
+
this.getVersion = async () => {
|
2263
|
+
const { projectId } = this.options;
|
2264
|
+
const url = this.createUrl("/api/v1/usage-tracking", {
|
2265
|
+
projectId
|
2266
|
+
});
|
2267
|
+
return this.apiClient(url).then((response) => response.version);
|
2268
|
+
};
|
2269
|
+
this.setVersion = async (version) => {
|
2270
|
+
const { projectId } = this.options;
|
2271
|
+
const url = this.createUrl("/api/v1/usage-tracking");
|
2272
|
+
return this.apiClient(url, {
|
2273
|
+
method: "POST",
|
2274
|
+
body: JSON.stringify({
|
2275
|
+
projectId,
|
2276
|
+
version
|
2277
|
+
})
|
2278
|
+
});
|
2279
|
+
};
|
2280
|
+
}
|
2281
|
+
};
|
2282
|
+
|
2291
2283
|
// src/RouteClient.ts
|
2292
2284
|
import { ApiClient as ApiClient9 } from "@uniformdev/context/api";
|
2293
2285
|
var ROUTE_URL = "/api/v1/route";
|
@@ -2686,6 +2678,7 @@ export {
|
|
2686
2678
|
LocaleClient,
|
2687
2679
|
PLACEHOLDER_ID,
|
2688
2680
|
PromptClient,
|
2681
|
+
RelationshipClient,
|
2689
2682
|
RouteClient,
|
2690
2683
|
SECRET_QUERY_STRING_PARAM,
|
2691
2684
|
UncachedCanvasClient,
|
@@ -2748,7 +2741,6 @@ export {
|
|
2748
2741
|
nullLimitPolicy,
|
2749
2742
|
parseVariableExpression,
|
2750
2743
|
subscribeToComposition,
|
2751
|
-
unstable_CompositionRelationshipClient,
|
2752
2744
|
walkComponentTree,
|
2753
2745
|
walkNodeTree
|
2754
2746
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uniformdev/canvas",
|
3
|
-
"version": "19.
|
3
|
+
"version": "19.96.1-alpha.0+586d49116",
|
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,8 +38,8 @@
|
|
38
38
|
"pusher-js": "8.2.0"
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
|
-
"@uniformdev/assets": "19.
|
42
|
-
"@uniformdev/context": "19.
|
41
|
+
"@uniformdev/assets": "19.96.1-alpha.0+586d49116",
|
42
|
+
"@uniformdev/context": "19.96.1-alpha.0+586d49116",
|
43
43
|
"immer": "10.0.3"
|
44
44
|
},
|
45
45
|
"files": [
|
@@ -48,5 +48,5 @@
|
|
48
48
|
"publishConfig": {
|
49
49
|
"access": "public"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "586d491167a1a906a2a18a36c27802126979d852"
|
52
52
|
}
|