zcw-shared 1.34.1 → 1.35.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/dist/functions/android/integrateWechatShare.d.ts +13 -0
- package/dist/functions/android/integrateWechatShare.js +154 -0
- package/dist/functions/android/integrateWechatShare.js.map +1 -0
- package/dist/functions/async/cancellableFetch.d.ts +12 -0
- package/dist/functions/async/cancellableFetch.js +27 -0
- package/dist/functions/async/cancellableFetch.js.map +1 -0
- package/dist/functions/async/cancellableXHR.d.ts +21 -0
- package/dist/functions/async/cancellableXHR.js +96 -0
- package/dist/functions/async/cancellableXHR.js.map +1 -0
- package/dist/functions/functional/constant.d.ts +1 -0
- package/dist/functions/functional/constant.js +4 -0
- package/dist/functions/functional/constant.js.map +1 -0
- package/dist/functions/functional/identity.d.ts +1 -0
- package/dist/functions/functional/identity.js +4 -0
- package/dist/functions/functional/identity.js.map +1 -0
- package/dist/functions/functional/noop.d.ts +1 -0
- package/dist/functions/functional/noop.js +3 -0
- package/dist/functions/functional/noop.js.map +1 -0
- package/dist/functions/image/renderBankCard.d.ts +52 -0
- package/dist/functions/image/renderBankCard.js +177 -0
- package/dist/functions/image/renderBankCard.js.map +1 -0
- package/dist/functions/software/publishToPgyer.d.ts +16 -0
- package/dist/functions/software/publishToPgyer.js +96 -0
- package/dist/functions/software/publishToPgyer.js.map +1 -0
- package/dist/functions/uniapp/app-plus/buildAndroidApp.js +32 -0
- package/dist/functions/uniapp/app-plus/buildAndroidApp.js.map +1 -1
- package/dist/functions/validation/generateFakeBankCard.d.ts +87 -0
- package/dist/functions/validation/generateFakeBankCard.js +152 -0
- package/dist/functions/validation/generateFakeBankCard.js.map +1 -0
- package/package.json +9 -2
- package/references/blob.d.ts +4 -0
- package/references/fetch.d.ts +22 -0
- package/references/xhr.d.ts +47 -0
- package/types/pgyer.d.ts +64 -0
- package/types/uniapp-android-build.d.ts +16 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { BodyInit, FormData } from './fetch.d'
|
|
2
|
+
import type { Document } from './dom.d'
|
|
3
|
+
|
|
4
|
+
export type XMLHttpRequestResponseType =
|
|
5
|
+
| ''
|
|
6
|
+
| 'arraybuffer'
|
|
7
|
+
| 'blob'
|
|
8
|
+
| 'document'
|
|
9
|
+
| 'json'
|
|
10
|
+
| 'text'
|
|
11
|
+
|
|
12
|
+
export interface XMLHttpRequest {
|
|
13
|
+
readonly readyState: number
|
|
14
|
+
response: any
|
|
15
|
+
responseText: string
|
|
16
|
+
responseType: XMLHttpRequestResponseType
|
|
17
|
+
status: number
|
|
18
|
+
statusText: string
|
|
19
|
+
timeout: number
|
|
20
|
+
withCredentials: boolean
|
|
21
|
+
onreadystatechange: ((this: XMLHttpRequest, event: any) => any) | null
|
|
22
|
+
onprogress: ((this: XMLHttpRequest, event: any) => any) | null
|
|
23
|
+
onabort: ((this: XMLHttpRequest, event: any) => any) | null
|
|
24
|
+
onerror: ((this: XMLHttpRequest, event: any) => any) | null
|
|
25
|
+
onload: ((this: XMLHttpRequest, event: any) => any) | null
|
|
26
|
+
onloadend: ((this: XMLHttpRequest, event: any) => any) | null
|
|
27
|
+
ontimeout: ((this: XMLHttpRequest, event: any) => any) | null
|
|
28
|
+
|
|
29
|
+
open(
|
|
30
|
+
method: string,
|
|
31
|
+
url: string,
|
|
32
|
+
async?: boolean,
|
|
33
|
+
username?: string | null,
|
|
34
|
+
password?: string | null
|
|
35
|
+
): void
|
|
36
|
+
|
|
37
|
+
setRequestHeader(header: string, value: string): void
|
|
38
|
+
getResponseHeader(header: string): string | null
|
|
39
|
+
getAllResponseHeaders(): string
|
|
40
|
+
send(body?: BodyInit | Document | FormData | null): void
|
|
41
|
+
abort(): void
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface XMLHttpRequestConstructor {
|
|
45
|
+
new (): XMLHttpRequest
|
|
46
|
+
}
|
|
47
|
+
|
package/types/pgyer.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 蒲公英发布相关类型定义
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 蒲公英发布选项
|
|
7
|
+
*/
|
|
8
|
+
export interface PublishToPgyerOptions {
|
|
9
|
+
/** 应用文件路径(.ipa 或 .apk) */
|
|
10
|
+
filePath: string
|
|
11
|
+
/** 蒲公英 API Key(必填) */
|
|
12
|
+
apiKey: string
|
|
13
|
+
/** 蒲公英用户 Key(可选,如果使用 apiKey 则不需要) */
|
|
14
|
+
uKey?: string
|
|
15
|
+
/** 安装密码(可选) */
|
|
16
|
+
password?: string
|
|
17
|
+
/** 更新说明(可选) */
|
|
18
|
+
updateDescription?: string
|
|
19
|
+
/** 渠道标识(可选) */
|
|
20
|
+
channelShortcut?: string
|
|
21
|
+
/** 安装类型(可选):1=公开,2=密码安装,3=邀请安装 */
|
|
22
|
+
installType?: 1 | 2 | 3
|
|
23
|
+
/** 应用名称(可选) */
|
|
24
|
+
appName?: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 蒲公英发布结果
|
|
29
|
+
*/
|
|
30
|
+
export interface PublishToPgyerResult {
|
|
31
|
+
/** 是否成功 */
|
|
32
|
+
success: boolean
|
|
33
|
+
/** 错误信息(如果失败) */
|
|
34
|
+
error?: string
|
|
35
|
+
/** 应用信息(如果成功) */
|
|
36
|
+
data?: {
|
|
37
|
+
/** 应用 Key */
|
|
38
|
+
appKey?: string
|
|
39
|
+
/** 应用类型 */
|
|
40
|
+
appType?: string
|
|
41
|
+
/** 应用名称 */
|
|
42
|
+
appName?: string
|
|
43
|
+
/** 应用版本 */
|
|
44
|
+
appVersion?: string
|
|
45
|
+
/** 应用版本号 */
|
|
46
|
+
appVersionNo?: string
|
|
47
|
+
/** 应用大小 */
|
|
48
|
+
appFileSize?: string
|
|
49
|
+
/** 应用图标 */
|
|
50
|
+
appIcon?: string
|
|
51
|
+
/** 应用二维码 */
|
|
52
|
+
appQRCodeURL?: string
|
|
53
|
+
/** 应用下载地址 */
|
|
54
|
+
appDownloadURL?: string
|
|
55
|
+
/** 应用短链接 */
|
|
56
|
+
appShortcutUrl?: string
|
|
57
|
+
/** 应用更新说明 */
|
|
58
|
+
appUpdateDescription?: string
|
|
59
|
+
/** 应用安装密码 */
|
|
60
|
+
}
|
|
61
|
+
/** 原始响应数据 */
|
|
62
|
+
rawResponse?: any
|
|
63
|
+
}
|
|
64
|
+
|
|
@@ -24,6 +24,20 @@ export interface WechatLoginOptions {
|
|
|
24
24
|
wxEntryActivityPath: string
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* 微信分享配置
|
|
29
|
+
*/
|
|
30
|
+
export interface WechatShareOptions {
|
|
31
|
+
/** 微信AppID(微信开放平台申请应用的AppID) */
|
|
32
|
+
appId: string
|
|
33
|
+
/** 微信Secret(微信开放平台申请应用的Secret) */
|
|
34
|
+
secret: string
|
|
35
|
+
/** share-weixin-release.aar文件路径 */
|
|
36
|
+
shareAarPath: string
|
|
37
|
+
/** WXEntryActivity.java文件路径(与微信登录共用) */
|
|
38
|
+
wxEntryActivityPath: string
|
|
39
|
+
}
|
|
40
|
+
|
|
27
41
|
/**
|
|
28
42
|
* 一键登录配置(HBuilderX 3.99+版本)
|
|
29
43
|
*/
|
|
@@ -114,6 +128,8 @@ export interface UniAppAndroidBuildOptions extends AndroidBuildOptions {
|
|
|
114
128
|
appkey?: string
|
|
115
129
|
/** 微信登录配置(可选) */
|
|
116
130
|
wechatLogin?: WechatLoginOptions
|
|
131
|
+
/** 微信分享配置(可选) */
|
|
132
|
+
wechatShare?: WechatShareOptions
|
|
117
133
|
/** 一键登录配置(可选) */
|
|
118
134
|
univerifyLogin?: UniverifyLoginOptions
|
|
119
135
|
/** QQ登录配置(可选) */
|