Skip to content

Commit 076d6cf

Browse files
fix(typegen): 🤖 ✨
1 parent 7529052 commit 076d6cf

File tree

2 files changed

+226
-37
lines changed

2 files changed

+226
-37
lines changed

‎dev/test-studio/sanity.types.ts‎

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,45 @@ export type RichDate = {
266266
offset?: number
267267
}
268268

269+
export type InternationalizedPost = {
270+
_id: string
271+
_type: 'internationalizedPost'
272+
_createdAt: string
273+
_updatedAt: string
274+
_rev: string
275+
title?: InternationalizedArrayString
276+
description?: InternationalizedArrayText
277+
slug?: Slug
278+
}
279+
280+
export type Slug = {
281+
_type: 'slug'
282+
current: string
283+
source?: string
284+
}
285+
286+
export type InternationalizedArrayText = Array<
287+
{
288+
_key: string
289+
} & InternationalizedArrayTextValue
290+
>
291+
292+
export type InternationalizedArrayString = Array<
293+
{
294+
_key: string
295+
} & InternationalizedArrayStringValue
296+
>
297+
298+
export type InternationalizedArrayTextValue = {
299+
_type: 'internationalizedArrayTextValue'
300+
value?: string
301+
}
302+
303+
export type InternationalizedArrayStringValue = {
304+
_type: 'internationalizedArrayStringValue'
305+
value?: string
306+
}
307+
269308
export type SanityImagePaletteSwatch = {
270309
_type: 'sanity.imagePaletteSwatch'
271310
background?: string
@@ -363,12 +402,6 @@ export type Geopoint = {
363402
alt?: number
364403
}
365404

366-
export type Slug = {
367-
_type: 'slug'
368-
current: string
369-
source?: string
370-
}
371-
372405
export type AllSanitySchemaTypes =
373406
| Rendition
374407
| SanityVercelProtectionBypass
@@ -394,6 +427,12 @@ export type AllSanitySchemaTypes =
394427
| Code
395428
| RichDateTest
396429
| RichDate
430+
| InternationalizedPost
431+
| Slug
432+
| InternationalizedArrayText
433+
| InternationalizedArrayString
434+
| InternationalizedArrayTextValue
435+
| InternationalizedArrayStringValue
397436
| SanityImagePaletteSwatch
398437
| SanityImagePalette
399438
| SanityImageDimensions
@@ -402,7 +441,6 @@ export type AllSanitySchemaTypes =
402441
| SanityAssetSourceData
403442
| SanityImageAsset
404443
| Geopoint
405-
| Slug
406444

407445
export declare const internalGroqTypeReferenceTo: unique symbol
408446

‎dev/test-studio/schema.json‎

Lines changed: 181 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,6 +1364,187 @@
13641364
}
13651365
}
13661366
},
1367+
{
1368+
"name": "internationalizedPost",
1369+
"type": "document",
1370+
"attributes": {
1371+
"_id": {
1372+
"type": "objectAttribute",
1373+
"value": {
1374+
"type": "string"
1375+
}
1376+
},
1377+
"_type": {
1378+
"type": "objectAttribute",
1379+
"value": {
1380+
"type": "string",
1381+
"value": "internationalizedPost"
1382+
}
1383+
},
1384+
"_createdAt": {
1385+
"type": "objectAttribute",
1386+
"value": {
1387+
"type": "string"
1388+
}
1389+
},
1390+
"_updatedAt": {
1391+
"type": "objectAttribute",
1392+
"value": {
1393+
"type": "string"
1394+
}
1395+
},
1396+
"_rev": {
1397+
"type": "objectAttribute",
1398+
"value": {
1399+
"type": "string"
1400+
}
1401+
},
1402+
"title": {
1403+
"type": "objectAttribute",
1404+
"value": {
1405+
"type": "inline",
1406+
"name": "internationalizedArrayString"
1407+
},
1408+
"optional": true
1409+
},
1410+
"description": {
1411+
"type": "objectAttribute",
1412+
"value": {
1413+
"type": "inline",
1414+
"name": "internationalizedArrayText"
1415+
},
1416+
"optional": true
1417+
},
1418+
"slug": {
1419+
"type": "objectAttribute",
1420+
"value": {
1421+
"type": "inline",
1422+
"name": "slug"
1423+
},
1424+
"optional": true
1425+
}
1426+
}
1427+
},
1428+
{
1429+
"name": "slug",
1430+
"type": "type",
1431+
"value": {
1432+
"type": "object",
1433+
"attributes": {
1434+
"_type": {
1435+
"type": "objectAttribute",
1436+
"value": {
1437+
"type": "string",
1438+
"value": "slug"
1439+
}
1440+
},
1441+
"current": {
1442+
"type": "objectAttribute",
1443+
"value": {
1444+
"type": "string"
1445+
},
1446+
"optional": false
1447+
},
1448+
"source": {
1449+
"type": "objectAttribute",
1450+
"value": {
1451+
"type": "string"
1452+
},
1453+
"optional": true
1454+
}
1455+
}
1456+
}
1457+
},
1458+
{
1459+
"name": "internationalizedArrayText",
1460+
"type": "type",
1461+
"value": {
1462+
"type": "array",
1463+
"of": {
1464+
"type": "object",
1465+
"attributes": {
1466+
"_key": {
1467+
"type": "objectAttribute",
1468+
"value": {
1469+
"type": "string"
1470+
}
1471+
}
1472+
},
1473+
"rest": {
1474+
"type": "inline",
1475+
"name": "internationalizedArrayTextValue"
1476+
}
1477+
}
1478+
}
1479+
},
1480+
{
1481+
"name": "internationalizedArrayString",
1482+
"type": "type",
1483+
"value": {
1484+
"type": "array",
1485+
"of": {
1486+
"type": "object",
1487+
"attributes": {
1488+
"_key": {
1489+
"type": "objectAttribute",
1490+
"value": {
1491+
"type": "string"
1492+
}
1493+
}
1494+
},
1495+
"rest": {
1496+
"type": "inline",
1497+
"name": "internationalizedArrayStringValue"
1498+
}
1499+
}
1500+
}
1501+
},
1502+
{
1503+
"name": "internationalizedArrayTextValue",
1504+
"type": "type",
1505+
"value": {
1506+
"type": "object",
1507+
"attributes": {
1508+
"_type": {
1509+
"type": "objectAttribute",
1510+
"value": {
1511+
"type": "string",
1512+
"value": "internationalizedArrayTextValue"
1513+
}
1514+
},
1515+
"value": {
1516+
"type": "objectAttribute",
1517+
"value": {
1518+
"type": "string"
1519+
},
1520+
"optional": true
1521+
}
1522+
}
1523+
}
1524+
},
1525+
{
1526+
"name": "internationalizedArrayStringValue",
1527+
"type": "type",
1528+
"value": {
1529+
"type": "object",
1530+
"attributes": {
1531+
"_type": {
1532+
"type": "objectAttribute",
1533+
"value": {
1534+
"type": "string",
1535+
"value": "internationalizedArrayStringValue"
1536+
}
1537+
},
1538+
"value": {
1539+
"type": "objectAttribute",
1540+
"value": {
1541+
"type": "string"
1542+
},
1543+
"optional": true
1544+
}
1545+
}
1546+
}
1547+
},
13671548
{
13681549
"name": "sanity.imagePaletteSwatch",
13691550
"type": "type",
@@ -1945,35 +2126,5 @@
19452126
}
19462127
}
19472128
}
1948-
},
1949-
{
1950-
"name": "slug",
1951-
"type": "type",
1952-
"value": {
1953-
"type": "object",
1954-
"attributes": {
1955-
"_type": {
1956-
"type": "objectAttribute",
1957-
"value": {
1958-
"type": "string",
1959-
"value": "slug"
1960-
}
1961-
},
1962-
"current": {
1963-
"type": "objectAttribute",
1964-
"value": {
1965-
"type": "string"
1966-
},
1967-
"optional": false
1968-
},
1969-
"source": {
1970-
"type": "objectAttribute",
1971-
"value": {
1972-
"type": "string"
1973-
},
1974-
"optional": true
1975-
}
1976-
}
1977-
}
19782129
}
19792130
]

0 commit comments

Comments
 (0)