File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ of the GLS functions and can be referenced in your flows.
7878 value . type = `export type ${ value . identifier } = ${ value . type } `
7979 . replace ( / \| u n d e f i n e d / g, "" )
8080
81-
8281 function breakDown (
8382 typeName : string ,
8483 code : string
@@ -172,6 +171,7 @@ of the GLS functions and can be referenced in your flows.
172171 if ( array ) {
173172 type = type . getArrayElementTypeOrThrow ( )
174173 }
174+ let globalDocumentation : string
175175
176176 type . getProperties ( ) . forEach ( property => {
177177 const name = property . getName ( ) ;
@@ -189,9 +189,15 @@ of the GLS functions and can be referenced in your flows.
189189
190190 property . getJsDocTags ( ) . forEach ( info => {
191191 info . getText ( ) . forEach ( part => {
192+ if ( info . getName ( ) === "global" ) {
193+ globalDocumentation = ( globalDocumentation || "" ) + "\n" + part . text . trim ( )
194+ return
195+ }
192196 docs [ info . getName ( ) ] = part . text . trim ( )
193197 } )
198+
194199 } )
200+
195201 if ( currTypeText . startsWith ( "GLS_" ) ) {
196202 docs . link = currTypeText . toLowerCase ( )
197203 . replace ( / - / g, "_" )
@@ -211,12 +217,10 @@ of the GLS functions and can be referenced in your flows.
211217 const table = `<TypeTable type={{${ typeString } }}
212218/>`
213219 console . log ( `# ${ key } ` )
220+ console . log ( globalDocumentation || "\nNo documentation provided for this type." )
221+ console . log ( )
214222 console . log ( table )
215223 }
216- // console.log(`
217- // # ${value.identifier} ${array ? "[]" : ""}
218- // `)
219- // console.log(table)
220224 } )
221225
222226} )
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export const ShipmentSchema = z.object({
1212 ShipmentDate : z . date ( ) . optional ( ) ,
1313 IncotermCode : z . int ( ) . max ( 99 ) . optional ( ) ,
1414 Identifier : z . string ( ) . max ( 40 ) . optional ( ) ,
15- Product : z . enum ( [ "PARCEL" , "EXPRESS" ] ) ,
15+ Product : z . enum ( [ "PARCEL" , "EXPRESS" ] ) . default ( "PARCEL" ) ,
1616 ExpressAltDeliveryAllowed : z . boolean ( ) . optional ( ) ,
1717 Consignee : ConsigneeSchema ,
1818 Shipper : ShipperSchema . optional ( ) ,
You can’t perform that action at this time.
0 commit comments