reefmobile-api
Version:
A wrapper around Free Mobile API.
1 lines • 2.92 kB
JavaScript
"use strict";var e,t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i={};((e,o)=>{for(var n in o)t(e,n,{get:o[n],enumerable:!0})})(i,{FetchInvoiceData:()=>h,FetchUnpaidInvoices:()=>l,LoginWithTrustedUuid:()=>a,LoginWithoutTrustedUuid:()=>s,VerifySMSCode:()=>u,fetchCompleteUserData:()=>p,fetchPeriodUsageDetails:()=>d,fetchPlanAndDiscountInfo:()=>b}),module.exports=(e=i,((e,i,c,s)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let a of n(i))r.call(e,a)||a===c||t(e,a,{get:()=>i[a],enumerable:!(s=o(i,a))||s.enumerable});return e})(t({},"__esModule",{value:!0}),e));var c="https://mobile.free.fr/account/v2/api/SI";function s(e,t){const o={password:t,login:e};return fetch(c+"/auth/customer/login",{method:"POST",headers:{"Content-Type":"application/json","User-Agent":"Production/36 CFNetwork/1559 Darwin/24.0.0",Accept:"*/*",servicelabel:"MobAuthLogin"},body:JSON.stringify(o)})}function a(e,t,o){const n={password:t,trustedUuid:o,login:e};return fetch(c+"/auth/customer/login",{method:"POST",headers:{"Content-Type":"application/json","User-Agent":"Production/36 CFNetwork/1559 Darwin/24.0.0",Accept:"*/*",servicelabel:"MobAuthLogin"},body:JSON.stringify(n)})}function u(e,t,o,n){console.log(c+"/auth/customer/otp/validate/"+e);const r={codeOtp:t,isTrusted:o};return fetch(c+"/auth/customer/otp/validate/"+e,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":"Production/36 CFNetwork/1559 Darwin/24.0.0",Accept:"*/*",servicelabel:"MobAuthLogin",cookie:"X_USER_TOKEN="+n,"x-user-token":n},body:JSON.stringify(r)})}function p(e,t){return fetch(c+"/subscriber/"+e,{method:"GET",headers:{"Content-Type":"application/json","User-Agent":"Production/36 CFNetwork/1559 Darwin/24.0.0",Accept:"*/*",servicelabel:"MobAuthLogin",cookie:"X_USER_TOKEN="+t,"x-user-token":t}})}function d(e,t){return fetch(c+"/subscriber/"+e+"/consumption",{method:"GET",headers:{"Content-Type":"application/json","User-Agent":"Production/36 CFNetwork/1559 Darwin/24.0.0",Accept:"*/*",servicelabel:"MobAuthLogin",cookie:"X_USER_TOKEN="+t,"x-user-token":t}})}function h(e,t){return fetch(c+"/invoice",{method:"GET",headers:{"Content-Type":"application/json","User-Agent":"Production/36 CFNetwork/1559 Darwin/24.0.0",Accept:"*/*",servicelabel:"MobAuthLogin",cookie:"X_USER_TOKEN="+t,"x-user-token":t}})}function l(e,t){return fetch(c+"/subscriber/"+e+"/unpaid",{method:"GET",headers:{"Content-Type":"application/json","User-Agent":"Production/36 CFNetwork/1559 Darwin/24.0.0",Accept:"*/*",servicelabel:"MobAuthLogin",cookie:"X_USER_TOKEN="+t,"x-user-token":t}})}function b(e,t){return fetch(c+"/subscriber/"+e+"/offer",{method:"GET",headers:{"Content-Type":"application/json","User-Agent":"Production/36 CFNetwork/1559 Darwin/24.0.0",Accept:"*/*",servicelabel:"MobAuthLogin",cookie:"X_USER_TOKEN="+t,"x-user-token":t}})}//# sourceMappingURL=index.js.map