zcw-shared 1.33.0 → 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.
Files changed (93) hide show
  1. package/README.md +13 -13
  2. package/dist/functions/android/integrateFacebookLogin.d.ts +12 -0
  3. package/dist/functions/android/integrateFacebookLogin.js +91 -0
  4. package/dist/functions/android/integrateFacebookLogin.js.map +1 -0
  5. package/dist/functions/android/integrateGoogleLogin.d.ts +10 -0
  6. package/dist/functions/android/integrateGoogleLogin.js +199 -0
  7. package/dist/functions/android/integrateGoogleLogin.js.map +1 -0
  8. package/dist/functions/android/integrateMiuiLogin.d.ts +13 -0
  9. package/dist/functions/android/integrateMiuiLogin.js +115 -0
  10. package/dist/functions/android/integrateMiuiLogin.js.map +1 -0
  11. package/dist/functions/android/integrateQQLogin.d.ts +12 -0
  12. package/dist/functions/android/integrateQQLogin.js +130 -0
  13. package/dist/functions/android/integrateQQLogin.js.map +1 -0
  14. package/dist/functions/android/integrateShareTrace.d.ts +10 -0
  15. package/dist/functions/android/integrateShareTrace.js +181 -0
  16. package/dist/functions/android/integrateShareTrace.js.map +1 -0
  17. package/dist/functions/android/integrateSinaLogin.d.ts +13 -0
  18. package/dist/functions/android/integrateSinaLogin.js +85 -0
  19. package/dist/functions/android/integrateSinaLogin.js.map +1 -0
  20. package/dist/functions/android/integrateThirdPartyModule.d.ts +46 -0
  21. package/dist/functions/android/integrateThirdPartyModule.js +251 -0
  22. package/dist/functions/android/integrateThirdPartyModule.js.map +1 -0
  23. package/dist/functions/android/integrateUniverifyLogin.d.ts +11 -0
  24. package/dist/functions/android/integrateUniverifyLogin.js +314 -0
  25. package/dist/functions/android/integrateUniverifyLogin.js.map +1 -0
  26. package/dist/functions/android/integrateWechatLogin.d.ts +13 -0
  27. package/dist/functions/android/integrateWechatLogin.js +154 -0
  28. package/dist/functions/android/integrateWechatLogin.js.map +1 -0
  29. package/dist/functions/android/integrateWechatShare.d.ts +13 -0
  30. package/dist/functions/android/integrateWechatShare.js +154 -0
  31. package/dist/functions/android/integrateWechatShare.js.map +1 -0
  32. package/dist/functions/android/modifyManifest.d.ts +7 -0
  33. package/dist/functions/android/modifyManifest.js +24 -0
  34. package/dist/functions/android/modifyManifest.js.map +1 -1
  35. package/dist/functions/async/cancellableFetch.d.ts +12 -0
  36. package/dist/functions/async/cancellableFetch.js +27 -0
  37. package/dist/functions/async/cancellableFetch.js.map +1 -0
  38. package/dist/functions/async/cancellableXHR.d.ts +21 -0
  39. package/dist/functions/async/cancellableXHR.js +96 -0
  40. package/dist/functions/async/cancellableXHR.js.map +1 -0
  41. package/dist/functions/functional/constant.d.ts +1 -0
  42. package/dist/functions/functional/constant.js +4 -0
  43. package/dist/functions/functional/constant.js.map +1 -0
  44. package/dist/functions/functional/identity.d.ts +1 -0
  45. package/dist/functions/functional/identity.js +4 -0
  46. package/dist/functions/functional/identity.js.map +1 -0
  47. package/dist/functions/functional/noop.d.ts +1 -0
  48. package/dist/functions/functional/noop.js +3 -0
  49. package/dist/functions/functional/noop.js.map +1 -0
  50. package/dist/functions/image/compressImageToWidth.d.ts +12 -0
  51. package/dist/functions/image/compressImageToWidth.js +44 -0
  52. package/dist/functions/image/compressImageToWidth.js.map +1 -0
  53. package/dist/functions/image/generateFavIcon.d.ts +8 -0
  54. package/dist/functions/image/generateFavIcon.js +13 -0
  55. package/dist/functions/image/generateFavIcon.js.map +1 -0
  56. package/dist/functions/image/renderBankCard.d.ts +52 -0
  57. package/dist/functions/image/renderBankCard.js +177 -0
  58. package/dist/functions/image/renderBankCard.js.map +1 -0
  59. package/dist/functions/image/renderBusinessLicense.d.ts +47 -0
  60. package/dist/functions/image/renderBusinessLicense.js +187 -0
  61. package/dist/functions/image/renderBusinessLicense.js.map +1 -0
  62. package/dist/functions/image/renderDrivingLicense.d.ts +48 -0
  63. package/dist/functions/image/renderDrivingLicense.js +201 -0
  64. package/dist/functions/image/renderDrivingLicense.js.map +1 -0
  65. package/dist/functions/image/renderLicensePlate.d.ts +47 -0
  66. package/dist/functions/image/renderLicensePlate.js +85 -0
  67. package/dist/functions/image/renderLicensePlate.js.map +1 -0
  68. package/dist/functions/software/publishToPgyer.d.ts +16 -0
  69. package/dist/functions/software/publishToPgyer.js +96 -0
  70. package/dist/functions/software/publishToPgyer.js.map +1 -0
  71. package/dist/functions/tencent-cloud/deploy.tcb.js +1 -1
  72. package/dist/functions/tencent-cloud/deploy.tcb.js.map +1 -1
  73. package/dist/functions/uniapp/app-plus/buildAndroidApp.js +290 -0
  74. package/dist/functions/uniapp/app-plus/buildAndroidApp.js.map +1 -1
  75. package/dist/functions/validation/generateFakeBankCard.d.ts +87 -0
  76. package/dist/functions/validation/generateFakeBankCard.js +152 -0
  77. package/dist/functions/validation/generateFakeBankCard.js.map +1 -0
  78. package/dist/functions/validation/generateFakeBusinessLicense.d.ts +21 -0
  79. package/dist/functions/validation/generateFakeBusinessLicense.js +160 -0
  80. package/dist/functions/validation/generateFakeBusinessLicense.js.map +1 -0
  81. package/dist/functions/validation/generateFakeDrivingLicense.d.ts +31 -0
  82. package/dist/functions/validation/generateFakeDrivingLicense.js +119 -0
  83. package/dist/functions/validation/generateFakeDrivingLicense.js.map +1 -0
  84. package/dist/functions/validation/generateFakeLicensePlate.d.ts +13 -0
  85. package/dist/functions/validation/generateFakeLicensePlate.js +87 -0
  86. package/dist/functions/validation/generateFakeLicensePlate.js.map +1 -0
  87. package/package.json +26 -4
  88. package/references/blob.d.ts +4 -0
  89. package/references/fetch.d.ts +22 -0
  90. package/references/sharp.d.ts +1 -0
  91. package/references/xhr.d.ts +47 -0
  92. package/types/pgyer.d.ts +64 -0
  93. package/types/uniapp-android-build.d.ts +124 -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
