@freelog/tools-lib 0.1.78 → 0.1.82
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/service-API/activities.d.ts +8 -0
- package/dist/service-API/index.d.ts +2 -0
- package/dist/service-API/resources.d.ts +56 -4
- package/dist/service-API/tools/index.d.ts +5 -0
- package/dist/tools-lib.cjs.development.js +61 -6
- package/dist/tools-lib.cjs.development.js.map +1 -1
- package/dist/tools-lib.cjs.production.min.js +1 -1
- package/dist/tools-lib.cjs.production.min.js.map +1 -1
- package/dist/tools-lib.esm.js +61 -6
- package/dist/tools-lib.esm.js.map +1 -1
- package/dist/utils/regexp.d.ts +2 -0
- package/dist/utils/tools.d.ts +9 -0
- package/package.json +1 -1
- package/src/service-API/activities.ts +26 -0
- package/src/service-API/captcha.ts +30 -30
- package/src/service-API/contracts.ts +84 -84
- package/src/service-API/index.ts +29 -27
- package/src/service-API/informalNodes.ts +237 -237
- package/src/service-API/nodes.ts +65 -65
- package/src/service-API/presentables.ts +282 -282
- package/src/service-API/resources.ts +496 -439
- package/src/service-API/storages.ts +345 -345
- package/src/service-API/tools/index.ts +5 -0
- package/src/service-API/transactions.ts +109 -109
- package/src/service-API/user.ts +188 -188
- package/src/utils/linkTo.ts +276 -275
- package/src/utils/predefined.ts +37 -37
- package/src/utils/regexp.ts +52 -46
- package/src/utils/tools.ts +31 -0
package/dist/tools-lib.esm.js
CHANGED
|
@@ -978,7 +978,11 @@ var USERNAME = /*#__PURE__*/new RegExp(/^([A-Za-z0-9][A-Za-z0-9-]{0,28})?[A-Za-z
|
|
|
978
978
|
|
|
979
979
|
var PASSWORD = /*#__PURE__*/new RegExp(/^(?=.*[0-9])(?=.*[a-zA-Z])(.{6,24})$/); // 自然数
|
|
980
980
|
|
|
981
|
-
var NATURAL_NUMBER = /*#__PURE__*/new RegExp(/^[0-9]*$/); //
|
|
981
|
+
var NATURAL_NUMBER = /*#__PURE__*/new RegExp(/^[0-9]*$/); // 正整数
|
|
982
|
+
|
|
983
|
+
var POSITIVE_INTEGER = /*#__PURE__*/new RegExp(/^[1-9]\d*$/); // 最多两位小数的正数
|
|
984
|
+
|
|
985
|
+
var MAX_2_DECIMAL_POSITIVE_NUMBER = /*#__PURE__*/new RegExp(/^\d+(.\d{1,2})?$/); // 对象的Bucket名称
|
|
982
986
|
|
|
983
987
|
var BUCKET_NAME = /*#__PURE__*/new RegExp(/^([a-z0-9][a-z0-9-]{0,61})?[a-z0-9]$/); // JS变量名称
|
|
984
988
|
|
|
@@ -998,6 +1002,8 @@ var Regexp = {
|
|
|
998
1002
|
USERNAME: USERNAME,
|
|
999
1003
|
PASSWORD: PASSWORD,
|
|
1000
1004
|
NATURAL_NUMBER: NATURAL_NUMBER,
|
|
1005
|
+
POSITIVE_INTEGER: POSITIVE_INTEGER,
|
|
1006
|
+
MAX_2_DECIMAL_POSITIVE_NUMBER: MAX_2_DECIMAL_POSITIVE_NUMBER,
|
|
1001
1007
|
BUCKET_NAME: BUCKET_NAME,
|
|
1002
1008
|
JS_VARIABLE_NAME: JS_VARIABLE_NAME
|
|
1003
1009
|
};
|
|
@@ -1155,18 +1161,20 @@ function retrieveUserPassword(_temp10) {
|
|
|
1155
1161
|
|
|
1156
1162
|
function retrievePayPassword() {
|
|
1157
1163
|
return "/retrievePayPassword";
|
|
1158
|
-
} //
|
|
1164
|
+
} // 我的钱包
|
|
1159
1165
|
// interface WalletParamsType {
|
|
1160
1166
|
// }
|
|
1161
1167
|
|
|
1162
1168
|
function wallet() {
|
|
1163
1169
|
return "/logged/wallet";
|
|
1164
|
-
} //
|
|
1170
|
+
} // 我的合约
|
|
1171
|
+
// interface ContractParamsType {
|
|
1165
1172
|
// }
|
|
1166
1173
|
|
|
1167
1174
|
function contract() {
|
|
1168
1175
|
return "/logged/contract";
|
|
1169
|
-
} //
|
|
1176
|
+
} // 个人设置
|
|
1177
|
+
// interface SettingParamsType {
|
|
1170
1178
|
// }
|
|
1171
1179
|
|
|
1172
1180
|
function setting() {
|
|
@@ -1472,12 +1480,37 @@ function getUserIDByCookies() {
|
|
|
1472
1480
|
|
|
1473
1481
|
return Number(uid.replace('uid=', ''));
|
|
1474
1482
|
}
|
|
1483
|
+
function transformServerAPIContractState(_ref) {
|
|
1484
|
+
var status = _ref.status,
|
|
1485
|
+
authStatus = _ref.authStatus;
|
|
1486
|
+
|
|
1487
|
+
if (status === 0) {
|
|
1488
|
+
if (authStatus === 1 || authStatus === 3) {
|
|
1489
|
+
return 'active';
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
if (authStatus === 2) {
|
|
1493
|
+
return 'testActive';
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
if (authStatus === 128) {
|
|
1497
|
+
return 'inactive';
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
if (status === 1) {
|
|
1502
|
+
return 'terminal';
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
return 'exception';
|
|
1506
|
+
}
|
|
1475
1507
|
|
|
1476
1508
|
var Tool = {
|
|
1477
1509
|
__proto__: null,
|
|
1478
1510
|
getSHA1Hash: getSHA1Hash,
|
|
1479
1511
|
generateRandomCode: generateRandomCode,
|
|
1480
|
-
getUserIDByCookies: getUserIDByCookies
|
|
1512
|
+
getUserIDByCookies: getUserIDByCookies,
|
|
1513
|
+
transformServerAPIContractState: transformServerAPIContractState
|
|
1481
1514
|
};
|
|
1482
1515
|
|
|
1483
1516
|
var FUtil = {
|
|
@@ -2743,6 +2776,27 @@ var Event = {
|
|
|
2743
2776
|
transaction: transaction
|
|
2744
2777
|
};
|
|
2745
2778
|
|
|
2779
|
+
function list4Client(params) {
|
|
2780
|
+
return FUtil.Request({
|
|
2781
|
+
method: 'GET',
|
|
2782
|
+
url: "/v2/activities/list4Client",
|
|
2783
|
+
params: params
|
|
2784
|
+
});
|
|
2785
|
+
}
|
|
2786
|
+
function find4Client(params) {
|
|
2787
|
+
return FUtil.Request({
|
|
2788
|
+
method: 'GET',
|
|
2789
|
+
url: "/v2/activities/find4Client",
|
|
2790
|
+
params: params
|
|
2791
|
+
});
|
|
2792
|
+
}
|
|
2793
|
+
|
|
2794
|
+
var Activity = {
|
|
2795
|
+
__proto__: null,
|
|
2796
|
+
list4Client: list4Client,
|
|
2797
|
+
find4Client: find4Client
|
|
2798
|
+
};
|
|
2799
|
+
|
|
2746
2800
|
var FServiceAPI = {
|
|
2747
2801
|
Node: Node,
|
|
2748
2802
|
Exhibit: Exhibit,
|
|
@@ -2754,7 +2808,8 @@ var FServiceAPI = {
|
|
|
2754
2808
|
Contract: Contract,
|
|
2755
2809
|
Transaction: Transaction,
|
|
2756
2810
|
Captcha: Captcha,
|
|
2757
|
-
Event: Event
|
|
2811
|
+
Event: Event,
|
|
2812
|
+
Activity: Activity
|
|
2758
2813
|
};
|
|
2759
2814
|
|
|
2760
2815
|
export { FServiceAPI, FUtil };
|