@ray-js/api 1.6.13 → 1.6.15
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/@types/BaseKit.d.ts +0 -61
- package/@types/README.md +7 -0
- package/@types/api-extend.d.ts +57 -0
- package/package.json +5 -5
package/@types/BaseKit.d.ts
CHANGED
@@ -1683,60 +1683,6 @@ declare namespace ty {
|
|
1683
1683
|
complete?: () => void
|
1684
1684
|
}): void
|
1685
1685
|
|
1686
|
-
/**
|
1687
|
-
*@description 将数据存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。单个 key 允许存储的最大数据长度为 1MB,所有数据存储上限为 10MB。
|
1688
|
-
*@error {6: 'The parameter format is incorrect'} | {7: 'API Internal processing failed'} | {10010: 'storage json syntax error'}*/
|
1689
|
-
export function setStorage(params: {
|
1690
|
-
/** 本地缓存中指定的 key */
|
1691
|
-
key: string
|
1692
|
-
/** key对应的内容 */
|
1693
|
-
data: string
|
1694
|
-
success?: (params: null) => void
|
1695
|
-
fail?: (params: {
|
1696
|
-
errorMsg: string
|
1697
|
-
errorCode: string | number
|
1698
|
-
innerError: {
|
1699
|
-
errorCode: string | number
|
1700
|
-
errorMsg: string
|
1701
|
-
}
|
1702
|
-
}) => void
|
1703
|
-
complete?: () => void
|
1704
|
-
}): void
|
1705
|
-
|
1706
|
-
/**
|
1707
|
-
*@description 将数据存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。单个 key 允许存储的最大数据长度为 1MB,所有数据存储上限为 10MB。
|
1708
|
-
*@error {6: 'The parameter format is incorrect'} | {7: 'API Internal processing failed'} | {10010: 'storage json syntax error'}*/
|
1709
|
-
export function setStorageSync(storageDataBean?: StorageDataBean): null
|
1710
|
-
|
1711
|
-
/**
|
1712
|
-
*@description 从本地缓存中异步获取指定 key 的内容
|
1713
|
-
*@error {6: 'The parameter format is incorrect'}*/
|
1714
|
-
export function getStorage(params: {
|
1715
|
-
/** 本地缓存中指定的 key */
|
1716
|
-
key: string
|
1717
|
-
success?: (params: {
|
1718
|
-
/** key对应的内容 */
|
1719
|
-
data?: string
|
1720
|
-
}) => void
|
1721
|
-
fail?: (params: {
|
1722
|
-
errorMsg: string
|
1723
|
-
errorCode: string | number
|
1724
|
-
innerError: {
|
1725
|
-
errorCode: string | number
|
1726
|
-
errorMsg: string
|
1727
|
-
}
|
1728
|
-
}) => void
|
1729
|
-
complete?: () => void
|
1730
|
-
}): void
|
1731
|
-
|
1732
|
-
/**
|
1733
|
-
*@description 从本地缓存中异步获取指定 key 的内容
|
1734
|
-
*@error {6: 'The parameter format is incorrect'}*/
|
1735
|
-
export function getStorageSync(storageKeyBean?: StorageKeyBean): {
|
1736
|
-
/** key对应的内容 */
|
1737
|
-
data?: string
|
1738
|
-
}
|
1739
|
-
|
1740
1686
|
/**
|
1741
1687
|
*@description 清理本地数据缓存
|
1742
1688
|
*@error {6: 'The parameter format is incorrect'}*/
|
@@ -2445,13 +2391,6 @@ declare namespace ty {
|
|
2445
2391
|
actionText?: string
|
2446
2392
|
}
|
2447
2393
|
|
2448
|
-
export type StorageDataBean = {
|
2449
|
-
/** 本地缓存中指定的 key */
|
2450
|
-
key: string
|
2451
|
-
/** key对应的内容 */
|
2452
|
-
data: string
|
2453
|
-
}
|
2454
|
-
|
2455
2394
|
export type StorageKeyBean = {
|
2456
2395
|
/** 本地缓存中指定的 key */
|
2457
2396
|
key: string
|
package/@types/README.md
ADDED
package/@types/api-extend.d.ts
CHANGED
@@ -333,6 +333,63 @@ declare namespace ty {
|
|
333
333
|
* @returns 区域码 可选值:AY, AZ, EU, IN, RU, UE, WE
|
334
334
|
*/
|
335
335
|
export function getRegionCode(): IRegionCode
|
336
|
+
|
337
|
+
export type StorageDataBean = {
|
338
|
+
/** 本地缓存中指定的 key */
|
339
|
+
key: string
|
340
|
+
/** 需要存储的内容。只支持原生类型、Date、及能够通过JSON.stringify序列化的对象。 */
|
341
|
+
data: any
|
342
|
+
}
|
343
|
+
/**
|
344
|
+
*@description 将数据存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。单个 key 允许存储的最大数据长度为 1MB,所有数据存储上限为 10MB。
|
345
|
+
*@error {6: 'The parameter format is incorrect'} | {7: 'API Internal processing failed'} | {10010: 'storage json syntax error'}*/
|
346
|
+
export function setStorage(params: {
|
347
|
+
/** 本地缓存中指定的 key */
|
348
|
+
key: string
|
349
|
+
/** 需要存储的内容。只支持原生类型、Date、及能够通过JSON.stringify序列化的对象。 */
|
350
|
+
data: any
|
351
|
+
success?: (params: null) => void
|
352
|
+
fail?: (params: {
|
353
|
+
errorMsg: string
|
354
|
+
errorCode: string | number
|
355
|
+
innerError: {
|
356
|
+
errorCode: string | number
|
357
|
+
errorMsg: string
|
358
|
+
}
|
359
|
+
}) => void
|
360
|
+
complete?: () => void
|
361
|
+
}): void
|
362
|
+
|
363
|
+
/**
|
364
|
+
*@description 将数据存储在本地缓存中指定的 key 中。会覆盖掉原来该 key 对应的内容。除非用户主动删除或因存储空间原因被系统清理,否则数据都一直可用。单个 key 允许存储的最大数据长度为 1MB,所有数据存储上限为 10MB。
|
365
|
+
*@error {6: 'The parameter format is incorrect'} | {7: 'API Internal processing failed'} | {10010: 'storage json syntax error'}*/
|
366
|
+
export function setStorageSync(storageDataBean?: StorageDataBean): null
|
367
|
+
|
368
|
+
/**
|
369
|
+
*@description 从本地缓存中异步获取指定 key 的内容
|
370
|
+
*@error {6: 'The parameter format is incorrect'}*/
|
371
|
+
export function getStorage(params: {
|
372
|
+
/** 本地缓存中指定的 key */
|
373
|
+
key: string
|
374
|
+
success?: (params: {
|
375
|
+
/** key对应的内容 */
|
376
|
+
data: any
|
377
|
+
}) => void
|
378
|
+
fail?: (params: {
|
379
|
+
errorMsg: string
|
380
|
+
errorCode: string | number
|
381
|
+
innerError: {
|
382
|
+
errorCode: string | number
|
383
|
+
errorMsg: string
|
384
|
+
}
|
385
|
+
}) => void
|
386
|
+
complete?: () => void
|
387
|
+
}): void
|
388
|
+
|
389
|
+
/**
|
390
|
+
*@description 从本地缓存中异步获取指定 key 的内容
|
391
|
+
*@error {6: 'The parameter format is incorrect'}*/
|
392
|
+
export function getStorageSync(storageKeyBean?: StorageKeyBean): any
|
336
393
|
}
|
337
394
|
|
338
395
|
declare namespace WechatMiniprogram {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ray-js/api",
|
3
|
-
"version": "1.6.
|
3
|
+
"version": "1.6.15",
|
4
4
|
"description": "Ray universal api",
|
5
5
|
"keywords": [
|
6
6
|
"ray"
|
@@ -29,14 +29,14 @@
|
|
29
29
|
"watch": "ray start --type=component"
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
|
-
"@ray-js/framework": "1.6.
|
33
|
-
"@ray-js/router": "1.6.
|
32
|
+
"@ray-js/framework": "1.6.15",
|
33
|
+
"@ray-js/router": "1.6.15",
|
34
34
|
"@ray-js/wechat": "^0.2.19",
|
35
35
|
"base64-browser": "^1.0.1",
|
36
36
|
"query-string": "^7.1.3"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
|
-
"@ray-js/cli": "1.6.
|
39
|
+
"@ray-js/cli": "1.6.15",
|
40
40
|
"art-template": "^4.13.2",
|
41
41
|
"fs-extra": "^10.1.0",
|
42
42
|
"miniprogram-api-typings": "^3.12.3",
|
@@ -46,5 +46,5 @@
|
|
46
46
|
"access": "public",
|
47
47
|
"registry": "https://registry.npmjs.com"
|
48
48
|
},
|
49
|
-
"gitHead": "
|
49
|
+
"gitHead": "797a3aa522003e2487981d7861df36651692af99"
|
50
50
|
}
|