@@ -166,13 +166,19 @@ type AgentAuthInvocationResponse struct {
166166 //
167167 // Any of "IN_PROGRESS", "SUCCESS", "EXPIRED", "CANCELED".
168168 Status AgentAuthInvocationResponseStatus `json:"status,required"`
169+ // Current step in the invocation workflow
170+ //
171+ // Any of "initialized", "discovering", "awaiting_input", "submitting",
172+ // "completed", "expired".
173+ Step AgentAuthInvocationResponseStep `json:"step,required"`
169174 // Target domain for authentication
170175 TargetDomain string `json:"target_domain,required"`
171176 // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
172177 JSON struct {
173178 AppName respjson.Field
174179 ExpiresAt respjson.Field
175180 Status respjson.Field
181+ Step respjson.Field
176182 TargetDomain respjson.Field
177183 ExtraFields map [string ]respjson.Field
178184 raw string
@@ -195,6 +201,18 @@ const (
195201 AgentAuthInvocationResponseStatusCanceled AgentAuthInvocationResponseStatus = "CANCELED"
196202)
197203
204+ // Current step in the invocation workflow
205+ type AgentAuthInvocationResponseStep string
206+
207+ const (
208+ AgentAuthInvocationResponseStepInitialized AgentAuthInvocationResponseStep = "initialized"
209+ AgentAuthInvocationResponseStepDiscovering AgentAuthInvocationResponseStep = "discovering"
210+ AgentAuthInvocationResponseStepAwaitingInput AgentAuthInvocationResponseStep = "awaiting_input"
211+ AgentAuthInvocationResponseStepSubmitting AgentAuthInvocationResponseStep = "submitting"
212+ AgentAuthInvocationResponseStepCompleted AgentAuthInvocationResponseStep = "completed"
213+ AgentAuthInvocationResponseStepExpired AgentAuthInvocationResponseStep = "expired"
214+ )
215+
198216// Response from submit endpoint matching SubmitResult schema
199217type AgentAuthSubmitResponse struct {
200218 // Whether submission succeeded
@@ -359,7 +377,7 @@ func (r *AuthAgentInvocationCreateRequestParam) UnmarshalJSON(data []byte) error
359377//
360378// Use the methods beginning with 'As' to cast the union to one of its variants.
361379type AuthAgentInvocationCreateResponseUnion struct {
362- // Any of "already_authenticated ", "invocation_created ".
380+ // Any of "ALREADY_AUTHENTICATED ", "INVOCATION_CREATED ".
363381 Status string `json:"status"`
364382 // This field is from variant [AuthAgentInvocationCreateResponseInvocationCreated].
365383 ExpiresAt time.Time `json:"expires_at"`
@@ -401,9 +419,9 @@ func (AuthAgentInvocationCreateResponseInvocationCreated) implAuthAgentInvocatio
401419// }
402420func (u AuthAgentInvocationCreateResponseUnion ) AsAny () anyAuthAgentInvocationCreateResponse {
403421 switch u .Status {
404- case "already_authenticated " :
422+ case "ALREADY_AUTHENTICATED " :
405423 return u .AsAlreadyAuthenticated ()
406- case "invocation_created " :
424+ case "INVOCATION_CREATED " :
407425 return u .AsInvocationCreated ()
408426 }
409427 return nil
@@ -526,7 +544,7 @@ const (
526544type ReauthResponse struct {
527545 // Result of the re-authentication attempt
528546 //
529- // Any of "reauth_started ", "already_authenticated ", "cannot_reauth ".
547+ // Any of "REAUTH_STARTED ", "ALREADY_AUTHENTICATED ", "CANNOT_REAUTH ".
530548 Status ReauthResponseStatus `json:"status,required"`
531549 // ID of the re-auth invocation if one was created
532550 InvocationID string `json:"invocation_id"`
@@ -552,9 +570,9 @@ func (r *ReauthResponse) UnmarshalJSON(data []byte) error {
552570type ReauthResponseStatus string
553571
554572const (
555- ReauthResponseStatusReauthStarted ReauthResponseStatus = "reauth_started "
556- ReauthResponseStatusAlreadyAuthenticated ReauthResponseStatus = "already_authenticated "
557- ReauthResponseStatusCannotReauth ReauthResponseStatus = "cannot_reauth "
573+ ReauthResponseStatusReauthStarted ReauthResponseStatus = "REAUTH_STARTED "
574+ ReauthResponseStatusAlreadyAuthenticated ReauthResponseStatus = "ALREADY_AUTHENTICATED "
575+ ReauthResponseStatusCannotReauth ReauthResponseStatus = "CANNOT_REAUTH "
558576)
559577
560578type AgentAuthNewParams struct {
0 commit comments