@ninetailed/experience.js-utils-contentful 4.2.3 → 4.3.0-beta.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/lib/AudienceMapper.d.ts +11 -11
- package/lib/ExperienceMapper.d.ts +2 -2
- package/package.json +4 -4
- package/types/AudienceEntry.d.ts +34 -62
- package/types/Entry.d.ts +629 -494
- package/types/ExperienceEntry.d.ts +4423 -3236
package/lib/AudienceMapper.d.ts
CHANGED
|
@@ -3,16 +3,8 @@ import { AudienceEntry } from '../types/AudienceEntry';
|
|
|
3
3
|
import type { AudienceEntryLike } from '../types/AudienceEntry';
|
|
4
4
|
export declare class AudienceMapper {
|
|
5
5
|
static isAudienceEntry: (entry: AudienceEntryLike) => entry is {
|
|
6
|
-
metadata?: {
|
|
7
|
-
tags: {
|
|
8
|
-
sys: {
|
|
9
|
-
type: string;
|
|
10
|
-
id: string;
|
|
11
|
-
linkType: string;
|
|
12
|
-
};
|
|
13
|
-
}[];
|
|
14
|
-
} | undefined;
|
|
15
6
|
sys: {
|
|
7
|
+
id: string;
|
|
16
8
|
type?: string | undefined;
|
|
17
9
|
createdAt?: string | undefined;
|
|
18
10
|
updatedAt?: string | undefined;
|
|
@@ -39,13 +31,21 @@ export declare class AudienceMapper {
|
|
|
39
31
|
linkType: string;
|
|
40
32
|
};
|
|
41
33
|
} | undefined;
|
|
42
|
-
id: string;
|
|
43
34
|
};
|
|
44
35
|
fields: {
|
|
45
|
-
nt_description?: string | undefined;
|
|
46
36
|
nt_name: string;
|
|
47
37
|
nt_audience_id: string;
|
|
38
|
+
nt_description?: string | undefined;
|
|
48
39
|
};
|
|
40
|
+
metadata?: {
|
|
41
|
+
tags: {
|
|
42
|
+
sys: {
|
|
43
|
+
type: string;
|
|
44
|
+
id: string;
|
|
45
|
+
linkType: string;
|
|
46
|
+
};
|
|
47
|
+
}[];
|
|
48
|
+
} | undefined;
|
|
49
49
|
};
|
|
50
50
|
static mapAudience(audience: AudienceEntry): Audience;
|
|
51
51
|
}
|
|
@@ -10,6 +10,7 @@ export declare class ExperienceMapper {
|
|
|
10
10
|
static mapExperience<VariantFields extends EntryFields>(ctfEntry: ExperienceEntryLike<VariantFields>): import("@ninetailed/experience.js").ExperienceConfiguration<{
|
|
11
11
|
id: string;
|
|
12
12
|
sys: {
|
|
13
|
+
id: string;
|
|
13
14
|
type?: string | undefined;
|
|
14
15
|
createdAt?: string | undefined;
|
|
15
16
|
updatedAt?: string | undefined;
|
|
@@ -36,7 +37,6 @@ export declare class ExperienceMapper {
|
|
|
36
37
|
linkType: string;
|
|
37
38
|
};
|
|
38
39
|
} | undefined;
|
|
39
|
-
id: string;
|
|
40
40
|
};
|
|
41
41
|
metadata?: {
|
|
42
42
|
tags: {
|
|
@@ -57,6 +57,7 @@ export declare class ExperienceMapper {
|
|
|
57
57
|
static mapBaselineWithExperiences<Fields extends EntryFields>(entry: BaselineWithExperiencesEntry<Fields>): import("@ninetailed/experience.js").ExperienceConfiguration<{
|
|
58
58
|
id: string;
|
|
59
59
|
sys: {
|
|
60
|
+
id: string;
|
|
60
61
|
type?: string | undefined;
|
|
61
62
|
createdAt?: string | undefined;
|
|
62
63
|
updatedAt?: string | undefined;
|
|
@@ -83,7 +84,6 @@ export declare class ExperienceMapper {
|
|
|
83
84
|
linkType: string;
|
|
84
85
|
};
|
|
85
86
|
} | undefined;
|
|
86
|
-
id: string;
|
|
87
87
|
};
|
|
88
88
|
metadata?: {
|
|
89
89
|
tags: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ninetailed/experience.js-utils-contentful",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0-beta.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"contentful": "^9.1.32"
|
|
6
6
|
},
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"type": "module",
|
|
10
10
|
"types": "./index.d.ts",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@ninetailed/experience.js-utils": "4.
|
|
13
|
-
"@ninetailed/experience.js": "4.
|
|
14
|
-
"@ninetailed/experience.js-shared": "4.
|
|
12
|
+
"@ninetailed/experience.js-utils": "4.3.0-beta.0",
|
|
13
|
+
"@ninetailed/experience.js": "4.3.0-beta.0",
|
|
14
|
+
"@ninetailed/experience.js-shared": "4.3.0-beta.0",
|
|
15
15
|
"zod": "3.21.4"
|
|
16
16
|
}
|
|
17
17
|
}
|
package/types/AudienceEntry.d.ts
CHANGED
|
@@ -1,28 +1,19 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const AudienceEntryFields: z.ZodObject<
|
|
3
|
-
/**
|
|
4
|
-
* The name of the audience (Short Text)
|
|
5
|
-
*/
|
|
2
|
+
export declare const AudienceEntryFields: z.ZodObject<{
|
|
6
3
|
nt_name: z.ZodString;
|
|
7
|
-
/**
|
|
8
|
-
* The description of the audience (Short Text)
|
|
9
|
-
*/
|
|
10
4
|
nt_description: z.ZodOptional<z.ZodString>;
|
|
11
|
-
/**
|
|
12
|
-
* The internal id of the audience (Short Text)
|
|
13
|
-
*/
|
|
14
5
|
nt_audience_id: z.ZodString;
|
|
15
|
-
}
|
|
16
|
-
nt_description?: string | undefined;
|
|
6
|
+
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
17
7
|
nt_name: string;
|
|
18
8
|
nt_audience_id: string;
|
|
19
|
-
}, {
|
|
20
9
|
nt_description?: string | undefined;
|
|
10
|
+
}, {
|
|
21
11
|
nt_name: string;
|
|
22
12
|
nt_audience_id: string;
|
|
13
|
+
nt_description?: string | undefined;
|
|
23
14
|
}>;
|
|
24
15
|
export type AudienceEntryFields = z.infer<typeof AudienceEntryFields>;
|
|
25
|
-
export declare const AudienceEntry: z.ZodObject<
|
|
16
|
+
export declare const AudienceEntry: z.ZodObject<{
|
|
26
17
|
sys: z.ZodObject<{
|
|
27
18
|
type: z.ZodOptional<z.ZodString>;
|
|
28
19
|
id: z.ZodString;
|
|
@@ -31,13 +22,11 @@ export declare const AudienceEntry: z.ZodObject<z.extendShape<{
|
|
|
31
22
|
locale: z.ZodOptional<z.ZodString>;
|
|
32
23
|
revision: z.ZodOptional<z.ZodNumber>;
|
|
33
24
|
space: z.ZodOptional<z.ZodObject<{
|
|
34
|
-
sys: z.ZodObject<
|
|
25
|
+
sys: z.ZodObject<{
|
|
35
26
|
type: z.ZodString;
|
|
36
|
-
linkType: z.ZodString;
|
|
37
27
|
id: z.ZodString;
|
|
38
|
-
}, {
|
|
39
28
|
linkType: z.ZodString;
|
|
40
|
-
}
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
30
|
type: string;
|
|
42
31
|
id: string;
|
|
43
32
|
linkType: string;
|
|
@@ -60,13 +49,11 @@ export declare const AudienceEntry: z.ZodObject<z.extendShape<{
|
|
|
60
49
|
};
|
|
61
50
|
}>>;
|
|
62
51
|
environment: z.ZodOptional<z.ZodObject<{
|
|
63
|
-
sys: z.ZodObject<
|
|
52
|
+
sys: z.ZodObject<{
|
|
64
53
|
type: z.ZodString;
|
|
65
|
-
linkType: z.ZodString;
|
|
66
54
|
id: z.ZodString;
|
|
67
|
-
}, {
|
|
68
55
|
linkType: z.ZodString;
|
|
69
|
-
}
|
|
56
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
57
|
type: string;
|
|
71
58
|
id: string;
|
|
72
59
|
linkType: string;
|
|
@@ -89,13 +76,11 @@ export declare const AudienceEntry: z.ZodObject<z.extendShape<{
|
|
|
89
76
|
};
|
|
90
77
|
}>>;
|
|
91
78
|
contentType: z.ZodOptional<z.ZodObject<{
|
|
92
|
-
sys: z.ZodObject<
|
|
79
|
+
sys: z.ZodObject<{
|
|
93
80
|
type: z.ZodString;
|
|
94
|
-
linkType: z.ZodString;
|
|
95
81
|
id: z.ZodString;
|
|
96
|
-
}, {
|
|
97
82
|
linkType: z.ZodString;
|
|
98
|
-
}
|
|
83
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
84
|
type: string;
|
|
100
85
|
id: string;
|
|
101
86
|
linkType: string;
|
|
@@ -118,6 +103,7 @@ export declare const AudienceEntry: z.ZodObject<z.extendShape<{
|
|
|
118
103
|
};
|
|
119
104
|
}>>;
|
|
120
105
|
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
id: string;
|
|
121
107
|
type?: string | undefined;
|
|
122
108
|
createdAt?: string | undefined;
|
|
123
109
|
updatedAt?: string | undefined;
|
|
@@ -144,8 +130,8 @@ export declare const AudienceEntry: z.ZodObject<z.extendShape<{
|
|
|
144
130
|
linkType: string;
|
|
145
131
|
};
|
|
146
132
|
} | undefined;
|
|
147
|
-
id: string;
|
|
148
133
|
}, {
|
|
134
|
+
id: string;
|
|
149
135
|
type?: string | undefined;
|
|
150
136
|
createdAt?: string | undefined;
|
|
151
137
|
updatedAt?: string | undefined;
|
|
@@ -172,18 +158,14 @@ export declare const AudienceEntry: z.ZodObject<z.extendShape<{
|
|
|
172
158
|
linkType: string;
|
|
173
159
|
};
|
|
174
160
|
} | undefined;
|
|
175
|
-
id: string;
|
|
176
161
|
}>;
|
|
177
|
-
fields: z.ZodObject<{}, "passthrough", z.ZodTypeAny, {}, {}>;
|
|
178
162
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
179
163
|
tags: z.ZodArray<z.ZodObject<{
|
|
180
|
-
sys: z.ZodObject<
|
|
164
|
+
sys: z.ZodObject<{
|
|
181
165
|
type: z.ZodString;
|
|
182
|
-
linkType: z.ZodString;
|
|
183
166
|
id: z.ZodString;
|
|
184
|
-
}, {
|
|
185
167
|
linkType: z.ZodString;
|
|
186
|
-
}
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
187
169
|
type: string;
|
|
188
170
|
id: string;
|
|
189
171
|
linkType: string;
|
|
@@ -222,40 +204,22 @@ export declare const AudienceEntry: z.ZodObject<z.extendShape<{
|
|
|
222
204
|
};
|
|
223
205
|
}[];
|
|
224
206
|
}>>;
|
|
225
|
-
|
|
226
|
-
fields: z.ZodObject<z.extendShape<{}, {
|
|
227
|
-
/**
|
|
228
|
-
* The name of the audience (Short Text)
|
|
229
|
-
*/
|
|
207
|
+
fields: z.ZodObject<{
|
|
230
208
|
nt_name: z.ZodString;
|
|
231
|
-
/**
|
|
232
|
-
* The description of the audience (Short Text)
|
|
233
|
-
*/
|
|
234
209
|
nt_description: z.ZodOptional<z.ZodString>;
|
|
235
|
-
/**
|
|
236
|
-
* The internal id of the audience (Short Text)
|
|
237
|
-
*/
|
|
238
210
|
nt_audience_id: z.ZodString;
|
|
239
|
-
}
|
|
240
|
-
nt_description?: string | undefined;
|
|
211
|
+
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
241
212
|
nt_name: string;
|
|
242
213
|
nt_audience_id: string;
|
|
243
|
-
}, {
|
|
244
214
|
nt_description?: string | undefined;
|
|
215
|
+
}, {
|
|
245
216
|
nt_name: string;
|
|
246
217
|
nt_audience_id: string;
|
|
218
|
+
nt_description?: string | undefined;
|
|
247
219
|
}>;
|
|
248
|
-
}
|
|
249
|
-
metadata?: {
|
|
250
|
-
tags: {
|
|
251
|
-
sys: {
|
|
252
|
-
type: string;
|
|
253
|
-
id: string;
|
|
254
|
-
linkType: string;
|
|
255
|
-
};
|
|
256
|
-
}[];
|
|
257
|
-
} | undefined;
|
|
220
|
+
}, "strip", z.ZodTypeAny, {
|
|
258
221
|
sys: {
|
|
222
|
+
id: string;
|
|
259
223
|
type?: string | undefined;
|
|
260
224
|
createdAt?: string | undefined;
|
|
261
225
|
updatedAt?: string | undefined;
|
|
@@ -282,14 +246,12 @@ export declare const AudienceEntry: z.ZodObject<z.extendShape<{
|
|
|
282
246
|
linkType: string;
|
|
283
247
|
};
|
|
284
248
|
} | undefined;
|
|
285
|
-
id: string;
|
|
286
249
|
};
|
|
287
250
|
fields: {
|
|
288
|
-
nt_description?: string | undefined;
|
|
289
251
|
nt_name: string;
|
|
290
252
|
nt_audience_id: string;
|
|
253
|
+
nt_description?: string | undefined;
|
|
291
254
|
};
|
|
292
|
-
}, {
|
|
293
255
|
metadata?: {
|
|
294
256
|
tags: {
|
|
295
257
|
sys: {
|
|
@@ -299,7 +261,9 @@ export declare const AudienceEntry: z.ZodObject<z.extendShape<{
|
|
|
299
261
|
};
|
|
300
262
|
}[];
|
|
301
263
|
} | undefined;
|
|
264
|
+
}, {
|
|
302
265
|
sys: {
|
|
266
|
+
id: string;
|
|
303
267
|
type?: string | undefined;
|
|
304
268
|
createdAt?: string | undefined;
|
|
305
269
|
updatedAt?: string | undefined;
|
|
@@ -326,13 +290,21 @@ export declare const AudienceEntry: z.ZodObject<z.extendShape<{
|
|
|
326
290
|
linkType: string;
|
|
327
291
|
};
|
|
328
292
|
} | undefined;
|
|
329
|
-
id: string;
|
|
330
293
|
};
|
|
331
294
|
fields: {
|
|
332
|
-
nt_description?: string | undefined;
|
|
333
295
|
nt_name: string;
|
|
334
296
|
nt_audience_id: string;
|
|
297
|
+
nt_description?: string | undefined;
|
|
335
298
|
};
|
|
299
|
+
metadata?: {
|
|
300
|
+
tags: {
|
|
301
|
+
sys: {
|
|
302
|
+
type: string;
|
|
303
|
+
id: string;
|
|
304
|
+
linkType: string;
|
|
305
|
+
};
|
|
306
|
+
}[];
|
|
307
|
+
} | undefined;
|
|
336
308
|
}>;
|
|
337
309
|
export type AudienceEntryLike = z.input<typeof AudienceEntry>;
|
|
338
310
|
export type AudienceEntry = z.infer<typeof AudienceEntry>;
|