zmp-sdk 2.49.4 → 2.50.0-beta.1
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/apis/apis/payment/index.js +1 -1
- package/apis/apis/payment/openPaymentLink.js +1 -0
- package/apis/common/apis/general/openWebview.js +1 -1
- package/apis/index.d.ts +29 -0
- package/apis/package.json.js +1 -1
- package/browser.min.js +2 -2
- package/index.d.ts +31 -0
- package/index.es.js +2 -2
- package/index.js +2 -2
- package/index.umd.js +3 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createOrder as r}from"./createOrder.js";import{checkTransaction as e}from"./checkTransaction.js";import{createOrderIAP as t}from"./createOrderIAP.js";import{selectPaymentMethod as o}from"./selectPaymentMethod.js";import{purchase as
|
|
1
|
+
import{createOrder as r}from"./createOrder.js";import{checkTransaction as e}from"./checkTransaction.js";import{createOrderIAP as t}from"./createOrderIAP.js";import{selectPaymentMethod as o}from"./selectPaymentMethod.js";import{openPaymentLink as m}from"./openPaymentLink.js";import{purchase as a}from"./purchase.js";var c={purchase:a,createOrder:r,checkTransaction:e,createOrderIAP:t,selectPaymentMethod:o,openPaymentLink:m},n=c;export{n as CheckoutSDK,c as Payment};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from'./../../external/@swc/helpers/src/_async_to_generator.mjs.js';import t,{object as e,string as n}from'./../../external/zod/lib/index.mjs.js';import r from"../../appEnv/index.js";import i from"../../common/notFound.js";import{functionHandler as s}from"../../utils/decorator.js";import m from"../../common/apis/general/openWebview.js";import{__generator as u}from'./../../external/tslib/tslib.es6.js';var a=[e({url:n(),config:e({style:t.enum(["bottomSheet","normal"]).default("bottomSheet").optional(),leftButton:t.enum(["back","none"]).default("back").optional()}).optional()})];function p(o){return l.apply(this,arguments)}function l(){return l=o((function(t){return u(this,(function(e){return[2,s("openPaymentLink",a,[t],(n=o((function(o){return u(this,(function(t){switch(t.label){case 0:return r.isMp?[4,m(o.url,o.config,11005)]:[3,2];case 1:return[2,t.sent()];case 2:return r.isMpWeb?[2,Promise.resolve()]:[2,Promise.reject(i("openPaymentLink",{}))]}}))})),function(o){return n.apply(this,arguments)}))];var n}))})),l.apply(this,arguments)}export{p as openPaymentLink};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from'./../../../external/@swc/helpers/src/_async_to_generator.mjs.js';import
|
|
1
|
+
import t from'./../../../external/@swc/helpers/src/_async_to_generator.mjs.js';import e from"../../call/index.js";import{camelToSnakeCase as s}from"../../utils.js";import o from"../../../utils/lodash.js";import{__generator as n}from'./../../../external/tslib/tslib.es6.js';var r,l=(r=t((function(t,r,l){var i,u,a,m,p;return n(this,(function(n){return i=new URL(t),u=i.href.includes("vnpay"),a=i.searchParams.get("typeInapp"),m=o.isEmpty(r)?void 0:{modal_style:(null==r?void 0:r.style)?s(null==r?void 0:r.style):"bottom_sheet",left_button:(null==r?void 0:r.leftButton)?s(null==r?void 0:r.leftButton):"back"},p=Number.isInteger(l)?l:void 0,!u&&o.isEmpty(a)&&i.searchParams.set("typeInapp","1"),[2,new Promise((function(t,s){e("OPEN_INAPP",{url:i.href,style:m,h5_src_open:p},{success:function(){t()},fail:function(t){s(t)}},{})}))]}))})),function(t,e,s){return r.apply(this,arguments)});export{l as default};
|
package/apis/index.d.ts
CHANGED
|
@@ -5383,12 +5383,40 @@ declare const nativeStorage: {
|
|
|
5383
5383
|
getStorageInfo: typeof getStorageInfoSync;
|
|
5384
5384
|
};
|
|
5385
5385
|
|
|
5386
|
+
declare const openPaymentLinkArgs: ZodObject<{
|
|
5387
|
+
url: ZodString;
|
|
5388
|
+
config: ZodOptional<ZodObject<{
|
|
5389
|
+
style: ZodOptional<ZodDefault<ZodEnum<["bottomSheet", "normal"]>>>;
|
|
5390
|
+
leftButton: ZodOptional<ZodDefault<ZodEnum<["back", "none"]>>>;
|
|
5391
|
+
}, "strip", ZodTypeAny, {
|
|
5392
|
+
style?: "normal" | "bottomSheet" | undefined;
|
|
5393
|
+
leftButton?: "none" | "back" | undefined;
|
|
5394
|
+
}, {
|
|
5395
|
+
style?: "normal" | "bottomSheet" | undefined;
|
|
5396
|
+
leftButton?: "none" | "back" | undefined;
|
|
5397
|
+
}>>;
|
|
5398
|
+
}, "strip", ZodTypeAny, {
|
|
5399
|
+
config?: {
|
|
5400
|
+
style?: "normal" | "bottomSheet" | undefined;
|
|
5401
|
+
leftButton?: "none" | "back" | undefined;
|
|
5402
|
+
} | undefined;
|
|
5403
|
+
url: string;
|
|
5404
|
+
}, {
|
|
5405
|
+
config?: {
|
|
5406
|
+
style?: "normal" | "bottomSheet" | undefined;
|
|
5407
|
+
leftButton?: "none" | "back" | undefined;
|
|
5408
|
+
} | undefined;
|
|
5409
|
+
url: string;
|
|
5410
|
+
}>[];
|
|
5411
|
+
declare function openPaymentLink(args: AsyncCallback<OpenWebviewReturns> & TypeOf<(typeof openPaymentLinkArgs)[0]>): Promise<void>;
|
|
5412
|
+
|
|
5386
5413
|
declare const Payment: {
|
|
5387
5414
|
purchase: typeof purchase$1;
|
|
5388
5415
|
createOrder: typeof createOrder;
|
|
5389
5416
|
checkTransaction: typeof checkTransaction;
|
|
5390
5417
|
createOrderIAP: typeof createOrderIAP;
|
|
5391
5418
|
selectPaymentMethod: typeof selectPaymentMethod;
|
|
5419
|
+
openPaymentLink: typeof openPaymentLink;
|
|
5392
5420
|
};
|
|
5393
5421
|
declare const CheckoutSDK: {
|
|
5394
5422
|
purchase: typeof purchase$1;
|
|
@@ -5396,6 +5424,7 @@ declare const CheckoutSDK: {
|
|
|
5396
5424
|
checkTransaction: typeof checkTransaction;
|
|
5397
5425
|
createOrderIAP: typeof createOrderIAP;
|
|
5398
5426
|
selectPaymentMethod: typeof selectPaymentMethod;
|
|
5427
|
+
openPaymentLink: typeof openPaymentLink;
|
|
5399
5428
|
};
|
|
5400
5429
|
|
|
5401
5430
|
declare const downloadFileArgs: ZodOptional<ZodObject<{
|
package/apis/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a="2.50.0-beta.1";export{a as version};
|