chromium/out/Default/gen/chrome/common/extensions/api/identity.h

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// GENERATED FROM THE API DEFINITION IN
//   chrome/common/extensions/api/identity.idl
// by tools/json_schema_compiler.
// DO NOT EDIT.

#ifndef CHROME_COMMON_EXTENSIONS_API_IDENTITY_H__
#define CHROME_COMMON_EXTENSIONS_API_IDENTITY_H__

#include <stdint.h>

#include <map>
#include <memory>
#include <optional>
#include <string>
#include <vector>

#include "base/values.h"
#include <string_view>


namespace extensions {
namespace api {
namespace identity {

//
// Types
//

struct AccountInfo {};

enum class AccountStatus {};


const char* ToString(AccountStatus as_enum);
AccountStatus ParseAccountStatus(std::string_view as_string);
std::u16string GetAccountStatusParseError(std::string_view as_string);

struct ProfileDetails {};

struct ProfileUserInfo {};

struct TokenDetails {};

struct InvalidTokenDetails {};

struct WebAuthFlowDetails {};

struct GetAuthTokenResult {};


//
// Functions
//

namespace GetAccounts {

namespace Results {

base::Value::List Create(const std::vector<AccountInfo>& accounts);
}  // namespace Results

}  // namespace GetAccounts

namespace GetAuthToken {

struct Params {};

namespace Results {

base::Value::List Create(const GetAuthTokenResult& result);
}  // namespace Results

}  // namespace GetAuthToken

namespace GetProfileUserInfo {

struct Params {};

namespace Results {

base::Value::List Create(const ProfileUserInfo& user_info);
}  // namespace Results

}  // namespace GetProfileUserInfo

namespace RemoveCachedAuthToken {

struct Params {};

namespace Results {

base::Value::List Create();
}  // namespace Results

}  // namespace RemoveCachedAuthToken

namespace ClearAllCachedAuthTokens {

namespace Results {

base::Value::List Create();
}  // namespace Results

}  // namespace ClearAllCachedAuthTokens

namespace LaunchWebAuthFlow {

struct Params {};

namespace Results {

base::Value::List Create(const std::string& response_url);
}  // namespace Results

}  // namespace LaunchWebAuthFlow

//
// Events
//

namespace OnSignInChanged {

extern const char kEventName[];  // "identity.onSignInChanged"

base::Value::List Create(const AccountInfo& account, bool signed_in);
}  // namespace OnSignInChanged

}  // namespace identity
}  // namespace api
}  // namespace extensions

#endif  // CHROME_COMMON_EXTENSIONS_API_IDENTITY_H__