HEX
Server: LiteSpeed
System: Linux neo.webimonline.com 5.14.0-687.12.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Jun 7 14:39:27 EDT 2026 x86_64
User: smarimaki (1290)
PHP: 7.4.33
Disabled: mail
Upload Files
File: /home/smarimaki/public_html/wp-content/plugins/leadin/scripts/utils/contentEmbedInstaller.ts
type ContentEmbedInfoResponse = {
  success: boolean;
  data?: {
    // Empty if user doesn't have permissions or plugin already activated
    activateAjaxUrl?: string;
    message: string;
  };
};

export function startInstall(nonce: string) {
  const formData = new FormData();
  const ajaxUrl = (window as any).ajaxurl;
  formData.append('_wpnonce', nonce);
  formData.append('action', 'content_embed_install');
  return fetch(ajaxUrl, {
    method: 'POST',
    body: formData,
    keepalive: true,
  }).then<ContentEmbedInfoResponse>(res => res.json());
}

export function startActivation(requestUrl: string) {
  return fetch(requestUrl, {
    method: 'POST',
    keepalive: true,
  }).then<ContentEmbedInfoResponse>(res => res.json());
}