api = XCRM_API::get_instance(); } /** * ثبت‌نام - مرحله ۱: ارسال OTP */ public function register_send_otp($data) { return $this->api->post('auth/register/send-otp/', $data); } /** * ثبت‌نام - مرحله ۲: تایید OTP */ public function register_confirm_otp($data) { return $this->api->post('auth/register/confirm-otp/', $data); } /** * لاگین - مرحله ۱: رمز عبور */ public function login($data) { return $this->api->post('auth/login/', $data); } /** * لاگین - مرحله ۲: تایید 2FA */ public function login_confirm_2fa($data) { return $this->api->post('auth/login/confirm-2fa/', $data); } /** * ساخت System API Key (WordPress) با JWT و Shared Secret */ public function create_api_key($jwt, $data) { return $this->api->request_with_jwt( 'POST', 'companies/api-keys/', $jwt, $data ); } /** * بررسی اعتبار API Key */ public function verify_api_key() { return $this->api->post('companies/api-keys/verify/', [], true); } }