@@ -301,6 +301,15 @@ export type RecoveryCodesError = PutioOperationFailure<typeof RecoveryCodesError
301301export type RegenerateRecoveryCodesError = PutioOperationFailure <
302302 typeof RegenerateRecoveryCodesErrorSpec
303303> ;
304+ export type LoginInput = {
305+ readonly clientId : string | number ;
306+ readonly clientSecret : string ;
307+ readonly password : string ;
308+ readonly username : string ;
309+ readonly callbackUrl ?: string ;
310+ readonly clientName ?: string ;
311+ readonly fingerprint ?: string ;
312+ } ;
304313export const buildAuthLoginUrl = ( options : {
305314 readonly clientId : string | number ;
306315 readonly redirectUri : string ;
@@ -317,14 +326,9 @@ export const buildAuthLoginUrl = (options: {
317326 response_type : options . responseType ?? "token" ,
318327 state : options . state ,
319328 } ) ;
320- export const login = ( input : {
321- readonly clientId : string | number ;
322- readonly clientSecret : string ;
323- readonly password : string ;
324- readonly username : string ;
325- readonly clientName ?: string ;
326- readonly fingerprint ?: string ;
327- } ) : Effect . Effect < LoginResponse , LoginError , PutioSdkContext > =>
329+ export const login = (
330+ input : LoginInput ,
331+ ) : Effect . Effect < LoginResponse , LoginError , PutioSdkContext > =>
328332 requestJson ( LoginResponseSchema , {
329333 auth : {
330334 type : "basic" ,
@@ -336,6 +340,7 @@ export const login = (input: {
336340 ? `/v2/oauth2/authorizations/clients/${ encodePathSegment ( input . clientId ) } /${ encodePathSegment ( input . fingerprint ) } `
337341 : `/v2/oauth2/authorizations/clients/${ encodePathSegment ( input . clientId ) } ` ,
338342 query : {
343+ callback_url : input . callbackUrl ,
339344 client_name : input . clientName ,
340345 client_secret : input . clientSecret ,
341346 } ,
0 commit comments