import { BedrockPluginCore } from 'react-native-bedrock/config';

type PermissionReadWrite = 'read' | 'write';
type PermissionAccess = 'access';
type ClipboardPermission = {
    name: 'clipboard';
    access: PermissionReadWrite;
};
type GeolocationPermission = {
    name: 'geolocation';
    access: PermissionAccess;
};
type ContactsPermission = {
    name: 'contacts';
    access: PermissionReadWrite;
};
type PhotosPermission = {
    name: 'photos';
    access: PermissionReadWrite;
};
type CameraPermission = {
    name: 'camera';
    access: PermissionAccess;
};
type Permission = ClipboardPermission | GeolocationPermission | ContactsPermission | PhotosPermission | CameraPermission;
/**
 * OAuth 인증시 사용할 수 있는 Scope 값이에요.
 *
 * - `user_name`: 유저 이름이에요.
 * - `user_phone`: 유저 휴대폰 번호예요.
 * - `user_birthday`: 유저 생년월일이에요.
 * - `user_ci`: 유저를 식별하는 키인 CI(Connection Information) 값이에요.
 * - `user_gender`: 유저의 성별이에요.
 * - `user_nationality`: 유저의 국적이에요.
 * - `user_email`: 유저의 이메일이에요. 토스 회원의 email이 존재하지 않는 경우 null 응답을 반환해요.
 */
type OAuthScope = 'user_name' | 'user_phone' | 'user_birthday' | 'user_ci' | 'user_gender' | 'user_nationality' | 'user_email';
type AppManifest = {
    appName: string;
    permissions: Permission[];
    oauth: {
        scopes: OAuthScope[];
    };
};

interface AppsInTossPluginOptions {
    permissions: AppManifest['permissions'];
    oauth: AppManifest['oauth'];
}
declare function appsInToss(options: AppsInTossPluginOptions): (BedrockPluginCore | Promise<BedrockPluginCore>)[];

export { type AppManifest, type AppsInTossPluginOptions, type OAuthScope, type Permission, appsInToss };
