@hylid/types 4.0.8-alpha.1 → 4.0.9

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.
Files changed (2) hide show
  1. package/lib/mp.d.ts +56 -8
  2. package/package.json +1 -1
package/lib/mp.d.ts CHANGED
@@ -44,7 +44,13 @@ export interface MPApi extends Omit<MiniprogramApi, 'request'> {
44
44
  getPhoneNumber(args?: any): void;
45
45
  inquireQuote(args?: any): void;
46
46
  isInstalledApp(args?: any): void;
47
- navigateToBizScene(args?: any): void;
47
+ navigateToBizScene(args: {
48
+ sceneCode: string;
49
+ param?: {
50
+ scheme?: string;
51
+ [key: string]: any;
52
+ };
53
+ } & AsyncCallback<void>): void;
48
54
  paySignCenter(args?: any): void;
49
55
  rpc(args: IRPCArgs & AsyncCallback<{
50
56
  headers: Record<string, string>;
@@ -141,23 +147,23 @@ export interface MPApi extends Omit<MiniprogramApi, 'request'> {
141
147
  openWebURL: (args: {
142
148
  url: string;
143
149
  path?: string;
144
- } & AsyncCallback<void>) => void;
150
+ }) => Promise<void>;
145
151
  openInApp: (args: {
146
152
  url: string;
147
153
  path?: string;
148
- } & AsyncCallback<void>) => void;
154
+ }) => Promise<void>;
149
155
  openOtherApp: (args: {
150
156
  appId: string;
151
157
  path?: string;
152
158
  launchParams?: Record<string, any>;
153
- } & AsyncCallback<void>) => void;
159
+ }) => Promise<void>;
154
160
  openInBrowser: (args: {
155
161
  url: string;
156
162
  path?: string;
157
- } & AsyncCallback<void>) => void;
158
- openPayCodePage: () => void;
159
- openApPayCodePage: () => void;
160
- openScanPage: () => void;
163
+ }) => Promise<void>;
164
+ openPayCodePage: () => Promise<void>;
165
+ openApPayCodePage: () => Promise<void>;
166
+ openScanPage: () => Promise<void>;
161
167
  getMainSelectedCity: (args: AsyncCallback<{
162
168
  fullName: string;
163
169
  enName: string;
@@ -208,9 +214,51 @@ export interface MPApi extends Omit<MiniprogramApi, 'request'> {
208
214
  authType: string;
209
215
  bizType?: string;
210
216
  }) => void;
217
+ getRunScene: (args: AsyncCallback<{
218
+ envVersion: 'develop' | 'trial' | 'release';
219
+ }>) => void;
211
220
  setCanPullDown: (args: {
212
221
  canPullDown: boolean;
213
222
  } & AsyncCallback<void>) => void;
223
+ chooseFileFromDisk: (args: AsyncCallback<{
224
+ success: boolean;
225
+ apFilePath: string;
226
+ }> & {
227
+ appId?: string;
228
+ }) => void;
229
+ chooseVideo: (args: AsyncCallback<{
230
+ filePath: string;
231
+ duration: number;
232
+ size: number;
233
+ height: number;
234
+ width: number;
235
+ tempFilePath: string;
236
+ }> & {
237
+ sourceType?: string[];
238
+ compressed?: boolean;
239
+ maxDuration?: number;
240
+ camera?: string;
241
+ }) => void;
242
+ compressImage: (args: AsyncCallback<{
243
+ apFilePaths: string[];
244
+ }> & {
245
+ apFilePaths: string[];
246
+ compressLevel?: number;
247
+ compressedWidth?: number;
248
+ compressedHeight?: number;
249
+ maxWidth?: number;
250
+ maxHeight?: number;
251
+ }) => void;
252
+ setTabBarItem: (args: {
253
+ index?: number;
254
+ text: string;
255
+ iconPath: string;
256
+ selectedIconPath: string;
257
+ } & AsyncCallback<void>) => void;
258
+ showTabBar: (args: {
259
+ animation?: boolean;
260
+ } & AsyncCallback<void>) => void;
261
+ hideBackHome: () => void;
214
262
  }
215
263
  export declare type HeadModel = {
216
264
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hylid/types",
3
- "version": "4.0.8-alpha.1",
3
+ "version": "4.0.9",
4
4
  "main": "lib/index.js",
5
5
  "files": [
6
6
  "lib",