@cloudbase/js-sdk 2.22.2 → 2.22.5
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/index.d.ts +15 -0
- package/miniprogram_dist/ai.js +1 -1
- package/miniprogram_dist/analytics.js +1 -1
- package/miniprogram_dist/app.js +1 -1
- package/miniprogram_dist/auth.js +1 -1
- package/miniprogram_dist/cloudrun.js +1 -1
- package/miniprogram_dist/container.js +1 -1
- package/miniprogram_dist/functions.js +1 -1
- package/miniprogram_dist/index.js +1 -1
- package/miniprogram_dist/model.js +1 -1
- package/miniprogram_dist/mysql.js +1 -1
- package/miniprogram_dist/oauth.js +1 -1
- package/miniprogram_dist/storage.js +1 -1
- package/package.json +14 -14
package/index.d.ts
CHANGED
|
@@ -13,7 +13,22 @@ type KV<T> = {
|
|
|
13
13
|
|
|
14
14
|
type ExcludeOf<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
|
|
15
15
|
|
|
16
|
+
|
|
16
17
|
declare type MethodType = 'request' | 'post' | 'get' | 'head' | 'patch' | 'delete' | 'put'
|
|
18
|
+
|
|
19
|
+
interface ICallApiOptions {
|
|
20
|
+
/** 请求的path */
|
|
21
|
+
path?: string
|
|
22
|
+
/**请求方法 */
|
|
23
|
+
method?: MethodType
|
|
24
|
+
/**请求头 */
|
|
25
|
+
headers?: KV<any>
|
|
26
|
+
/** 请求体,根据content-type可以是不同类型 */
|
|
27
|
+
body?: KV<any> | string
|
|
28
|
+
/**可传token,如果没有传值,则默认用当前登录的token */
|
|
29
|
+
token?: string
|
|
30
|
+
}
|
|
31
|
+
|
|
17
32
|
interface ICloudbaseApis {
|
|
18
33
|
[apiName: string]: {
|
|
19
34
|
[method in MethodType]: (callApiOptions: ICallApiOptions, opts?: KV<any>) => Promise<ResponseObject['data']>
|