@@ -94,35 +94,35 @@ export type DocumentAsRequest = {
9494/**
9595 * Variant of 'block' structured text node for ?nested=true API responses
9696 */
97- export type BlockWithResolvedBlocks = Omit < Block , 'item' > & {
97+ export type BlockWithNestedBlocks = Omit < Block , 'item' > & {
9898 item : SchemaTypes . Item ;
9999} ;
100100
101101/**
102102 * Variant of 'inlineBlock' structured text node for ?nested=true API responses
103103 */
104- export type InlineBlockWithResolvedBlocks = Omit < InlineBlock , 'item' > & {
104+ export type InlineBlockWithNestedBlocks = Omit < InlineBlock , 'item' > & {
105105 item : SchemaTypes . Item ;
106106} ;
107107
108108/**
109109 * Generic type to transform a node that might be containing a 'block' or 'inlineBlock' as a (deeply nested) children to it's variant for ?nested=true API responses
110110 */
111- export type NodeWithResolvedBlocks < T > = WithMappedChildren <
111+ export type NodeWithNestedBlocks < T > = WithMappedChildren <
112112 T ,
113113 DeepMapVariants <
114114 T extends { children : infer C } ? C : never ,
115- BlockWithResolvedBlocks ,
116- InlineBlockWithResolvedBlocks
115+ BlockWithNestedBlocks ,
116+ InlineBlockWithNestedBlocks
117117 >
118118> ;
119119
120120/**
121121 * Variant of Structured Text document for ?nested=true API responses
122122 */
123- export type DocumentWithResolvedBlocks = {
123+ export type DocumentWithNestedBlocks = {
124124 schema : 'dast' ;
125- document : NodeWithResolvedBlocks < Root > ;
125+ document : NodeWithNestedBlocks < Root > ;
126126} ;
127127
128128/**
@@ -137,8 +137,8 @@ export type DocumentWithResolvedBlocks = {
137137 */
138138export type StructuredTextFieldValue = Document | null ;
139139export type StructuredTextFieldValueAsRequest = DocumentAsRequest | null ;
140- export type StructuredTextFieldValueWithResolvedBlocks =
141- DocumentWithResolvedBlocks | null ;
140+ export type StructuredTextFieldValueWithNestedBlocks =
141+ DocumentWithNestedBlocks | null ;
142142
143143/**
144144 * Helper function to validate if a value has the expected structured text document structure.
@@ -165,10 +165,10 @@ function validateAllBlockNodes(
165165 node :
166166 | Block
167167 | BlockAsRequest
168- | BlockWithResolvedBlocks
168+ | BlockWithNestedBlocks
169169 | InlineBlock
170170 | InlineBlockAsRequest
171- | InlineBlockWithResolvedBlocks ,
171+ | InlineBlockWithNestedBlocks ,
172172 ) => boolean ,
173173) : boolean {
174174 return everyNode ( node , ( currentNode ) => {
@@ -232,9 +232,9 @@ export function isStructuredTextFieldValueAsRequest(
232232 * Type guard for structured text field values with nested blocks (?nested=true format).
233233 * Ensures all block/inlineBlock nodes have full SchemaTypes.Item objects.
234234 */
235- export function isStructuredTextFieldValueWithResolvedBlocks (
235+ export function isStructuredTextFieldValueWithNestedBlocks (
236236 value : unknown ,
237- ) : value is StructuredTextFieldValueWithResolvedBlocks {
237+ ) : value is StructuredTextFieldValueWithNestedBlocks {
238238 if ( value === null ) return true ;
239239
240240 if ( ! isValidDocumentStructure ( value ) ) {
0 commit comments