@@ -232,3 +232,94 @@ type ValidateChallengeResponse struct {
232232 IdempotencyKey string `json:"idempotencyKey,omitempty"`
233233 VerificationMethod string `json:"verificationMethod,omitempty"`
234234}
235+
236+ type ChallengeRequest struct {
237+ VerificationMethod string `json:"verificationMethod"`
238+ Action string `json:"action"`
239+ Email string `json:"email,omitempty"`
240+ PhoneNumber string `json:"phoneNumber,omitempty"`
241+ SmsChannel string `json:"smsChannel,omitempty"`
242+ }
243+
244+ type ChallengeResponse struct {
245+ ChallengeId string `json:"challengeId"`
246+ }
247+
248+ type VerifyRequest struct {
249+ ChallengeId string `json:"challengeId"`
250+ VerificationCode string `json:"verificationCode"`
251+ }
252+
253+ type VerifyResponse struct {
254+ IsVerified bool `json:"isVerified"`
255+ Email string `json:"email,omitempty"`
256+ PhoneNumber string `json:"phoneNumber,omitempty"`
257+ VerificationMethod string `json:"verificationMethod,omitempty"`
258+ }
259+
260+ type ClaimChallengeRequest struct {
261+ ChallengeId string `json:"challengeId"`
262+ UserId string `json:"userId"`
263+ }
264+
265+ type ClaimChallengeResponse struct {
266+ Token string `json:"token"`
267+ VerificationMethod string `json:"verificationMethod"`
268+ }
269+
270+ type GetChallengeRequest struct {
271+ ChallengeId string `json:"challengeId,omitempty"`
272+ UserId string `json:"userId,omitempty"`
273+ Action string `json:"action,omitempty"`
274+ VerificationMethod string `json:"verificationMethod,omitempty"`
275+ }
276+
277+ type GetChallengeResponse struct {
278+ ChallengeId string `json:"challengeId,omitempty"`
279+ ExpiresAt int64 `json:"expiresAt,omitempty"`
280+ VerificationMethod string `json:"verificationMethod,omitempty"`
281+ SmsChannel string `json:"smsChannel,omitempty"`
282+ PhoneNumber string `json:"phoneNumber,omitempty"`
283+ Email string `json:"email,omitempty"`
284+ Action string `json:"action,omitempty"`
285+ }
286+
287+ type CreateSessionRequest struct {
288+ ClientId string `json:"clientId"`
289+ Token string `json:"token"`
290+ }
291+
292+ type CreateSessionResponse struct {
293+ AccessToken string `json:"accessToken"`
294+ RefreshToken string `json:"refreshToken"`
295+ }
296+
297+ type ValidateSessionRequest struct {
298+ AccessToken string `json:"accessToken"`
299+ ClientIds []string `json:"clientIds,omitempty"`
300+ }
301+
302+ type ValidateSessionResponse struct {
303+ User struct {
304+ UserId string `json:"userId"`
305+ UserAttributes
306+ } `json:"user"`
307+ ExpiresAt int64 `json:"expiresAt"`
308+ }
309+
310+ type RefreshSessionRequest struct {
311+ RefreshToken string `json:"refreshToken"`
312+ }
313+
314+ type RefreshSessionResponse struct {
315+ AccessToken string `json:"accessToken"`
316+ RefreshToken string `json:"refreshToken"`
317+ }
318+
319+ type RevokeSessionRequest struct {
320+ AccessToken string `json:"accessToken"`
321+ }
322+
323+ type RevokeUserSessionsRequest struct {
324+ UserId string `json:"userId"`
325+ }
0 commit comments