@@ -578,6 +578,99 @@ program
578578 handleSdkRes ( await sdk . management . inboundApplication . deleteConsents ( { appId } ) ) ;
579579 } ) ;
580580
581+ // *** Outbound application commands ***
582+
583+ // outbound-application-create
584+ program
585+ . command ( 'outbound-application-create' )
586+ . description ( 'Create a new outbound application' )
587+ . argument ( '<name>' , 'Outbound application name' )
588+ . action ( async ( name ) => {
589+ handleSdkRes ( await sdk . management . outboundApplication . createApplication ( { name } ) ) ;
590+ } ) ;
591+
592+ // outbound-application-update
593+ program
594+ . command ( 'outbound-application-update' )
595+ . description ( 'Update an outbound application' )
596+ . argument ( '<id>' , 'Outbound application ID' )
597+ . argument ( '<name>' , 'Outbound application name' )
598+ . action ( async ( id , name ) => {
599+ handleSdkRes ( await sdk . management . outboundApplication . updateApplication ( { id, name } ) ) ;
600+ } ) ;
601+
602+ // outbound-application-load
603+ program
604+ . command ( 'outbound-application-load' )
605+ . description ( 'Load outbound application by id' )
606+ . argument ( '<id>' , 'Outbound application ID' )
607+ . action ( async ( id ) => {
608+ handleSdkRes ( await sdk . management . outboundApplication . loadApplication ( id ) ) ;
609+ } ) ;
610+
611+ // outbound-application-load-all
612+ program
613+ . command ( 'outbound-application-load-all' )
614+ . description ( 'Load all outbound applications' )
615+ . action ( async ( ) => {
616+ handleSdkRes ( await sdk . management . outboundApplication . loadAllApplications ( ) ) ;
617+ } ) ;
618+
619+ // outbound-application-delete
620+ program
621+ . command ( 'outbound-application-delete' )
622+ . description ( 'Delete an outbound application' )
623+ . argument ( '<id>' , 'Outbound application ID' )
624+ . action ( async ( id ) => {
625+ handleSdkRes ( await sdk . management . outboundApplication . deleteApplication ( id ) ) ;
626+ } ) ;
627+
628+ // outbound-application-fetch-token
629+ program
630+ . command ( 'outbound-application-fetch-token' )
631+ . description ( 'Fetch token for an outbound application' )
632+ . argument ( '<app-id>' , 'Outbound application ID' )
633+ . argument ( '<user-id>' , 'User ID' )
634+ . action ( async ( appId , userId ) => {
635+ handleSdkRes ( await sdk . management . outboundApplication . fetchToken ( appId , userId ) ) ;
636+ } ) ;
637+
638+ // outbound-application-fetch-token-by-scopes
639+ program
640+ . command ( 'outbound-application-fetch-token-by-scopes' )
641+ . description ( 'Fetch token by scopes for an outbound application' )
642+ . argument ( '<app-id>' , 'Outbound application ID' )
643+ . argument ( '<user-id>' , 'User ID' )
644+ . argument ( '<scopes>' , 'Scopes to fetch token for' , ( val ) => val ?. split ( ',' ) )
645+ . action ( async ( appId , userId , scopes ) => {
646+ handleSdkRes (
647+ await sdk . management . outboundApplication . fetchTokenByScopes ( appId , userId , scopes ) ,
648+ ) ;
649+ } ) ;
650+
651+ // outbound-application-fetch-tenant-token
652+ program
653+ . command ( 'outbound-application-fetch-tenant-token' )
654+ . description ( 'Fetch token for an outbound application for a tenant' )
655+ . argument ( '<app-id>' , 'Outbound application ID' )
656+ . argument ( '<tenant-id>' , 'Tenant ID' )
657+ . action ( async ( appId , tenantId ) => {
658+ handleSdkRes ( await sdk . management . outboundApplication . fetchTenantToken ( appId , tenantId ) ) ;
659+ } ) ;
660+
661+ // outbound-application-fetch-tenant-token-by-scopes
662+ program
663+ . command ( 'outbound-application-fetch-tenant-token-by-scopes' )
664+ . description ( 'Fetch token by scopes for an outbound application for a tenant' )
665+ . argument ( '<app-id>' , 'Outbound application ID' )
666+ . argument ( '<tenant-id>' , 'Tenant ID' )
667+ . argument ( '<scopes>' , 'Scopes to fetch token for' , ( val ) => val ?. split ( ',' ) )
668+ . action ( async ( appId , tenantId , scopes ) => {
669+ handleSdkRes (
670+ await sdk . management . outboundApplication . fetchTenantTokenByScopes ( appId , tenantId , scopes ) ,
671+ ) ;
672+ } ) ;
673+
581674// *** SSO application commands ***
582675
583676// sso-application-create-oidc
0 commit comments