@freelog/tools-lib 0.1.115 → 0.1.118

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.
@@ -19,4 +19,13 @@ interface AdsDetailsParamsType {
19
19
  place: 1 | 2 | 3 | 4;
20
20
  }
21
21
  export declare function adsDetails(params: AdsDetailsParamsType): Promise<any>;
22
+ interface GetBaseTaskInfoParamsType {
23
+ }
24
+ export declare function getBaseTaskInfo(params?: GetBaseTaskInfoParamsType): Promise<any>;
25
+ interface GetResourceTaskInfoParamsType {
26
+ }
27
+ export declare function getResourceTaskInfo(params?: GetResourceTaskInfoParamsType): Promise<any>;
28
+ interface GetNodeTaskInfoParamsType {
29
+ }
30
+ export declare function getNodeTaskInfo(params?: GetNodeTaskInfoParamsType): Promise<any>;
22
31
  export {};
@@ -66,6 +66,7 @@ interface ListParamsType {
66
66
  projection?: string;
67
67
  sort?: string;
68
68
  userId?: number;
69
+ isLoadFreezeReason?: 0 | 1;
69
70
  }
70
71
  interface ListReturnType extends CommonReturn {
71
72
  data: IResourceInfo[];
@@ -77,6 +78,7 @@ interface InfoParamsType {
77
78
  isTranslate?: 0 | 1;
78
79
  isLoadLatestVersionInfo?: 0 | 1;
79
80
  projection?: string;
81
+ isLoadFreezeReason?: 0 | 1;
80
82
  }
81
83
  interface InfoReturnType extends CommonReturn {
82
84
  data: IResourceInfo;
@@ -89,6 +91,7 @@ interface BatchInfoParamsType {
89
91
  isTranslate?: 0 | 1;
90
92
  isLoadLatestVersionInfo?: 0 | 1;
91
93
  projection?: string;
94
+ isLoadFreezeReason?: 0 | 1;
92
95
  }
93
96
  interface BatchInfoReturnType extends CommonReturn {
94
97
  data: IResourceInfo[];
@@ -11,7 +11,6 @@ interface LogoutParamsType {
11
11
  returnUrl?: string;
12
12
  }
13
13
  export declare function logout({ ...params }?: LogoutParamsType): Promise<any>;
14
- export declare function currentUserInfo(): Promise<any>;
15
14
  interface UsersParamsType {
16
15
  skip?: number;
17
16
  limit?: number;
@@ -22,6 +21,13 @@ interface UsersParamsType {
22
21
  endRegisteredDate?: string;
23
22
  }
24
23
  export declare function users(params: UsersParamsType): Promise<any>;
24
+ interface BatchUserListParamsType {
25
+ userIds: string;
26
+ }
27
+ export declare function batchUserList(params: BatchUserListParamsType): Promise<any>;
28
+ interface CurrentUserInfoParamsType {
29
+ }
30
+ export declare function currentUserInfo({}?: CurrentUserInfoParamsType): Promise<any>;
25
31
  interface UserDetailsParamsType {
26
32
  mobile?: string;
27
33
  username?: string;
@@ -1195,55 +1195,70 @@ function exception403(_temp12) {
1195
1195
  from: fromUrl
1196
1196
  });
1197
1197
  }
1198
+ function nodeFreeze(_ref27) {
1199
+ var nodeID = _ref27.nodeID;
1200
+ return "/result/node/freeze/" + nodeID;
1201
+ }
1202
+ function resourceFreeze(_ref28) {
1203
+ var resourceID = _ref28.resourceID;
1204
+ return "/result/resource/freeze/" + resourceID;
1205
+ }
1198
1206
  function login(_temp13) {
1199
- var _ref27 = _temp13 === void 0 ? {} : _temp13,
1200
- goTo = _ref27.goTo;
1207
+ var _ref29 = _temp13 === void 0 ? {} : _temp13,
1208
+ goTo = _ref29.goTo;
1201
1209
 
1202
1210
  return "/login" + handleQuery({
1203
1211
  goTo: goTo ? encodeURIComponent(goTo) : undefined
1204
1212
  });
1205
1213
  }
1206
1214
  function logon(_temp14) {
1207
- var _ref28 = _temp14 === void 0 ? {} : _temp14,
1208
- goTo = _ref28.goTo;
1215
+ var _ref30 = _temp14 === void 0 ? {} : _temp14,
1216
+ goTo = _ref30.goTo;
1209
1217
 
1210
1218
  return "/logon" + handleQuery({
1211
1219
  goTo: goTo ? encodeURIComponent(goTo) : undefined
1212
1220
  });
1213
1221
  }
1214
1222
  function retrieveUserPassword(_temp15) {
1215
- var _ref29 = _temp15 === void 0 ? {} : _temp15,
1216
- goTo = _ref29.goTo;
1223
+ var _ref31 = _temp15 === void 0 ? {} : _temp15,
1224
+ goTo = _ref31.goTo;
1217
1225
 
1218
1226
  return "/retrieve" + handleQuery({
1219
1227
  goTo: goTo ? encodeURIComponent(goTo) : undefined
1220
1228
  });
1221
1229
  }
1222
1230
  function retrievePayPassword(_temp16) {
1223
- var _ref30 = _temp16 === void 0 ? {} : _temp16;
1231
+ var _ref32 = _temp16 === void 0 ? {} : _temp16;
1224
1232
 
1225
- _objectDestructuringEmpty(_ref30);
1233
+ _objectDestructuringEmpty(_ref32);
1226
1234
 
1227
1235
  return "/retrievePayPassword";
1228
1236
  }
1229
- function wallet(_temp17) {
1230
- var _ref31 = _temp17 === void 0 ? {} : _temp17;
1237
+ function userFreeze(_temp17) {
1238
+ var _ref33 = _temp17 === void 0 ? {} : _temp17;
1239
+
1240
+ _objectDestructuringEmpty(_ref33);
1241
+
1242
+ return "/freeze";
1243
+ }
1244
+ function wallet(_temp18) {
1245
+ var _ref34 = _temp18 === void 0 ? {} : _temp18;
1231
1246
 
1232
- _objectDestructuringEmpty(_ref31);
1247
+ _objectDestructuringEmpty(_ref34);
1233
1248
 
1234
1249
  return "/logged/wallet";
1235
1250
  }
1236
- function contract(_temp18) {
1237
- var _ref32 = _temp18 === void 0 ? {} : _temp18;
1251
+ function contract(_temp19) {
1252
+ var _ref35 = _temp19 === void 0 ? {} : _temp19;
1238
1253
 
1239
- _objectDestructuringEmpty(_ref32);
1254
+ _objectDestructuringEmpty(_ref35);
1240
1255
 
1241
1256
  return "/logged/contract";
1242
1257
  }
1243
- function setting(_temp19) {
1244
- var _ref33 = _temp19 === void 0 ? {} : _temp19;
1258
+ function setting(_temp20) {
1259
+ var _ref36 = _temp20 === void 0 ? {} : _temp20;
1245
1260
 
1246
- _objectDestructuringEmpty(_ref33);
1261
+ _objectDestructuringEmpty(_ref36);
1247
1262
 
1248
1263
  return "/logged/setting";
1249
1264
  }
@@ -1294,10 +1309,13 @@ var LinkTo = {
1294
1309
  nodeCreateSuccess: nodeCreateSuccess,
1295
1310
  invitation: invitation,
1296
1311
  exception403: exception403,
1312
+ nodeFreeze: nodeFreeze,
1313
+ resourceFreeze: resourceFreeze,
1297
1314
  login: login,
1298
1315
  logon: logon,
1299
1316
  retrieveUserPassword: retrieveUserPassword,
1300
1317
  retrievePayPassword: retrievePayPassword,
1318
+ userFreeze: userFreeze,
1301
1319
  wallet: wallet,
1302
1320
  contract: contract,
1303
1321
  setting: setting
@@ -2182,9 +2200,6 @@ function logout(_temp) {
2182
2200
  var _ref2 = _temp === void 0 ? {} : _temp,
2183
2201
  params = _extends({}, _ref2);
2184
2202
 
2185
- // return FUtil.Axios.get(`/passport/logout`, {
2186
- // params,
2187
- // });
2188
2203
  return FUtil.Request({
2189
2204
  method: 'GET',
2190
2205
  url: '/v2/passport/logout',
@@ -2192,24 +2207,32 @@ function logout(_temp) {
2192
2207
  }, {
2193
2208
  noRedirect: true
2194
2209
  });
2195
- } // 获取当前登录用户信息
2196
- // interface CurrentUserInfoParamsType {
2197
- // }
2198
-
2199
- function currentUserInfo() {
2200
- // return FUtil.Axios.get(`/v1/userinfos/current`);
2210
+ }
2211
+ function users(params) {
2201
2212
  return FUtil.Request({
2202
2213
  method: 'GET',
2203
- url: '/v2/users/current'
2214
+ url: "/v2/users",
2215
+ params: params
2204
2216
  });
2205
2217
  }
2206
- function users(params) {
2218
+ function batchUserList(params) {
2207
2219
  return FUtil.Request({
2208
2220
  method: 'GET',
2209
- url: "/v2/users",
2221
+ url: "/v2/users/list",
2210
2222
  params: params
2211
2223
  });
2212
2224
  }
2225
+ function currentUserInfo(_temp2) {
2226
+ var _ref3 = _temp2 === void 0 ? {} : _temp2;
2227
+
2228
+ _objectDestructuringEmpty(_ref3);
2229
+
2230
+ // return FUtil.Axios.get(`/v1/userinfos/current`);
2231
+ return FUtil.Request({
2232
+ method: 'GET',
2233
+ url: '/v2/users/current'
2234
+ });
2235
+ }
2213
2236
  function userDetails(params) {
2214
2237
  return FUtil.Request({
2215
2238
  method: 'GET',
@@ -2224,9 +2247,9 @@ function logon$1(params) {
2224
2247
  data: params
2225
2248
  });
2226
2249
  }
2227
- function resetPassword(_ref3) {
2228
- var loginName = _ref3.loginName,
2229
- params = _objectWithoutPropertiesLoose(_ref3, _excluded$4);
2250
+ function resetPassword(_ref4) {
2251
+ var loginName = _ref4.loginName,
2252
+ params = _objectWithoutPropertiesLoose(_ref4, _excluded$4);
2230
2253
 
2231
2254
  return FUtil.Request({
2232
2255
  method: 'PUT',
@@ -2324,8 +2347,9 @@ var User = {
2324
2347
  __proto__: null,
2325
2348
  login: login$1,
2326
2349
  logout: logout,
2327
- currentUserInfo: currentUserInfo,
2328
2350
  users: users,
2351
+ batchUserList: batchUserList,
2352
+ currentUserInfo: currentUserInfo,
2329
2353
  userDetails: userDetails,
2330
2354
  logon: logon$1,
2331
2355
  resetPassword: resetPassword,
@@ -2706,13 +2730,49 @@ function adsDetails(params) {
2706
2730
  params: params
2707
2731
  });
2708
2732
  }
2733
+ function getBaseTaskInfo(params) {
2734
+ if (params === void 0) {
2735
+ params = {};
2736
+ }
2737
+
2738
+ return FUtil.Request({
2739
+ method: 'GET',
2740
+ url: "/v2/activities/facade/getBaseTaskInfo",
2741
+ params: params
2742
+ });
2743
+ }
2744
+ function getResourceTaskInfo(params) {
2745
+ if (params === void 0) {
2746
+ params = {};
2747
+ }
2748
+
2749
+ return FUtil.Request({
2750
+ method: 'GET',
2751
+ url: "/v2/activities/facade/getResourceTaskInfo",
2752
+ params: params
2753
+ });
2754
+ }
2755
+ function getNodeTaskInfo(params) {
2756
+ if (params === void 0) {
2757
+ params = {};
2758
+ }
2759
+
2760
+ return FUtil.Request({
2761
+ method: 'GET',
2762
+ url: "/v2/activities/facade/getNodeTaskInfo",
2763
+ params: params
2764
+ });
2765
+ }
2709
2766
 
2710
2767
  var Activity = {
2711
2768
  __proto__: null,
2712
2769
  list4Client: list4Client,
2713
2770
  find4Client: find4Client,
2714
2771
  adsList: adsList,
2715
- adsDetails: adsDetails
2772
+ adsDetails: adsDetails,
2773
+ getBaseTaskInfo: getBaseTaskInfo,
2774
+ getResourceTaskInfo: getResourceTaskInfo,
2775
+ getNodeTaskInfo: getNodeTaskInfo
2716
2776
  };
2717
2777
 
2718
2778
  var _excluded$9 = ["recordId"];
@@ -3154,7 +3214,7 @@ function _request() {
3154
3214
  case 3:
3155
3215
  result = _context.sent;
3156
3216
 
3157
- if (!((result.errCode === 30 || result.errCode === 30) && !noRedirect)) {
3217
+ if (!(result.ret === 0 && result.errCode === 30 && !noRedirect)) {
3158
3218
  _context.next = 8;
3159
3219
  break;
3160
3220
  }
@@ -3168,10 +3228,15 @@ function _request() {
3168
3228
  }));
3169
3229
 
3170
3230
  case 8:
3231
+ if (result.ret === 4 && result.errCode === 10 && !noRedirect) {
3232
+ window.location.replace("" + completeUrlByDomain('user') + userFreeze({
3233
+ goTo: window.location.href
3234
+ }));
3235
+ }
3171
3236
 
3172
3237
  return _context.abrupt("return", result);
3173
3238
 
3174
- case 10:
3239
+ case 11:
3175
3240
  case "end":
3176
3241
  return _context.stop();
3177
3242
  }