@hylid/types 4.0.0-alpha.8 → 4.0.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.
Files changed (2) hide show
  1. package/lib/mp.d.ts +20 -3
  2. package/package.json +1 -1
package/lib/mp.d.ts CHANGED
@@ -14,6 +14,7 @@ export interface IRPCArgs {
14
14
  disableLimitView?: boolean;
15
15
  timeout?: number;
16
16
  getResponse?: boolean;
17
+ workspaceId?: string;
17
18
  }
18
19
  export interface getCurrentPagesOptions {
19
20
  payload?: Record<string, any>;
@@ -127,7 +128,7 @@ export interface MPApi extends Omit<MiniprogramApi, 'request'> {
127
128
  }>) => void;
128
129
  removeNotifyListener: (args: {
129
130
  name: string;
130
- }) => void;
131
+ } & AsyncCallback<void>) => void;
131
132
  addNotifyListener: (args: {
132
133
  name: string;
133
134
  keep?: boolean;
@@ -136,7 +137,7 @@ export interface MPApi extends Omit<MiniprogramApi, 'request'> {
136
137
  postNotification: (args: {
137
138
  name: string;
138
139
  data: object;
139
- }) => void;
140
+ } & AsyncCallback<void>) => void;
140
141
  openWebURL: (args: {
141
142
  url: string;
142
143
  path?: string;
@@ -185,8 +186,10 @@ export interface MPApi extends Omit<MiniprogramApi, 'request'> {
185
186
  ext: string;
186
187
  }>) => void;
187
188
  popWindow: () => void;
188
- setTransparentTitle: (args: AsyncCallback<{
189
+ setTransparentTitle: (args: {
189
190
  transparentTitle: 'none' | 'auto' | 'always' | 'custom';
191
+ } & AsyncCallback<{
192
+ success: boolean;
190
193
  }>) => void;
191
194
  getLocation: (args: {
192
195
  bizType?: string;
@@ -194,6 +197,20 @@ export interface MPApi extends Omit<MiniprogramApi, 'request'> {
194
197
  timeout?: number;
195
198
  horizontalAccuracy?: number;
196
199
  } & GetLocationArgs) => void;
200
+ showAuthGuide: (args: AsyncCallback<{
201
+ /**
202
+ * When shown is true, it indicates the permission guide
203
+ * pop-up will be shown; when it is false, it indicates
204
+ * the user has allowed the permission.
205
+ */
206
+ shown: boolean;
207
+ }> & {
208
+ authType: string;
209
+ bizType?: string;
210
+ }) => void;
211
+ setCanPullDown: (args: {
212
+ canPullDown: boolean;
213
+ } & AsyncCallback<void>) => void;
197
214
  }
198
215
  export declare type HeadModel = {
199
216
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hylid/types",
3
- "version": "4.0.0-alpha.8",
3
+ "version": "4.0.0",
4
4
  "main": "lib/index.js",
5
5
  "files": [
6
6
  "lib",