@webstudio-is/sdk 0.132.0 → 0.134.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/index.js CHANGED
@@ -60,6 +60,8 @@ var commonPageFields = {
60
60
  excludePageFromSearch: z2.string().optional(),
61
61
  socialImageAssetId: z2.string().optional(),
62
62
  socialImageUrl: z2.string().optional(),
63
+ status: z2.string().optional(),
64
+ redirect: z2.string().optional(),
63
65
  custom: z2.array(
64
66
  z2.object({
65
67
  property: z2.string(),
@@ -68,7 +70,7 @@ var commonPageFields = {
68
70
  ).optional()
69
71
  }),
70
72
  rootInstanceId: z2.string(),
71
- pathVariableId: z2.optional(z2.string())
73
+ pathParamsDataSourceId: z2.optional(z2.string())
72
74
  };
73
75
  var HomePagePath = z2.string().refine((path) => path === "", "Home page path must be empty");
74
76
  var HomePage = z2.object({
@@ -110,7 +112,8 @@ var ProjectNewRedirectPath = PagePath.or(
110
112
  );
111
113
  var PageRedirect = z2.object({
112
114
  old: PagePath,
113
- new: ProjectNewRedirectPath
115
+ new: ProjectNewRedirectPath,
116
+ status: z2.enum(["301", "302"]).optional()
114
117
  });
115
118
  var CompilerSettings = z2.object({
116
119
  // All fields are optional to ensure consistency and allow for the addition of new fields without requiring migration
@@ -32,6 +32,8 @@ declare const Page: z.ZodObject<{
32
32
  excludePageFromSearch: z.ZodOptional<z.ZodString>;
33
33
  socialImageAssetId: z.ZodOptional<z.ZodString>;
34
34
  socialImageUrl: z.ZodOptional<z.ZodString>;
35
+ status: z.ZodOptional<z.ZodString>;
36
+ redirect: z.ZodOptional<z.ZodString>;
35
37
  custom: z.ZodOptional<z.ZodArray<z.ZodObject<{
36
38
  property: z.ZodString;
37
39
  content: z.ZodString;
@@ -48,6 +50,8 @@ declare const Page: z.ZodObject<{
48
50
  excludePageFromSearch?: string | undefined;
49
51
  socialImageAssetId?: string | undefined;
50
52
  socialImageUrl?: string | undefined;
53
+ status?: string | undefined;
54
+ redirect?: string | undefined;
51
55
  custom?: {
52
56
  property: string;
53
57
  content: string;
@@ -58,13 +62,15 @@ declare const Page: z.ZodObject<{
58
62
  excludePageFromSearch?: string | undefined;
59
63
  socialImageAssetId?: string | undefined;
60
64
  socialImageUrl?: string | undefined;
65
+ status?: string | undefined;
66
+ redirect?: string | undefined;
61
67
  custom?: {
62
68
  property: string;
63
69
  content: string;
64
70
  }[] | undefined;
65
71
  }>;
66
72
  rootInstanceId: z.ZodString;
67
- pathVariableId: z.ZodOptional<z.ZodString>;
73
+ pathParamsDataSourceId: z.ZodOptional<z.ZodString>;
68
74
  }, "strip", z.ZodTypeAny, {
69
75
  path: string;
70
76
  name: string;
@@ -74,6 +80,8 @@ declare const Page: z.ZodObject<{
74
80
  excludePageFromSearch?: string | undefined;
75
81
  socialImageAssetId?: string | undefined;
76
82
  socialImageUrl?: string | undefined;
83
+ status?: string | undefined;
84
+ redirect?: string | undefined;
77
85
  custom?: {
78
86
  property: string;
79
87
  content: string;
@@ -82,7 +90,7 @@ declare const Page: z.ZodObject<{
82
90
  id: string;
83
91
  title: string;
84
92
  rootInstanceId: string;
85
- pathVariableId?: string | undefined;
93
+ pathParamsDataSourceId?: string | undefined;
86
94
  }, {
87
95
  path: string;
88
96
  name: string;
@@ -92,6 +100,8 @@ declare const Page: z.ZodObject<{
92
100
  excludePageFromSearch?: string | undefined;
93
101
  socialImageAssetId?: string | undefined;
94
102
  socialImageUrl?: string | undefined;
103
+ status?: string | undefined;
104
+ redirect?: string | undefined;
95
105
  custom?: {
96
106
  property: string;
97
107
  content: string;
@@ -100,7 +110,7 @@ declare const Page: z.ZodObject<{
100
110
  id: string;
101
111
  title: string;
102
112
  rootInstanceId: string;
103
- pathVariableId?: string | undefined;
113
+ pathParamsDataSourceId?: string | undefined;
104
114
  }>;
105
115
  declare const ProjectMeta: z.ZodObject<{
106
116
  siteName: z.ZodOptional<z.ZodString>;
@@ -120,12 +130,15 @@ export declare const ProjectNewRedirectPath: z.ZodUnion<[z.ZodEffects<z.ZodEffec
120
130
  export declare const PageRedirect: z.ZodObject<{
121
131
  old: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>;
122
132
  new: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, z.ZodEffects<z.ZodString, string, string>]>;
133
+ status: z.ZodOptional<z.ZodEnum<["301", "302"]>>;
123
134
  }, "strip", z.ZodTypeAny, {
124
135
  old: string;
125
136
  new: string;
137
+ status?: "301" | "302" | undefined;
126
138
  }, {
127
139
  old: string;
128
140
  new: string;
141
+ status?: "301" | "302" | undefined;
129
142
  }>;
130
143
  export type PageRedirect = z.infer<typeof PageRedirect>;
131
144
  export declare const CompilerSettings: z.ZodObject<{
@@ -161,12 +174,15 @@ export declare const Pages: z.ZodObject<{
161
174
  redirects: z.ZodOptional<z.ZodArray<z.ZodObject<{
162
175
  old: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>;
163
176
  new: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, z.ZodEffects<z.ZodString, string, string>]>;
177
+ status: z.ZodOptional<z.ZodEnum<["301", "302"]>>;
164
178
  }, "strip", z.ZodTypeAny, {
165
179
  old: string;
166
180
  new: string;
181
+ status?: "301" | "302" | undefined;
167
182
  }, {
168
183
  old: string;
169
184
  new: string;
185
+ status?: "301" | "302" | undefined;
170
186
  }>, "many">>;
171
187
  homePage: z.ZodObject<{
172
188
  path: z.ZodEffects<z.ZodString, string, string>;
@@ -179,6 +195,8 @@ export declare const Pages: z.ZodObject<{
179
195
  excludePageFromSearch: z.ZodOptional<z.ZodString>;
180
196
  socialImageAssetId: z.ZodOptional<z.ZodString>;
181
197
  socialImageUrl: z.ZodOptional<z.ZodString>;
198
+ status: z.ZodOptional<z.ZodString>;
199
+ redirect: z.ZodOptional<z.ZodString>;
182
200
  custom: z.ZodOptional<z.ZodArray<z.ZodObject<{
183
201
  property: z.ZodString;
184
202
  content: z.ZodString;
@@ -195,6 +213,8 @@ export declare const Pages: z.ZodObject<{
195
213
  excludePageFromSearch?: string | undefined;
196
214
  socialImageAssetId?: string | undefined;
197
215
  socialImageUrl?: string | undefined;
216
+ status?: string | undefined;
217
+ redirect?: string | undefined;
198
218
  custom?: {
199
219
  property: string;
200
220
  content: string;
@@ -205,13 +225,15 @@ export declare const Pages: z.ZodObject<{
205
225
  excludePageFromSearch?: string | undefined;
206
226
  socialImageAssetId?: string | undefined;
207
227
  socialImageUrl?: string | undefined;
228
+ status?: string | undefined;
229
+ redirect?: string | undefined;
208
230
  custom?: {
209
231
  property: string;
210
232
  content: string;
211
233
  }[] | undefined;
212
234
  }>;
213
235
  rootInstanceId: z.ZodString;
214
- pathVariableId: z.ZodOptional<z.ZodString>;
236
+ pathParamsDataSourceId: z.ZodOptional<z.ZodString>;
215
237
  }, "strip", z.ZodTypeAny, {
216
238
  path: string;
217
239
  name: string;
@@ -221,6 +243,8 @@ export declare const Pages: z.ZodObject<{
221
243
  excludePageFromSearch?: string | undefined;
222
244
  socialImageAssetId?: string | undefined;
223
245
  socialImageUrl?: string | undefined;
246
+ status?: string | undefined;
247
+ redirect?: string | undefined;
224
248
  custom?: {
225
249
  property: string;
226
250
  content: string;
@@ -229,7 +253,7 @@ export declare const Pages: z.ZodObject<{
229
253
  id: string;
230
254
  title: string;
231
255
  rootInstanceId: string;
232
- pathVariableId?: string | undefined;
256
+ pathParamsDataSourceId?: string | undefined;
233
257
  }, {
234
258
  path: string;
235
259
  name: string;
@@ -239,6 +263,8 @@ export declare const Pages: z.ZodObject<{
239
263
  excludePageFromSearch?: string | undefined;
240
264
  socialImageAssetId?: string | undefined;
241
265
  socialImageUrl?: string | undefined;
266
+ status?: string | undefined;
267
+ redirect?: string | undefined;
242
268
  custom?: {
243
269
  property: string;
244
270
  content: string;
@@ -247,7 +273,7 @@ export declare const Pages: z.ZodObject<{
247
273
  id: string;
248
274
  title: string;
249
275
  rootInstanceId: string;
250
- pathVariableId?: string | undefined;
276
+ pathParamsDataSourceId?: string | undefined;
251
277
  }>;
252
278
  pages: z.ZodEffects<z.ZodArray<z.ZodObject<{
253
279
  path: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>;
@@ -260,6 +286,8 @@ export declare const Pages: z.ZodObject<{
260
286
  excludePageFromSearch: z.ZodOptional<z.ZodString>;
261
287
  socialImageAssetId: z.ZodOptional<z.ZodString>;
262
288
  socialImageUrl: z.ZodOptional<z.ZodString>;
289
+ status: z.ZodOptional<z.ZodString>;
290
+ redirect: z.ZodOptional<z.ZodString>;
263
291
  custom: z.ZodOptional<z.ZodArray<z.ZodObject<{
264
292
  property: z.ZodString;
265
293
  content: z.ZodString;
@@ -276,6 +304,8 @@ export declare const Pages: z.ZodObject<{
276
304
  excludePageFromSearch?: string | undefined;
277
305
  socialImageAssetId?: string | undefined;
278
306
  socialImageUrl?: string | undefined;
307
+ status?: string | undefined;
308
+ redirect?: string | undefined;
279
309
  custom?: {
280
310
  property: string;
281
311
  content: string;
@@ -286,13 +316,15 @@ export declare const Pages: z.ZodObject<{
286
316
  excludePageFromSearch?: string | undefined;
287
317
  socialImageAssetId?: string | undefined;
288
318
  socialImageUrl?: string | undefined;
319
+ status?: string | undefined;
320
+ redirect?: string | undefined;
289
321
  custom?: {
290
322
  property: string;
291
323
  content: string;
292
324
  }[] | undefined;
293
325
  }>;
294
326
  rootInstanceId: z.ZodString;
295
- pathVariableId: z.ZodOptional<z.ZodString>;
327
+ pathParamsDataSourceId: z.ZodOptional<z.ZodString>;
296
328
  }, "strip", z.ZodTypeAny, {
297
329
  path: string;
298
330
  name: string;
@@ -302,6 +334,8 @@ export declare const Pages: z.ZodObject<{
302
334
  excludePageFromSearch?: string | undefined;
303
335
  socialImageAssetId?: string | undefined;
304
336
  socialImageUrl?: string | undefined;
337
+ status?: string | undefined;
338
+ redirect?: string | undefined;
305
339
  custom?: {
306
340
  property: string;
307
341
  content: string;
@@ -310,7 +344,7 @@ export declare const Pages: z.ZodObject<{
310
344
  id: string;
311
345
  title: string;
312
346
  rootInstanceId: string;
313
- pathVariableId?: string | undefined;
347
+ pathParamsDataSourceId?: string | undefined;
314
348
  }, {
315
349
  path: string;
316
350
  name: string;
@@ -320,6 +354,8 @@ export declare const Pages: z.ZodObject<{
320
354
  excludePageFromSearch?: string | undefined;
321
355
  socialImageAssetId?: string | undefined;
322
356
  socialImageUrl?: string | undefined;
357
+ status?: string | undefined;
358
+ redirect?: string | undefined;
323
359
  custom?: {
324
360
  property: string;
325
361
  content: string;
@@ -328,7 +364,7 @@ export declare const Pages: z.ZodObject<{
328
364
  id: string;
329
365
  title: string;
330
366
  rootInstanceId: string;
331
- pathVariableId?: string | undefined;
367
+ pathParamsDataSourceId?: string | undefined;
332
368
  }>, "many">, {
333
369
  path: string;
334
370
  name: string;
@@ -338,6 +374,8 @@ export declare const Pages: z.ZodObject<{
338
374
  excludePageFromSearch?: string | undefined;
339
375
  socialImageAssetId?: string | undefined;
340
376
  socialImageUrl?: string | undefined;
377
+ status?: string | undefined;
378
+ redirect?: string | undefined;
341
379
  custom?: {
342
380
  property: string;
343
381
  content: string;
@@ -346,7 +384,7 @@ export declare const Pages: z.ZodObject<{
346
384
  id: string;
347
385
  title: string;
348
386
  rootInstanceId: string;
349
- pathVariableId?: string | undefined;
387
+ pathParamsDataSourceId?: string | undefined;
350
388
  }[], {
351
389
  path: string;
352
390
  name: string;
@@ -356,6 +394,8 @@ export declare const Pages: z.ZodObject<{
356
394
  excludePageFromSearch?: string | undefined;
357
395
  socialImageAssetId?: string | undefined;
358
396
  socialImageUrl?: string | undefined;
397
+ status?: string | undefined;
398
+ redirect?: string | undefined;
359
399
  custom?: {
360
400
  property: string;
361
401
  content: string;
@@ -364,7 +404,7 @@ export declare const Pages: z.ZodObject<{
364
404
  id: string;
365
405
  title: string;
366
406
  rootInstanceId: string;
367
- pathVariableId?: string | undefined;
407
+ pathParamsDataSourceId?: string | undefined;
368
408
  }[]>;
369
409
  folders: z.ZodEffects<z.ZodArray<z.ZodObject<{
370
410
  id: z.ZodString;
@@ -402,6 +442,8 @@ export declare const Pages: z.ZodObject<{
402
442
  excludePageFromSearch?: string | undefined;
403
443
  socialImageAssetId?: string | undefined;
404
444
  socialImageUrl?: string | undefined;
445
+ status?: string | undefined;
446
+ redirect?: string | undefined;
405
447
  custom?: {
406
448
  property: string;
407
449
  content: string;
@@ -410,7 +452,7 @@ export declare const Pages: z.ZodObject<{
410
452
  id: string;
411
453
  title: string;
412
454
  rootInstanceId: string;
413
- pathVariableId?: string | undefined;
455
+ pathParamsDataSourceId?: string | undefined;
414
456
  };
415
457
  pages: {
416
458
  path: string;
@@ -421,6 +463,8 @@ export declare const Pages: z.ZodObject<{
421
463
  excludePageFromSearch?: string | undefined;
422
464
  socialImageAssetId?: string | undefined;
423
465
  socialImageUrl?: string | undefined;
466
+ status?: string | undefined;
467
+ redirect?: string | undefined;
424
468
  custom?: {
425
469
  property: string;
426
470
  content: string;
@@ -429,7 +473,7 @@ export declare const Pages: z.ZodObject<{
429
473
  id: string;
430
474
  title: string;
431
475
  rootInstanceId: string;
432
- pathVariableId?: string | undefined;
476
+ pathParamsDataSourceId?: string | undefined;
433
477
  }[];
434
478
  folders: {
435
479
  name: string;
@@ -448,6 +492,7 @@ export declare const Pages: z.ZodObject<{
448
492
  redirects?: {
449
493
  old: string;
450
494
  new: string;
495
+ status?: "301" | "302" | undefined;
451
496
  }[] | undefined;
452
497
  }, {
453
498
  homePage: {
@@ -459,6 +504,8 @@ export declare const Pages: z.ZodObject<{
459
504
  excludePageFromSearch?: string | undefined;
460
505
  socialImageAssetId?: string | undefined;
461
506
  socialImageUrl?: string | undefined;
507
+ status?: string | undefined;
508
+ redirect?: string | undefined;
462
509
  custom?: {
463
510
  property: string;
464
511
  content: string;
@@ -467,7 +514,7 @@ export declare const Pages: z.ZodObject<{
467
514
  id: string;
468
515
  title: string;
469
516
  rootInstanceId: string;
470
- pathVariableId?: string | undefined;
517
+ pathParamsDataSourceId?: string | undefined;
471
518
  };
472
519
  pages: {
473
520
  path: string;
@@ -478,6 +525,8 @@ export declare const Pages: z.ZodObject<{
478
525
  excludePageFromSearch?: string | undefined;
479
526
  socialImageAssetId?: string | undefined;
480
527
  socialImageUrl?: string | undefined;
528
+ status?: string | undefined;
529
+ redirect?: string | undefined;
481
530
  custom?: {
482
531
  property: string;
483
532
  content: string;
@@ -486,7 +535,7 @@ export declare const Pages: z.ZodObject<{
486
535
  id: string;
487
536
  title: string;
488
537
  rootInstanceId: string;
489
- pathVariableId?: string | undefined;
538
+ pathParamsDataSourceId?: string | undefined;
490
539
  }[];
491
540
  folders: {
492
541
  name: string;
@@ -505,6 +554,7 @@ export declare const Pages: z.ZodObject<{
505
554
  redirects?: {
506
555
  old: string;
507
556
  new: string;
557
+ status?: "301" | "302" | undefined;
508
558
  }[] | undefined;
509
559
  }>;
510
560
  export type Pages = z.infer<typeof Pages>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/sdk",
3
- "version": "0.132.0",
3
+ "version": "0.134.0",
4
4
  "description": "Webstudio project data schema",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -19,13 +19,13 @@
19
19
  "sideEffects": false,
20
20
  "dependencies": {
21
21
  "zod": "^3.21.4",
22
- "@webstudio-is/css-engine": "0.132.0",
23
- "@webstudio-is/fonts": "0.132.0"
22
+ "@webstudio-is/css-engine": "0.134.0",
23
+ "@webstudio-is/fonts": "0.134.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@jest/globals": "^29.7.0",
27
- "@webstudio-is/jest-config": "1.0.7",
28
- "@webstudio-is/tsconfig": "1.0.7"
27
+ "@webstudio-is/tsconfig": "1.0.7",
28
+ "@webstudio-is/jest-config": "1.0.7"
29
29
  },
30
30
  "scripts": {
31
31
  "typecheck": "tsc",