@ninetailed/experience.js-utils-contentful 4.3.0-beta.3 → 5.0.0-beta.2

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