@freelog/tools-lib 0.1.132 → 0.1.133

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 (41) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +103 -103
  3. package/dist/service-API/policies.d.ts +1 -1
  4. package/dist/service-API/recombinations/index.d.ts +4 -1
  5. package/dist/tools-lib.cjs.development.js +214 -197
  6. package/dist/tools-lib.cjs.development.js.map +1 -1
  7. package/dist/tools-lib.cjs.production.min.js +1 -1
  8. package/dist/tools-lib.cjs.production.min.js.map +1 -1
  9. package/dist/tools-lib.esm.js +214 -197
  10. package/dist/tools-lib.esm.js.map +1 -1
  11. package/dist/utils/format.d.ts +0 -4
  12. package/package.json +1 -1
  13. package/src/i18n/I18nNext.ts +154 -154
  14. package/src/i18n/index.ts +7 -7
  15. package/src/index.ts +9 -9
  16. package/src/service-API/activities.ts +231 -231
  17. package/src/service-API/captcha.ts +30 -30
  18. package/src/service-API/collections.ts +81 -81
  19. package/src/service-API/contracts.ts +101 -101
  20. package/src/service-API/events.ts +18 -18
  21. package/src/service-API/i18n.ts +35 -35
  22. package/src/service-API/index.ts +39 -39
  23. package/src/service-API/informalNodes.ts +238 -238
  24. package/src/service-API/nodes.ts +65 -65
  25. package/src/service-API/policies.ts +75 -72
  26. package/src/service-API/presentables.ts +287 -287
  27. package/src/service-API/recombinations/index.ts +92 -69
  28. package/src/service-API/resources.ts +532 -532
  29. package/src/service-API/statistics.ts +20 -20
  30. package/src/service-API/storages.ts +358 -358
  31. package/src/service-API/testQualifications.ts +109 -109
  32. package/src/service-API/tools/index.ts +10 -10
  33. package/src/service-API/transactions.ts +109 -109
  34. package/src/service-API/user.ts +270 -270
  35. package/src/utils/axios.ts +145 -145
  36. package/src/utils/format.ts +98 -98
  37. package/src/utils/index.ts +20 -20
  38. package/src/utils/linkTo.ts +399 -399
  39. package/src/utils/predefined.ts +37 -37
  40. package/src/utils/regexp.ts +52 -52
  41. package/src/utils/tools.ts +85 -85
@@ -1,72 +1,75 @@
1
- import FUtil from '../utils';
2
-
3
- // 批量获取授权策略列表
4
- interface PoliciesParamsType {
5
- page?: number;
6
- pageSize?: number;
7
- subjectType?: 1 | 2 | 3; // 1:资源 2:展品 3:用户组
8
- projection?: string;
9
- }
10
-
11
- export function policies(params: PoliciesParamsType) {
12
- return FUtil.Request({
13
- method: 'GET',
14
- url: `/v2/policies`,
15
- params: params,
16
- });
17
- }
18
-
19
- // 批量获取授权策略列表
20
- interface PoliciesListParamsType {
21
- policyIds: string;
22
- subjectType?: number;
23
- userId?: number;
24
- projection?: string;
25
- }
26
-
27
- export function policiesList(params: PoliciesListParamsType) {
28
- return FUtil.Request({
29
- method: 'GET',
30
- url: `/v2/policies/list`,
31
- params: params,
32
- });
33
- }
34
-
35
- // 策略模板
36
- interface PolicyTemplatesParamsType {
37
- }
38
-
39
- export function policyTemplates(params: PolicyTemplatesParamsType = {}) {
40
- return FUtil.Request({
41
- method: 'GET',
42
- url: `/v2/translate/translate-config/list4Client`,
43
- params: params,
44
- });
45
- }
46
-
47
- // 模板策略翻译
48
- interface PolicyTranslationParamsType {
49
- contract: string;
50
- }
51
-
52
- export function policyTranslation(params: PolicyTranslationParamsType) {
53
- return FUtil.Request({
54
- method: 'POST',
55
- url: `/v2/translate/translate`,
56
- data: params,
57
- });
58
- }
59
-
60
- // 模板策略翻译
61
- interface PolicyTransferTranslationParamsType {
62
- contract: string;
63
- fsmTransfers: any;
64
- }
65
-
66
- export function policyTransferTranslation(params: PolicyTransferTranslationParamsType) {
67
- return FUtil.Request({
68
- method: 'POST',
69
- url: `/v2/translate/transfer`,
70
- data: params,
71
- });
72
- }
1
+ // import {Base64} from 'js-base64';
2
+ import FUtil from '../utils';
3
+
4
+ // 批量获取授权策略列表
5
+ interface PoliciesParamsType {
6
+ page?: number;
7
+ pageSize?: number;
8
+ subjectType?: 1 | 2 | 3; // 1:资源 2:展品 3:用户组
9
+ projection?: string;
10
+ }
11
+
12
+ export function policies(params: PoliciesParamsType) {
13
+ return FUtil.Request({
14
+ method: 'GET',
15
+ url: `/v2/policies`,
16
+ params: params,
17
+ });
18
+ }
19
+
20
+ // 批量获取授权策略列表
21
+ interface PoliciesListParamsType {
22
+ policyIds: string;
23
+ subjectType?: number;
24
+ userId?: number;
25
+ projection?: string;
26
+ }
27
+
28
+ export function policiesList(params: PoliciesListParamsType) {
29
+ return FUtil.Request({
30
+ method: 'GET',
31
+ url: `/v2/policies/list`,
32
+ params: params,
33
+ });
34
+ }
35
+
36
+ // 策略模板
37
+ interface PolicyTemplatesParamsType {
38
+ }
39
+
40
+ export function policyTemplates(params: PolicyTemplatesParamsType = {}) {
41
+ return FUtil.Request({
42
+ method: 'GET',
43
+ url: `/v2/translate/translate-config/list4Client`,
44
+ params: params,
45
+ });
46
+ }
47
+
48
+ // 模板策略翻译
49
+ interface PolicyTranslationParamsType {
50
+ contract: string;
51
+ }
52
+
53
+ export function policyTranslation({contract}: PolicyTranslationParamsType) {
54
+ return FUtil.Request({
55
+ method: 'POST',
56
+ url: `/v2/translate/translate`,
57
+ data: {
58
+ contract: contract,
59
+ },
60
+ });
61
+ }
62
+
63
+ // 模板策略翻译
64
+ interface PolicyTransferTranslationParamsType {
65
+ contract: string;
66
+ fsmTransfers: any;
67
+ }
68
+
69
+ export function policyTransferTranslation(params: PolicyTransferTranslationParamsType) {
70
+ return FUtil.Request({
71
+ method: 'POST',
72
+ url: `/v2/translate/transfer`,
73
+ data: params,
74
+ });
75
+ }