d i f f   - - g i t   a / s r c / c o m p o n e n t s / p l a n e s / w i z a r d / W i z a r d C o n t r o l s . t s x   b / s r c / c o m p o n e n t s / p l a n e s / w i z a r d / W i z a r d C o n t r o l s . t s x 
 
 i n d e x   3 5 f 5 4 1 9 . . 2 4 e a 6 9 5   1 0 0 6 4 4 
 
 - - -   a / s r c / c o m p o n e n t s / p l a n e s / w i z a r d / W i z a r d C o n t r o l s . t s x 
 
 + + +   b / s r c / c o m p o n e n t s / p l a n e s / w i z a r d / W i z a r d C o n t r o l s . t s x 
 
 @ @   - 7 7 , 1 1   + 7 7 , 1 1   @ @   e x p o r t   f u n c t i o n   W i z a r d C o n t r o l s ( { 
 
   
 
                   c o n s o l e . l o g ( ` $ { n e w   D a t e ( ) . t o I S O S t r i n g ( ) }   -   E n v i a n d o   a   g e n e r a r   p l a n   I A ` ) 
 
   
 
 -                 c o n s t   d a t a   =   a w a i t   g e n e r a t e P l a n A I . m u t a t e A s y n c ( a i I n p u t   a s   a n y ) 
 
 -                 c o n s o l e . l o g ( ` $ { n e w   D a t e ( ) . t o I S O S t r i n g ( ) }   -   P l a n   I A   g e n e r a d o ` ,   d a t a ) 
 
 +                 c o n s t   p l a n   =   a w a i t   g e n e r a t e P l a n A I . m u t a t e A s y n c ( a i I n p u t   a s   a n y ) 
 
 +                 c o n s o l e . l o g ( ` $ { n e w   D a t e ( ) . t o I S O S t r i n g ( ) }   -   P l a n   I A   g e n e r a d o ` ,   p l a n ) 
 
   
 
                   n a v i g a t e ( { 
 
 -                     t o :   ` / p l a n e s / $ { d a t a . p l a n . i d } ` , 
 
 +                     t o :   ` / p l a n e s / $ { p l a n . i d } ` , 
 
                       s t a t e :   {   s h o w C o n f e t t i :   t r u e   } , 
 
                   } ) 
 
                   r e t u r n 
 
 @ @   - 1 2 2 , 7   + 1 2 2 , 7   @ @   e x p o r t   f u n c t i o n   W i z a r d C o n t r o l s ( { 
 
               < B u t t o n   v a r i a n t = " s e c o n d a r y "   o n C l i c k = { o n P r e v }   d i s a b l e d = { d i s a b l e P r e v } > 
 
                   A n t e r i o r 
 
               < / B u t t o n > 
 
 -             < d i v   c l a s s N a m e = " f l e x - 1 " > 
 
 +             < d i v   c l a s s N a m e = " m x - 2   f l e x - 1 " > 
 
                   { e r r o r M e s s a g e   & &   ( 
 
                       < s p a n   c l a s s N a m e = " t e x t - d e s t r u c t i v e   t e x t - s m   f o n t - m e d i u m " > 
 
                           { e r r o r M e s s a g e } 
 
 d i f f   - - g i t   a / s r c / d a t a / a p i / p l a n s . a p i . t s   b / s r c / d a t a / a p i / p l a n s . a p i . t s 
 
 i n d e x   2 0 6 f 2 5 c . . 8 0 3 5 b b 2   1 0 0 6 4 4 
 
 - - -   a / s r c / d a t a / a p i / p l a n s . a p i . t s 
 
 + + +   b / s r c / d a t a / a p i / p l a n s . a p i . t s 
 
 @ @   - 2 6 8 , 8   + 2 6 8 , 8   @ @   e x p o r t   t y p e   A I G e n e r a t e P l a n I n p u t   =   { 
 
           e s t r u c t u r a P l a n I d :   U U I D 
 
       } 
 
       i a C o n f i g :   { 
 
 -         d e s c r i p c i o n E n f o q u e :   s t r i n g 
 
 -         n o t a s A d i c i o n a l e s ? :   s t r i n g 
 
 +         d e s c r i p c i o n E n f o q u e A c a d e m i c o :   s t r i n g 
 
 +         i n s t r u c c i o n e s A d i c i o n a l e s I A ? :   s t r i n g 
 
           a r c h i v o s R e f e r e n c i a ? :   A r r a y < U U I D > 
 
           r e p o s i t o r i o s I d s ? :   A r r a y < U U I D > 
 
           a r c h i v o s A d j u n t o s :   A r r a y < U p l o a d e d F i l e > 
 
 d i f f   - - g i t   a / s r c / d a t a / s u p a b a s e / i n v o k e E d g e . t s   b / s r c / d a t a / s u p a b a s e / i n v o k e E d g e . t s 
 
 i n d e x   6 2 7 b 6 e b . . 2 a e f f 2 e   1 0 0 6 4 4 
 
 - - -   a / s r c / d a t a / s u p a b a s e / i n v o k e E d g e . t s 
 
 + + +   b / s r c / d a t a / s u p a b a s e / i n v o k e E d g e . t s 
 
 @ @   - 1 , 1 2   + 1 , 1 8   @ @ 
 
 - i m p o r t   {   s u p a b a s e B r o w s e r   }   f r o m   " . / c l i e n t " ; 
 
 + i m p o r t   { 
 
 +     F u n c t i o n s F e t c h E r r o r , 
 
 +     F u n c t i o n s H t t p E r r o r , 
 
 +     F u n c t i o n s R e l a y E r r o r , 
 
 + }   f r o m   ' @ s u p a b a s e / s u p a b a s e - j s ' 
 
   
 
 - i m p o r t   t y p e   {   D a t a b a s e   }   f r o m   " @ / t y p e s / s u p a b a s e " ; 
 
 - i m p o r t   t y p e   {   S u p a b a s e C l i e n t   }   f r o m   " @ s u p a b a s e / s u p a b a s e - j s " ; 
 
 + i m p o r t   {   s u p a b a s e B r o w s e r   }   f r o m   ' . / c l i e n t ' 
 
 + 
 
 + i m p o r t   t y p e   {   D a t a b a s e   }   f r o m   ' @ / t y p e s / s u p a b a s e ' 
 
 + i m p o r t   t y p e   {   S u p a b a s e C l i e n t   }   f r o m   ' @ s u p a b a s e / s u p a b a s e - j s ' 
 
   
 
   e x p o r t   t y p e   E d g e I n v o k e O p t i o n s   =   { 
 
 -     m e t h o d ? :   " G E T "   |   " P O S T "   |   " P U T "   |   " P A T C H "   |   " D E L E T E " ; 
 
 -     h e a d e r s ? :   R e c o r d < s t r i n g ,   s t r i n g > ; 
 
 - } ; 
 
 +     m e t h o d ? :   ' G E T '   |   ' P O S T '   |   ' P U T '   |   ' P A T C H '   |   ' D E L E T E ' 
 
 +     h e a d e r s ? :   R e c o r d < s t r i n g ,   s t r i n g > 
 
 + } 
 
   
 
   e x p o r t   c l a s s   E d g e F u n c t i o n E r r o r   e x t e n d s   E r r o r   { 
 
       c o n s t r u c t o r ( 
 
 @ @   - 1 5 , 8   + 2 1 , 8   @ @   e x p o r t   c l a s s   E d g e F u n c t i o n E r r o r   e x t e n d s   E r r o r   { 
 
           p u b l i c   r e a d o n l y   s t a t u s ? :   n u m b e r , 
 
           p u b l i c   r e a d o n l y   d e t a i l s ? :   u n k n o w n , 
 
       )   { 
 
 -         s u p e r ( m e s s a g e ) ; 
 
 -         t h i s . n a m e   =   " E d g e F u n c t i o n E r r o r " ; 
 
 +         s u p e r ( m e s s a g e ) 
 
 +         t h i s . n a m e   =   ' E d g e F u n c t i o n E r r o r ' 
 
       } 
 
   } 
 
   
 
 @ @   - 3 4 , 2 3   + 4 0 , 6 9   @ @   e x p o r t   a s y n c   f u n c t i o n   i n v o k e E d g e < T O u t > ( 
 
       o p t s :   E d g e I n v o k e O p t i o n s   =   { } , 
 
       c l i e n t ? :   S u p a b a s e C l i e n t < D a t a b a s e > , 
 
   ) :   P r o m i s e < T O u t >   { 
 
 -     c o n s t   s u p a b a s e   =   c l i e n t   ? ?   s u p a b a s e B r o w s e r ( ) ; 
 
 +     c o n s t   s u p a b a s e   =   c l i e n t   ? ?   s u p a b a s e B r o w s e r ( ) 
 
   
 
       c o n s t   {   d a t a ,   e r r o r   }   =   a w a i t   s u p a b a s e . f u n c t i o n s . i n v o k e ( f u n c t i o n N a m e ,   { 
 
           b o d y , 
 
 -         m e t h o d :   o p t s . m e t h o d   ? ?   " P O S T " , 
 
 +         m e t h o d :   o p t s . m e t h o d   ? ?   ' P O S T ' , 
 
           h e a d e r s :   o p t s . h e a d e r s , 
 
 -     } ) ; 
 
 +     } ) 
 
   
 
       i f   ( e r r o r )   { 
 
 -         c o n s t   a n y E r r   =   e r r o r ; 
 
 -         t h r o w   n e w   E d g e F u n c t i o n E r r o r ( 
 
 -             a n y E r r . m e s s a g e   ? ?   " E r r o r   e n   E d g e   F u n c t i o n " , 
 
 -             f u n c t i o n N a m e , 
 
 -             a n y E r r . s t a t u s , 
 
 -             a n y E r r , 
 
 -         ) ; 
 
 +         / /   V a l o r e s   p o r   d e f e c t o   ( p o r   s i   f a l l a   e l   p a r s e o   o   e s   o t r o   t i p o   d e   e r r o r ) 
 
 +         l e t   m e s s a g e   =   e r r o r . m e s s a g e   / /   E l   g e n % r i c o   " r e t u r n e d   a   n o n - 2 x x   s t a t u s   c o d e " 
 
 +         l e t   s t a t u s   =   u n d e f i n e d 
 
 +         l e t   d e t a i l s :   u n k n o w n   =   e r r o r 
 
 + 
 
 +         / /   2 .   V e r i f i c a m o s   s i   e s   u n   e r r o r   H T T P   ( 4 x x   o   5 x x )   q u e   t r a e   c u e r p o   J S O N 
 
 +         i f   ( e r r o r   i n s t a n c e o f   F u n c t i o n s H t t p E r r o r )   { 
 
 +             t r y   { 
 
 +                 / /   O b t e n e m o s   e l   s t a t u s   r e a l   ( e j .   4 0 4 ,   4 0 0 ) 
 
 +                 s t a t u s   =   e r r o r . c o n t e x t . s t a t u s 
 
 + 
 
 +                 / /   ,% L A   C L A V E !   L e e m o s   e l   J S O N   q u e   t u   E d g e   F u n c t i o n   e n v i %%
 
 +                 c o n s t   e r r o r B o d y   =   a w a i t   e r r o r . c o n t e x t . j s o n ( ) 
 
 +                 d e t a i l s   =   e r r o r B o d y 
 
 + 
 
 +                 / /   I n t e n t a m o s   e x t r a e r   e l   m e n s a j e   h u m a n o   s e g %Q%n   t u   e s t r u c t u r a   {   e r r o r :   {   m e s s a g e :   " . . . "   }   } 
 
 +                 / /   o   l a   e s t r u c t u r a   s i m p l e   {   e r r o r :   " . . . "   } 
 
 +                 i f   ( e r r o r B o d y   & &   t y p e o f   e r r o r B o d y   = = =   ' o b j e c t ' )   { 
 
 +                     / /   C a s o   1 :   E s t r u c t u r a   a n i d a d a   ( l a   q u e   d e f i n i m o s   h a c e   p o c o :   {   e r r o r :   {   m e s s a g e :   " . . . "   }   } ) 
 
 +                     i f   ( 
 
 +                         ' e r r o r '   i n   e r r o r B o d y   & & 
 
 +                         t y p e o f   e r r o r B o d y . e r r o r   = = =   ' o b j e c t '   & & 
 
 +                         e r r o r B o d y . e r r o r   ! = =   n u l l   & & 
 
 +                         ' m e s s a g e '   i n   e r r o r B o d y . e r r o r 
 
 +                     )   { 
 
 +                         m e s s a g e   =   ( e r r o r B o d y . e r r o r   a s   {   m e s s a g e :   s t r i n g   } ) . m e s s a g e 
 
 +                     } 
 
 +                     / /   C a s o   2 :   E s t r u c t u r a   s i m p l e   ( {   e r r o r :   " M e n s a j e   d e   e r r o r "   } ) 
 
 +                     e l s e   i f   ( 
 
 +                         ' e r r o r '   i n   e r r o r B o d y   & & 
 
 +                         t y p e o f   e r r o r B o d y . e r r o r   = = =   ' s t r i n g ' 
 
 +                     )   { 
 
 +                         m e s s a g e   =   e r r o r B o d y . e r r o r 
 
 +                     } 
 
 +                     / /   C a s o   3 :   P r o p i e d a d   m e s s a g e   d i r e c t a   ( {   m e s s a g e :   " . . . "   } ) 
 
 +                     e l s e   i f   ( 
 
 +                         ' m e s s a g e '   i n   e r r o r B o d y   & & 
 
 +                         t y p e o f   e r r o r B o d y . m e s s a g e   = = =   ' s t r i n g ' 
 
 +                     )   { 
 
 +                         m e s s a g e   =   e r r o r B o d y . m e s s a g e 
 
 +                     } 
 
 +                 } 
 
 +             }   c a t c h   ( e )   { 
 
 +                 c o n s o l e . w a r n ( ' N o   s e   p u d o   p a r s e a r   e l   e r r o r   J S O N   d e   l a   E d g e   F u n c t i o n ' ,   e ) 
 
 +             } 
 
 +         }   e l s e   i f   ( e r r o r   i n s t a n c e o f   F u n c t i o n s R e l a y E r r o r )   { 
 
 +             m e s s a g e   =   ` E r r o r   d e   R e l a y   S u p a b a s e :   $ { e r r o r . m e s s a g e } ` 
 
 +         }   e l s e   i f   ( e r r o r   i n s t a n c e o f   F u n c t i o n s F e t c h E r r o r )   { 
 
 +             m e s s a g e   =   ` E r r o r   d e   c o n e x i %%n   ( F e t c h ) :   $ { e r r o r . m e s s a g e } ` 
 
 +         } 
 
 + 
 
 +         / /   3 .   L a n z a m o s   t u   e r r o r   p e r s o n a l i z a d o   c o n   l o s   d a t o s   r e a l e s   e x t r a % d o s 
 
 +         t h r o w   n e w   E d g e F u n c t i o n E r r o r ( m e s s a g e ,   f u n c t i o n N a m e ,   s t a t u s ,   d e t a i l s ) 
 
       } 
 
   
 
 -     r e t u r n   d a t a   a s   T O u t ; 
 
 +     r e t u r n   d a t a   a s   T O u t 
 
   } 
 
 