apx=apx|| {}
apx.testapi={}
apx.testapi.runtest = async () => {
    apx.testapi.updatepersonbio();
    //apx.testapi.testupdatskills()
    //apx.testapi.testseekeronboardingmatching("aams");
    /*  const jobstepstodo = await axios.put(
      `/api/smatchit/jobads/jobstepstodo/bhavesh_78731a7e-61a5-489c-8b3b-2cddcf13f127_1`,
     {"state":"booked","slottime":{"date":"2024-10-23","start":"15:30","numberofslot":1}} ,
      { headers: apx.data.headers }
    );
    console.log(jobstepstodo);
    */
  };
    apx.testapi.testseekeronboardingmatching = async (seeker) => {
    await axios
      .get(`/api/smatchit/seekers/onboarding/${seeker}`, {
        headers: apx.data.headers,
      })
      .then((rep) => {
        //alert("success, check console");
        console.log(rep);
      })
      .catch((err) => {
        //alert("err, check console");
        console.log(err);
      });
  };
  apx.testapi.testupdatskills = async () => {
    const data = {
      alias: "philc3",
      owner: "philc3",
      dt_create: "2024-12-10T09:45:49.901Z",
      email: "phc@ndda.fr",
      seekstatus: "startasap",
      seekworkingyear: "1to3",
      seekjobtitleexperience: ["vente1n1"],
      seeklocation: [
        {
          type: "street",
          housenumber: "",
          street: "Igny",
          name: "Igny",
          label: "Igny 18200 La Perche",
          postcode: "18200",
          citycode: "18178",
          city: "La Perche",
          zoning: 3,
          position: {
            longitude: 2.585915,
            latitude: 46.638536,
          },
          context: "18, Cher, Centre-Val de Loire",
        },
      ],
      salaryexpectation: 11111,
      salarydevise: "€",
      salaryunit: "peryear",
      seekjobtype: [],
      mbti: {
        E: 1,
        S: 2,
        T: 1,
        J: 1,
        nextq: 4,
        value: "INFP",
      },
      countryavailabletowork: [],
      lastlocation: {},
      tipsadvice: [
        "f46b2d7e-e242-421f-802b-d8d4d02ab123",
        "f46b2d7e-e242-421f-802b-d8d4d02ab124",
      ],
      mywords: ["Réfléchi(e)", "Visionnaire", "Empathique", "Flexible"],
      myworkexperience: [],
      lookingforaction: [
        "À la recherche d'une opportunité professionnelle dans :",
      ],
      lookingforother: ["vente"],
      myjobradar: ["vente1n1"],
      skills: {
        promoteoffer: 4,
        orientclient: 2,
        qualitycontrol: 2,
        manageadm: 2,
        doinvoice: 2,
        followsells: 2,
        makereservation: 2,
      },
      languageskills: {
        french: 4,
        english: 2,
      },
      knowhow: {},
      jobadview: [],
      jobadapply: [],
      jobadinvitedtoapply: [],
      jobadsaved: [],
      jobadofferaccepted: [],
      jobadprocessstopseeker: [],
      jobadprocessstoprecruiter: [],
      jobadnotinterested: [],
      jobadmatchscore: [
        {
          jobadid: "0f7a4468-7d35-47a8-acc0-39b30220b67b",
          score: 25,
          newmatch: true,
          aboutyou: "",
          criteria: ["Salaire", "Localisation"],
          whyworkhere:
            "Aie un impact tous les jours\nPar nos actions, nous aidons nos clients à avoir un impact sur la société. Venez nous rejoindre pour faire partie de cette aventure !",
          distanceseekerjob: 247.2,
          currentlyinprocess: false,
        },
        {
          jobadid: "98ec1cd8-ea53-4509-a3dc-3fabfe9134d9",
          score: 20,
          newmatch: true,
          aboutyou: "",
          criteria: ["Salaire", "Localisation"],
          whyworkhere: "",
          distanceseekerjob: 246.9,
          currentlyinprocess: false,
        },
        {
          jobadid: "5c77eed3-5fe5-4a0e-84cb-b2f5672298d1",
          score: 16,
          newmatch: true,
          aboutyou: "Describe here your ideal candidate for this job",
          criteria: ["Salaire", "Localisation"],
          whyworkhere: "",
          distanceseekerjob: 486.7,
          currentlyinprocess: false,
        },
        {
          jobadid: "cc23a1a9-be59-4589-8c7f-916eb41413c8",
          score: 12,
          newmatch: true,
          aboutyou: "Description du candidat idéal pour ce poste",
          criteria: [
            "Salaire",
            "Localisation",
            "La mission est adaptée pour vous",
          ],
          whyworkhere: "",
          distanceseekerjob: 254.1,
          currentlyinprocess: false,
        },
        {
          jobadid: "b8af608c-0199-4814-af42-084fd0d5715f",
          score: 12,
          newmatch: true,
          aboutyou: "",
          criteria: [
            "Salaire",
            "Localisation",
            "La mission est adaptée pour vous",
          ],
          whyworkhere: "",
          distanceseekerjob: 395.5,
          currentlyinprocess: false,
        },
      ],
      jobstepstodo: [],
      jobstepsdone: [],
      educations: [],
      recommandation: [],
      employmentstatus: "employed",
    };
    await axios
      .put("/api/apxtri/odmdb/itm/smatchit/seekers", data, {
        headers: apx.data.headers,
      })
      .then((rep) => {
        console.log(rep);
      })
      .catch((err) => {
        console.log(err);
      });
  };
  apx.testapi.updatepersonbio = async () => {
    const data = { alias: "philc3", biography: "Lorem ipsum ...." };
    await axios
      .put("/api/apxtri/odmdb/itm/smatchit/persons", data, {
        headers: apx.data.headers,
      })
      .then((rep) => {
        console.log(rep);
      })
      .catch((err) => {
        console.log(err);
      });
  };
  
  
  