zmp-sdk 2.54.0-beta.1 → 2.54.0-beta.2
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/sendMessage.js +1 -1
- package/apis/common/apis/general/sendMessage.js +1 -1
- package/apis/index.d.ts +4 -10
- package/apis/package.json.js +1 -1
- package/browser.min.js +2 -2
- package/index.d.ts +4 -10
- package/index.es.js +2 -2
- package/index.js +2 -2
- package/index.umd.js +3 -3
- package/package.json +1 -1
package/apis/apis/sendMessage.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from'./../external/@swc/helpers/src/_async_to_generator.mjs.js';import{object as r,string as s}from'./../external/zod/lib/index.mjs.js';import e from"../appEnv/index.js";import n from"../common/notFound.js";import{functionHandler as o}from"../utils/decorator.js";import i from"../common/apis/general/sendMessage.js";import{__generator as m}from'./../external/tslib/tslib.es6.js';var u=[r({token:s().min(1),link:s().url().regex(/^https:\/\//i,"Link must start with https://")})];function a(t){return p.apply(this,arguments)}function p(){return p=t((function(r){return m(this,(function(s){return[2,o("sendMessage",u,[r],(a=t((function(t,r){var s;return m(this,(function(o){switch(o.label){case 0:return s=r||t,e.isMp?[4,i(s)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,Promise.reject(n("sendMessage",{}))]}}))})),function(t,r){return a.apply(this,arguments)}))];var a}))})),p.apply(this,arguments)}export{a as sendMessage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from'./../../../external/@swc/helpers/src/_async_to_generator.mjs.js';import e from
|
|
1
|
+
import t from'./../../../external/@swc/helpers/src/_async_to_generator.mjs.js';import e from"../../call/index.js";import{SEND_MESSAGE_VIEW_KEY as n}from"../../../constants.js";import{__generator as s}from'./../../../external/tslib/tslib.es6.js';var o,r=(o=t((function(t){return s(this,(function(s){return[2,new Promise((function(s,o){var r;e("MP_OPEN_ZINSTANTVIEW",{viewId:n,token:t.token,payload:{bundle_data:(r=t,{action:"action.minishop.send_message",datas:[{msgType:1,text:r.link}]}),typeView:3,clearBackground:!0,occupyStatusBar:!0,disableSlideToBack:!0,disableBack:!1}},{success:function(t){if("string"==typeof t)try{return s(JSON.parse(t))}catch(e){return s(t)}s(t)},fail:function(t){o(t)}},{})}))]}))})),function(t){return o.apply(this,arguments)});export{r as default};
|
package/apis/index.d.ts
CHANGED
|
@@ -1482,13 +1482,9 @@ type SendMessageParams = {
|
|
|
1482
1482
|
*/
|
|
1483
1483
|
token: string;
|
|
1484
1484
|
/**
|
|
1485
|
-
*
|
|
1485
|
+
* Đường link cần gửi.
|
|
1486
1486
|
*/
|
|
1487
|
-
|
|
1488
|
-
/**
|
|
1489
|
-
* Đường link gửi kèm sau tin nhắn văn bản. Không truyền thì chỉ gửi tin nhắn văn bản.
|
|
1490
|
-
*/
|
|
1491
|
-
link?: string;
|
|
1487
|
+
link: string;
|
|
1492
1488
|
};
|
|
1493
1489
|
type SendMessageReturns = any;
|
|
1494
1490
|
type TempFile = {
|
|
@@ -5176,19 +5172,17 @@ declare function addVoucher(args: AsyncCallback<AddVoucherReturns> & AddVoucherD
|
|
|
5176
5172
|
declare function addCard(args: AsyncCallback<AddCardReturns> & AddCardParams): Promise<AddCardReturns>;
|
|
5177
5173
|
|
|
5178
5174
|
/**
|
|
5179
|
-
* API gửi tin nhắn
|
|
5175
|
+
* API gửi tin nhắn chứa một đường link.
|
|
5180
5176
|
*
|
|
5181
5177
|
* @zaloOnly Chỉ hoạt động khi chạy bên trong ứng dụng Zalo mobile.
|
|
5182
5178
|
*
|
|
5183
5179
|
* @param {string} token Token để gửi tin nhắn.
|
|
5184
|
-
* @param {string}
|
|
5185
|
-
* @param {string} [link] Đường link gửi kèm sau tin nhắn văn bản. Không truyền thì chỉ gửi tin nhắn văn bản.
|
|
5180
|
+
* @param {string} link Đường link cần gửi, phải là URL hợp lệ bắt đầu bằng `https://`.
|
|
5186
5181
|
*
|
|
5187
5182
|
* @example
|
|
5188
5183
|
* ```ts
|
|
5189
5184
|
* await sendMessage({
|
|
5190
5185
|
* token: "<token>",
|
|
5191
|
-
* text: "Tôi cần tư vấn sản phẩm này",
|
|
5192
5186
|
* link: "https://zalo.me/s/4468790044699041621/products/P-20250908-5K5USI",
|
|
5193
5187
|
* });
|
|
5194
5188
|
* ```
|
package/apis/package.json.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var a="2.54.0-beta.
|
|
1
|
+
var a="2.54.0-beta.2";export{a as version};
|