zmp-sdk 2.37.4 → 2.38.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zmp-sdk",
3
- "version": "2.37.4",
3
+ "version": "2.38.0-beta.0",
4
4
  "description": "Zalo Mini App SDK",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -1 +0,0 @@
1
- import t from'./../../external/@swc/helpers/src/_async_to_generator.mjs.js';import r,{object as i}from'./../../external/zod/lib/index.mjs.js';import{functionHandler as o}from"../../utils/decorator.js";import{__generator as n}from'./../../external/tslib/tslib.es6.js';var s=[i({id:r.string()})];function e(t){return d.apply(this,arguments)}function d(){return d=t((function(r){return n(this,(function(i){return[2,o("displayAds",s,[r],(e=t((function(t){return n(this,(function(r){return void 0!==window.AdtimaZMA&&window.AdtimaZMA.display(t.id),[2]}))})),function(t){return e.apply(this,arguments)}))];var e}))})),d.apply(this,arguments)}export{e as displayAds};
@@ -1 +0,0 @@
1
- import o from'./../../external/@swc/helpers/src/_async_to_generator.mjs.js';import t,{object as n}from'./../../external/zod/lib/index.mjs.js';import{functionHandler as i}from"../../utils/decorator.js";import{__generator as r}from'./../../external/tslib/tslib.es6.js';var s=[n({ids:t.array(t.string()),config:n({display:t.boolean().optional()}).optional()})];function e(o){return d.apply(this,arguments)}function d(){return d=o((function(t){return r(this,(function(n){return[2,i("loadAds",s,[t],(e=o((function(o){return r(this,(function(t){return void 0!==window.AdtimaZMA&&window.AdtimaZMA.load(o.ids,o.config),[2]}))})),function(o){return e.apply(this,arguments)}))];var e}))})),d.apply(this,arguments)}export{e as loadAds};
@@ -1 +0,0 @@
1
- import r from'./../../external/@swc/helpers/src/_async_to_generator.mjs.js';import t,{object as o}from'./../../external/zod/lib/index.mjs.js';import{functionHandler as n}from"../../utils/decorator.js";import{__generator as i}from'./../../external/tslib/tslib.es6.js';var s=[o({id:t.string()})];function e(r){return u.apply(this,arguments)}function u(){return u=r((function(t){return i(this,(function(o){return[2,n("refreshAds",s,[t],(e=r((function(r){return i(this,(function(t){return void 0!==window.AdtimaZMA&&window.AdtimaZMA.refresh(r.id),[2]}))})),function(r){return e.apply(this,arguments)}))];var e}))})),u.apply(this,arguments)}export{e as refreshAds};
@@ -1 +0,0 @@
1
- import t from'./../../external/@swc/helpers/src/_async_to_generator.mjs.js';import e from'./../../external/@swc/helpers/src/_to_consumable_array.mjs.js';import{functionHandler as o}from"../../utils/decorator.js";import{APP_ID as n}from"../../constants.js";import r from"../../common/apis/general/getAppInfo.js";import{__generator as s}from'./../../external/tslib/tslib.es6.js';function c(t){return u.apply(this,arguments)}function u(){return(u=t((function(c){return s(this,(function(u){return[2,o("setupAds",[],[c],t((function(){var t,o;return s(this,(function(s){switch(s.label){case 0:return[4,r()];case 1:return t=s.sent(),o=window.AdtimaZMA={config:{cateId:t.cateID,appId:n},queue:[],load:function(t){"string"==typeof t?o.queue.push(t):o.queue=e(o.queue).concat(e(t))}},[2,new Promise((function(t,e){var o=document.createElement("script");o.src="https://adtima-static.zascdn.me/resource/js/zma/sdk.js?q=".concat(Math.floor((new Date).getTime()/864e5)),o.onload=function(){t(null)},o.onerror=function(){e()},document.body.appendChild(o)}))]}}))})))]}))}))).apply(this,arguments)}export{c as setupAds};
@@ -1 +0,0 @@
1
- import t from'./../../external/@swc/helpers/src/_async_to_generator.mjs.js';import r,{object as n}from'./../../external/zod/lib/index.mjs.js';import{functionHandler as o}from"../../utils/decorator.js";import i from"../../common/apis/general/adtimaAd.js";import{__generator as s}from'./../../external/tslib/tslib.es6.js';var e=[n({id:r.string()})];function m(t){return u.apply(this,arguments)}function u(){return u=t((function(r){return s(this,(function(n){return[2,o("displayAd",e,[r],(m=t((function(t){return s(this,(function(r){return i.getInstance().display(t.id),[2]}))})),function(t){return m.apply(this,arguments)}))];var m}))})),u.apply(this,arguments)}export{m as displayAd};
@@ -1 +0,0 @@
1
- export{setupAd}from"./setup.js";export{loadAd}from"./load.js";export{displayAd}from"./display.js";export{refreshAd}from"./refresh.js";
@@ -1 +0,0 @@
1
- import o from'./../../external/@swc/helpers/src/_async_to_generator.mjs.js';import n,{object as t}from'./../../external/zod/lib/index.mjs.js';import{functionHandler as r}from"../../utils/decorator.js";import i from"../../common/apis/general/adtimaAd.js";import{__generator as s}from'./../../external/tslib/tslib.es6.js';var e=[t({ids:n.union([n.string(),n.array(n.string())]),config:t({display:n.boolean().optional()}).optional()})];function a(o){return u.apply(this,arguments)}function u(){return u=o((function(n){return s(this,(function(t){return[2,r("loadAd",e,[n],(a=o((function(o){return s(this,(function(n){return i.getInstance().load(o.ids,o.config),[2]}))})),function(o){return a.apply(this,arguments)}))];var a}))})),u.apply(this,arguments)}export{a as loadAd};
@@ -1 +0,0 @@
1
- import r from'./../../external/@swc/helpers/src/_async_to_generator.mjs.js';import t,{object as o}from'./../../external/zod/lib/index.mjs.js';import{functionHandler as n}from"../../utils/decorator.js";import e from"../../common/apis/general/adtimaAd.js";import{__generator as s}from'./../../external/tslib/tslib.es6.js';var i=[o({id:t.string().optional()})];function m(r){return u.apply(this,arguments)}function u(){return u=r((function(t){return s(this,(function(o){return[2,n("refreshAd",i,[t],(m=r((function(r){return s(this,(function(t){return e.getInstance().refresh(r.id),[2]}))})),function(r){return m.apply(this,arguments)}))];var m}))})),u.apply(this,arguments)}export{m as refreshAd};
@@ -1 +0,0 @@
1
- import t from'./../../external/@swc/helpers/src/_async_to_generator.mjs.js';import{functionHandler as r}from"../../utils/decorator.js";import o from"../../common/apis/general/adtimaAd.js";import{__generator as n}from'./../../external/tslib/tslib.es6.js';function e(t){return s.apply(this,arguments)}function s(){return(s=t((function(t){return n(this,(function(n){return[2,r("setupAd",[],[t],(function(){return o.getInstance().loadSDK()}))]}))}))).apply(this,arguments)}export{e as setupAd};
@@ -1 +0,0 @@
1
- import r from'./../external/@swc/helpers/src/_async_to_generator.mjs.js';import o,{object as e}from'./../external/zod/lib/index.mjs.js';import t from"../appEnv/index.js";import n from"../common/notFound.js";import{functionHandler as s}from"../utils/decorator.js";import i from"../common/apis/general/saveFile.js";import{__generator as m}from'./../external/tslib/tslib.es6.js';var u=[e({url:o.string()}).optional()];function l(r){return a.apply(this,arguments)}function a(){return a=r((function(o){return m(this,(function(e){return[2,s("downloadFile",u,[o],(l=r((function(r){var o;return m(this,(function(e){switch(e.label){case 0:return t.isMp?(o=r.url,[4,i(o)]):[3,2];case 1:return[2,e.sent()];case 2:return t.isMpWeb?[2,Promise.resolve()]:[2,Promise.reject(n("saveFile",{}))]}}))})),function(r){return l.apply(this,arguments)}))];var l}))})),a.apply(this,arguments)}export{l as downloadFile};
@@ -1 +0,0 @@
1
- import e from'./../external/@swc/helpers/src/_async_to_generator.mjs.js';import t,{object as n,string as r}from'./../external/zod/lib/index.mjs.js';import o from"../appEnv/index.js";import s from"../common/notFound.js";import{functionHandler as a}from"../utils/decorator.js";import{__generator as c}from'./../external/tslib/tslib.es6.js';var i=[n({resource:r(),options:t.any().optional()})];function u(e){return p.apply(this,arguments)}function p(){return p=e((function(t){return c(this,(function(n){return[2,a("fetch",i,[t],(r=e((function(t){var n,r,a,i;return c(this,(function(u){switch(u.label){case 0:return n=t.resource,r=t.options,o.isMp?window.Worker?(a=new Worker(URL.createObjectURL(new Blob(["\n self.onmessage = function (event) {\n const { url, options } = event.data;\n \n // Call the wrapped fetch function to perform the actual fetch\n fetch(url, options)\n .then((response) => response.json())\n .then((data) => {\n // Send the result back to the main thread\n self.postMessage({ data });\n })\n .catch((error) => {\n // Send the error back to the main thread\n self.postMessage({ error: error.message });\n });\n };\n \n "],{type:"text/javascript"}))),i=function(t){return n=e((function(e){var n;return c(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,t(e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.error("Error while fetching:",n),n;case 3:return[2]}}))})),function(e){return n.apply(this,arguments)};var n}(a.postMessage.bind(a)),[4,i({url:n,options:r})]):[3,2]:[3,4];case 1:case 3:case 5:return[2,u.sent()];case 2:return[4,window.fetch(n,r)];case 4:return o.isMpWeb?[4,window.fetch(n,r)]:[3,6];case 6:return[2,Promise.reject(s("fetch",{}))]}}))})),function(e){return r.apply(this,arguments)}))];var r}))})),p.apply(this,arguments)}export{u as fetch};
@@ -1 +0,0 @@
1
- import e from'./../external/@swc/helpers/src/_async_to_generator.mjs.js';import t,{object as o}from'./../external/zod/lib/index.mjs.js';import r from"../appEnv/index.js";import i from"../common/notFound.js";import{functionHandler as n}from"../utils/decorator.js";import s from"../common/apis/general/getFileInfo.js";import{__generator as m}from'./../external/tslib/tslib.es6.js';var p=[o({file_path:t.string(),digest_algorithm:t.enum(["sha1","md5"])}).optional()];function l(e){return a.apply(this,arguments)}function a(){return a=e((function(t){return m(this,(function(o){return[2,n("getFileInfo",p,[t],(l=e((function(e){return m(this,(function(t){switch(t.label){case 0:return r.isMp?[4,s(e.file_path,e.digest_algorithm)]:[3,2];case 1:return[2,t.sent()];case 2:return r.isMpWeb?[2,Promise.resolve({size:"",digest:"",type:""})]:[2,Promise.reject(i("getFileInfo",{}))]}}))})),function(e){return l.apply(this,arguments)}))];var l}))})),a.apply(this,arguments)}export{l as getFileInfo};
@@ -1 +0,0 @@
1
- import e from'./../external/@swc/helpers/src/_async_to_generator.mjs.js';import t from"../appEnv/index.js";import r from"../common/notFound.js";import{functionHandler as o}from"../utils/decorator.js";import s from"../common/apis/general/getSavedFileList.js";import{__generator as n}from'./../external/tslib/tslib.es6.js';function i(e){return m.apply(this,arguments)}function m(){return m=e((function(i){return n(this,(function(m){return[2,o("getSavedFileList",[],[i],(u=e((function(e){return n(this,(function(e){switch(e.label){case 0:return t.isMp?[4,s()]:[3,2];case 1:return[2,e.sent()];case 2:return t.isMpWeb?[2,Promise.resolve()]:[2,Promise.reject(r("getSavedFileList",{}))]}}))})),function(e){return u.apply(this,arguments)}))];var u}))})),m.apply(this,arguments)}export{i as getSavedFileList};
@@ -1 +0,0 @@
1
- export{login}from"./login.js";export{getAccessToken}from"./getAccessToken.js";export{getVersion}from"./getVersion.js";export{getSystemInfo}from"./getSystemInfo.js";export{setNavigationBarTitle}from"./setNavigationBarTitle.js";export{setNavigationBarColor}from"./setNavigationBarColor.js";export{setNavigationBarLeftButton}from"./setNavigationBarLeftButton.js";export{setStorage}from"./setStorage.js";export{getStorage}from"./getStorage.js";export{getStorageInfo}from"./getStorageInfo.js";export{removeStorage}from"./removeStorage.js";export{clearStorage}from"./clearStorage.js";export{getUserInfo}from"./getUserInfo.js";export{getNetworkType}from"./getNetworkType.js";export{onNetworkStatusChange}from"./onNetworkStatusChange.js";export{startBeaconDiscovery}from"./startBeaconDiscovery.js";export{stopBeaconDiscovery}from"./stopBeaconDiscovery.js";export{getBeacons}from"./getBeacons.js";export{closeApp}from"./closeApp.js";export{scanQRCode}from"./scanQRCode.js";export{openProfile}from"./openProfile.js";export{openChat}from"./openChat.js";export{openPostFeed}from"./openPostFeed.js";export{followOA}from"./followOA.js";export{unfollowOA}from"./unfollowOA.js";export{openShareSheet}from"./openShareSheet.js";export{requestCameraPermission}from"./requestCameraPermission.js";export{createShortcut}from"./createShortcut.js";export{openBioAuthentication}from"./openBioAuthentication.js";export{checkStateBioAuthentication}from"./checkStateBioAuthentication.js";export{showToast}from"./showToast.js";export{hideKeyboard}from"./hideKeyboard.js";export{openPhone}from"./openPhone.js";export{openSMS}from"./openSMS.js";export{viewOAQr}from"./viewOAQr.js";export{keepScreen}from"./keepScreen.js";export{onKeepScreen}from"./onKeepScreen.js";export{offKeepScreen}from"./offKeepScreen.js";export{saveImageToGallery}from"./saveImageToGallery.js";export{openMiniApp}from"./openMiniApp.js";export{vibrate}from"./vibrate.js";export{openWebview}from"./openWebview.js";export{getRouteParams}from"./getRouteParams.js";export{getAppInfo}from"./getAppInfo.js";export{sendDataToPreviousMiniApp}from"./sendDataToPreviousMiniApp.js";export{getPhoneNumber}from"./getPhoneNumber.js";export{openProfilePicker}from"./openProfilePicker.js";export{connectWifi}from"./connectWifi.js";export{openMediaPicker}from"./openMediaPicker.js";export{getShareableLink}from"./getShareableLink.js";export{closeLoading}from"./closeLoading.js";export{requestUpdateZalo}from"./requestUpdateZalo.js";export{onConfirmToExit}from"./onConfirmToExit.js";export{offConfirmToExit}from"./offConfirmToExit.js";export{getDeviceId}from"./getDeviceId.js";export{getDeviceIdAsync}from"./getDeviceIdAsync.js";export{getContext}from"./getContext.js";export{getContextAsync}from"./getContextAsync.js";export{getAuthCode}from"./getAuthCode.js";export{getZPIToken}from"./getZPIToken.js";export{setAccessToken}from"./setAccessToken.js";export{openOutApp}from"./openOutApp.js";export{chooseImage}from"./chooseImage.js";export{getLocation}from"./getLocation.js";export{onCallbackData}from"./onCallbackData.js";export{createOrder}from"./createOrder.js";export{checkTransaction}from"./checkTransaction.js";export{events}from"./events.js";export{setAndroidBottomNavigationBar}from"./setAndroidBottomNavigationBar.js";export{setIOSBottomSafeArea}from"./setIOSBottomSafeArea.js";export{setStatusBar}from"./setStatusBar.js";export{configAppView}from"./configAppView.js";export{createOrderIAP}from"./createOrderIAP.js";export{minimizeApp}from"./minimizeApp.js";export{openPermissionSetting}from"./openPermissionSetting.js";export{favoriteApp}from"./favoriteApp.js";export{openGroupList}from"./openGroupList.js";export{requestSendNotification}from"./requestSendNotification.js";export{addRating}from"./addRating.js";export{interactOA,interactOA as interactOa}from"./interactOA.js";export{checkIsAllowedInteractWithOA as isAllowedInteractWithOA}from"./checkIsAllowedInteractWithOA.js";
@@ -1 +0,0 @@
1
- import e from'./../external/@swc/helpers/src/_async_to_generator.mjs.js';import r,{object as o}from'./../external/zod/lib/index.mjs.js';import t from"../appEnv/index.js";import n from"../common/notFound.js";import{functionHandler as i}from"../utils/decorator.js";import s from"../common/apis/general/removeSavedFile.js";import{__generator as m}from'./../external/tslib/tslib.es6.js';var p=[o({file_path:r.string()}).optional()];function a(e){return l.apply(this,arguments)}function l(){return l=e((function(r){return m(this,(function(o){return[2,i("removeSavedFile",p,[r],(a=e((function(e){return m(this,(function(r){switch(r.label){case 0:return t.isMp?[4,s(e.file_path)]:[3,2];case 1:return[2,r.sent()];case 2:return t.isMpWeb?[2,Promise.resolve()]:[2,Promise.reject(n("removeSavedFile",{}))]}}))})),function(e){return a.apply(this,arguments)}))];var a}))})),l.apply(this,arguments)}export{a as removeSavedFile};
@@ -1 +0,0 @@
1
- import r from'./../external/@swc/helpers/src/_async_to_generator.mjs.js';import e,{object as o}from'./../external/zod/lib/index.mjs.js';import t from"../appEnv/index.js";import s from"../common/notFound.js";import{functionHandler as n}from"../utils/decorator.js";import i from"../common/apis/general/lfsSaveFile.js";import{__generator as m}from'./../external/tslib/tslib.es6.js';var a=[o({file_path:e.string()}).optional()];function p(r){return l.apply(this,arguments)}function l(){return l=r((function(e){return m(this,(function(o){return[2,n("saveFile",a,[e],(p=r((function(r){var e;return m(this,(function(o){switch(o.label){case 0:return t.isMp?(e=r.file_path,[4,i(e)]):[3,2];case 1:return[2,o.sent()];case 2:return t.isMpWeb?[2,Promise.resolve()]:[2,Promise.reject(s("saveFile",{}))]}}))})),function(r){return p.apply(this,arguments)}))];var p}))})),l.apply(this,arguments)}export{p as saveFile};
@@ -1 +0,0 @@
1
- import t from'./../../../external/@swc/helpers/src/_async_to_generator.mjs.js';import n from"../../call/index.js";import{__generator as o}from'./../../../external/tslib/tslib.es6.js';var s,e=(s=t((function(t,s){return o(this,(function(o){return[2,new Promise((function(o,e){n("LFS_FILE_INFO",{file_path:t,digest_algorithm:s},{success:function(t){o(t)},fail:function(t){e(t)}},{})}))]}))})),function(t,n){return s.apply(this,arguments)});export{e as default};
@@ -1 +0,0 @@
1
- import o from'./../../../external/@swc/helpers/src/_async_to_generator.mjs.js';import s from"../../call/index.js";import{__generator as n}from'./../../../external/tslib/tslib.es6.js';var e=o((function(){return n(this,(function(o){return[2,new Promise((function(o,n){s("LFS_LIST",{},{success:function(s){o(s)},fail:function(o){n(o)}},{})}))]}))}));export{e as default};
@@ -1 +0,0 @@
1
- import t from'./../../../external/@swc/helpers/src/_async_to_generator.mjs.js';import n from"../../call/index.js";import{__generator as s}from'./../../../external/tslib/tslib.es6.js';var e,o=(e=t((function(t){return s(this,(function(s){return[2,new Promise((function(s,e){n("LFS_FILE_SAVE",{file_path:t},{success:function(t){s({saved_path:t})},fail:function(t){e(t)}},{})}))]}))})),function(t){return e.apply(this,arguments)});export{o as default};
@@ -1 +0,0 @@
1
- import n from'./../../../external/@swc/helpers/src/_async_to_generator.mjs.js';import t from"../../call/index.js";import{__generator as o}from'./../../../external/tslib/tslib.es6.js';var s,e=(s=n((function(n){return o(this,(function(o){return[2,new Promise((function(o,s){t("LFS_FILE_REMOVE",{file_path:n},{success:function(n){o(n)},fail:function(n){s(n)}},{})}))]}))})),function(n){return s.apply(this,arguments)});export{e as default};
@@ -1 +0,0 @@
1
- import n from'./../../../external/@swc/helpers/src/_async_to_generator.mjs.js';import s from"../../call/index.js";import{__generator as t}from'./../../../external/tslib/tslib.es6.js';var e,o=(e=n((function(n){return t(this,(function(t){return[2,new Promise((function(t,e){s("SAVE_FILE",{fileUrl:n},{success:function(n){t({saved_path:n})},fail:function(n){e(n)}},{})}))]}))})),function(n){return e.apply(this,arguments)});export{o as default};
Binary file