@uniformdev/canvas-contentful 17.7.0 → 17.7.1-alpha.140
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.ts +14 -14
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ declare class ContentfulClientList {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/** The default shape of the Contentful entry. Note that this can change if the query is altered. */
|
|
31
|
-
|
|
31
|
+
type ContentfulEntryResult<TFields> = {
|
|
32
32
|
/**
|
|
33
33
|
* The shape of the `fields` that the Contentful REST API is expected to return for this entry
|
|
34
34
|
* https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/entries/entry
|
|
@@ -40,14 +40,14 @@ declare type ContentfulEntryResult<TFields> = {
|
|
|
40
40
|
sys: Partial<Pick<Sys, 'id' | 'type'>>;
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
type EnhancerValue = ContentfulEntryResult<unknown> | ContentfulEntryResult<unknown>[] | null;
|
|
44
44
|
declare const contentfulRichTextToHtmlEnhancer: ComponentParameterEnhancerFunction<EnhancerValue>;
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
type EntrySelectorParameterValue = {
|
|
47
47
|
entryId: string;
|
|
48
48
|
source?: string;
|
|
49
49
|
} | string | null | undefined;
|
|
50
|
-
|
|
50
|
+
type CreateContentfulQueryOptions<TContext extends EnhancerContext = EnhancerContext> = {
|
|
51
51
|
/** Canvas parameter name being queried for. Not defined if using batching. */
|
|
52
52
|
parameterName?: string;
|
|
53
53
|
/** Canvas parameter value being fetched. Not defined if using batching. */
|
|
@@ -60,8 +60,8 @@ declare type CreateContentfulQueryOptions<TContext extends EnhancerContext = Enh
|
|
|
60
60
|
context: TContext;
|
|
61
61
|
};
|
|
62
62
|
/** The default shape of the result value of the Contentful enhancer. Note that this can change if the query is altered. */
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
type ContentfulEnhancerResult<TFields> = ContentfulEntryResult<TFields> | null;
|
|
64
|
+
type CreateContentfulEnhancerOptions = {
|
|
65
65
|
/** Either a list of Contentful clients for use with multi-space/environment-enabled Canvas projects.
|
|
66
66
|
* Or a single Contentful client for use with legacy Canvas data.*/
|
|
67
67
|
client: ContentfulClientApi | ContentfulClientList;
|
|
@@ -78,11 +78,11 @@ declare type CreateContentfulEnhancerOptions = {
|
|
|
78
78
|
declare const CANVAS_CONTENTFUL_PARAMETER_TYPES: readonly string[];
|
|
79
79
|
declare function createContentfulEnhancer({ client, previewClient, createQuery, useBatching, limitPolicy, }: CreateContentfulEnhancerOptions): ComponentParameterEnhancer<EntrySelectorParameterValue, ContentfulEnhancerResult<unknown>>;
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
type ContentfulMultiEntryParameterValue = {
|
|
82
82
|
entries: string[];
|
|
83
83
|
source: string;
|
|
84
84
|
} | null | undefined;
|
|
85
|
-
|
|
85
|
+
type CreateContentfulMultiEntryQueryOptions<TContext extends EnhancerContext = EnhancerContext> = {
|
|
86
86
|
/** Canvas parameter name being queried for */
|
|
87
87
|
parameterName: string;
|
|
88
88
|
/** Canvas parameter value being fetched */
|
|
@@ -95,8 +95,8 @@ declare type CreateContentfulMultiEntryQueryOptions<TContext extends EnhancerCon
|
|
|
95
95
|
context: TContext;
|
|
96
96
|
};
|
|
97
97
|
/** The default shape of the result value of the Contentful Multi Entry enhancer. Note that this can change if the query is altered. */
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
type ContentfulMultiEntryEnhancerResult<TFields> = ContentfulEntryResult<TFields>[] | null;
|
|
99
|
+
type CreateContentfulMultiEntryEnhancerOptions = {
|
|
100
100
|
/** Either a list of Contentful clients for use with multi-space/environment-enabled Canvas projects. */
|
|
101
101
|
clients: ContentfulClientList;
|
|
102
102
|
/** Creates the Contentful client's query params for specific parameters. See https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters */
|
|
@@ -107,7 +107,7 @@ declare const CANVAS_CONTENTFUL_MULTI_PARAMETER_TYPES: readonly string[];
|
|
|
107
107
|
declare function createContentfulMultiEnhancer({ clients, createQuery, limitPolicy, }: CreateContentfulMultiEntryEnhancerOptions): ComponentParameterEnhancer<ContentfulMultiEntryParameterValue, ContentfulMultiEntryEnhancerResult<unknown>>;
|
|
108
108
|
|
|
109
109
|
declare const CANVAS_CONTENTFUL_QUERY_PARAMETER_TYPES: readonly string[];
|
|
110
|
-
|
|
110
|
+
type ContentfulQueryParameterValue = {
|
|
111
111
|
source: string;
|
|
112
112
|
contentType: string;
|
|
113
113
|
count: number;
|
|
@@ -115,8 +115,8 @@ declare type ContentfulQueryParameterValue = {
|
|
|
115
115
|
sortOrder?: 'asc' | 'desc';
|
|
116
116
|
} | null | undefined;
|
|
117
117
|
/** The default shape of the result value of the Contentful Query enhancer. Note that this can change if the query is altered. */
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
type ContentfulQueryEnhancerResult<TFields> = ContentfulEntryResult<TFields>[] | null;
|
|
119
|
+
type CreateContentfulQueryApiQueryOptions<TContext extends EnhancerContext = EnhancerContext> = {
|
|
120
120
|
/** Canvas parameter name being queried for */
|
|
121
121
|
parameterName: string;
|
|
122
122
|
/** Canvas parameter value being fetched */
|
|
@@ -128,7 +128,7 @@ declare type CreateContentfulQueryApiQueryOptions<TContext extends EnhancerConte
|
|
|
128
128
|
/** The enhancer context provided to the enhance() function */
|
|
129
129
|
context: TContext;
|
|
130
130
|
};
|
|
131
|
-
|
|
131
|
+
type CreateContentfulQueryEnhancerOptions = {
|
|
132
132
|
/** Either a list of Contentful clients for use with multi-space/environment-enabled Canvas projects. */
|
|
133
133
|
clients: ContentfulClientList;
|
|
134
134
|
/** Creates the Contentful client's query params for specific parameters. See https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/canvas-contentful",
|
|
3
|
-
"version": "17.7.
|
|
3
|
+
"version": "17.7.1-alpha.140+80ab6baf9",
|
|
4
4
|
"description": "Contentful data enhancers for Uniform Canvas",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\""
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@uniformdev/canvas": "^17.7.
|
|
26
|
+
"@uniformdev/canvas": "^17.7.1-alpha.140+80ab6baf9"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@contentful/rich-text-html-renderer": ">= 14",
|
|
30
30
|
"contentful": ">= 8"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@contentful/rich-text-html-renderer": "
|
|
34
|
-
"contentful": "9.2.
|
|
33
|
+
"@contentful/rich-text-html-renderer": "16.0.2",
|
|
34
|
+
"contentful": "9.2.15"
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
"/dist"
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "80ab6baf9edea6b520738bd3dff5c6afc882bf77"
|
|
43
43
|
}
|