+
@@ -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
+
@@ -10,6 +10,112 @@
10
10
 
11
11
  import type { AndroidBuildOptions, AndroidBuildResult } from './android-build.d'
12
12
 
13
+ /**
14
+ * 微信登录配置
15
+ */
16
+ export interface WechatLoginOptions {
17
+ /** 微信AppID */
18
+ appId: string
19
+ /** 微信AppSecret */
20
+ appSecret: string
21
+ /** oauth-weixin-release.aar文件路径 */
22
+ oauthAarPath: string
23
+ /** WXEntryActivity.java文件路径 */
24
+ wxEntryActivityPath: string
25
+ }
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
+
41
+ /**
42
+ * 一键登录配置(HBuilderX 3.99+版本)
43
+ */
44
+ export interface UniverifyLoginOptions {
45
+ /** 个推AppID(GETUI_APPID 和 GY_APP_ID 使用相同值) */
46
+ getuiAppId: string
47
+ /** oauth-univerify-release.aar文件路径 */
48
+ oauthAarPath: string
49
+ }
50
+
51
+ /**
52
+ * QQ登录配置(最新版本)
53
+ */
54
+ export interface QQLoginOptions {
55
+ /** QQ AppID */
56
+ appId: string
57
+ /** oauth-qq-release.aar文件路径 */
58
+ oauthAarPath: string
59
+ /** open_sdk_3.5.12.2_r97423a8_lite.jar文件路径 */
60
+ openSdkJarPath: string
61
+ }
62
+
63
+ /**
64
+ * 新浪微博登录配置
65
+ */
66
+ export interface SinaLoginOptions {
67
+ /** 新浪AppKey */
68
+ appKey: string
69
+ /** 重定向URI */
70
+ redirectUri: string
71
+ /** openDefault-12.5.0.aar文件路径 */
72
+ openDefaultAarPath: string
73
+ /** oauth-sina-release.aar文件路径 */
74
+ oauthAarPath: string
75
+ }
76
+
77
+ /**
78
+ * 小米登录配置
79
+ */
80
+ export interface MiuiLoginOptions {
81
+ /** 小米登录的APPID */
82
+ appId: string
83
+ /** 小米登录的APPSecret */
84
+ appSecret: string
85
+ /** 小米登录的RegURL */
86
+ redirectUri: string
87
+ /** oauth-miui-release.aar文件路径 */
88
+ oauthAarPath: string
89
+ }
90
+
91
+ /**
92
+ * Google登录配置
93
+ */
94
+ export interface GoogleLoginOptions {
95
+ /** oauth-google-release.aar文件路径 */
96
+ oauthAarPath: string
97
+ }
98
+
99
+ /**
100
+ * Facebook登录配置
101
+ */
102
+ export interface FacebookLoginOptions {
103
+ /** Facebook AppID */
104
+ appId: string
105
+ /** Facebook Client Token */
106
+ clientToken: string
107
+ /** oauth-facebook-release.aar文件路径 */
108
+ oauthAarPath: string
109
+ }
110
+
111
+ /**
112
+ * ShareTrace配置
113
+ */
114
+ export interface ShareTraceOptions {
115
+ /** ShareTrace AppKey(从ShareTrace控制台获取) */
116
+ appKey: string
117
+ }
118
+
13
119
  /**
14
120
  * UniApp Android 构建选项
15
121
  */
@@ -20,6 +126,24 @@ export interface UniAppAndroidBuildOptions extends AndroidBuildOptions {
20
126
  applicationId?: string
21
127
  /** UniApp 应用密钥 */
22
128
  appkey?: string
129
+ /** 微信登录配置(可选) */
130
+ wechatLogin?: WechatLoginOptions
131
+ /** 微信分享配置(可选) */
132
+ wechatShare?: WechatShareOptions
133
+ /** 一键登录配置(可选) */
134
+ univerifyLogin?: UniverifyLoginOptions
135
+ /** QQ登录配置(可选) */
136
+ qqLogin?: QQLoginOptions
137
+ /** 新浪微博登录配置(可选) */
138
+ sinaLogin?: SinaLoginOptions
139
+ /** 小米登录配置(可选) */
140
+ miuiLogin?: MiuiLoginOptions
141
+ /** Google登录配置(可选) */
142
+ googleLogin?: GoogleLoginOptions
143
+ /** Facebook登录配置(可选) */
144
+ facebookLogin?: FacebookLoginOptions
145
+ /** ShareTrace配置(可选) */
146
+ shareTrace?: ShareTraceOptions
23
147
  }
24
148
 
25
149
  /**