@etsoo/appscript 1.2.78 → 1.2.79
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/lib/cjs/business/BusinessUtils.d.ts +9 -0
- package/lib/cjs/business/BusinessUtils.js +14 -0
- package/lib/cjs/rq/TiplistRQ.d.ts +9 -4
- package/lib/mjs/business/BusinessUtils.d.ts +9 -0
- package/lib/mjs/business/BusinessUtils.js +14 -0
- package/lib/mjs/rq/TiplistRQ.d.ts +9 -4
- package/package.json +5 -5
- package/src/business/BusinessUtils.ts +14 -0
- package/src/rq/TiplistRQ.ts +11 -4
|
@@ -61,4 +61,13 @@ export declare namespace BusinessUtils {
|
|
|
61
61
|
* @returns Units
|
|
62
62
|
*/
|
|
63
63
|
function getRepeatOptions(func: ICultureGet, options?: string[], isJoined?: boolean): IdLabelDto[];
|
|
64
|
+
/**
|
|
65
|
+
* Set id value
|
|
66
|
+
* @param item QueryRQ or TiplistRQ or similiar item
|
|
67
|
+
* @param id Id value
|
|
68
|
+
*/
|
|
69
|
+
function setIdValue<T extends {
|
|
70
|
+
id?: number;
|
|
71
|
+
sid?: string;
|
|
72
|
+
}>(item: T, id?: DataTypes.IdType): void;
|
|
64
73
|
}
|
|
@@ -127,4 +127,18 @@ var BusinessUtils;
|
|
|
127
127
|
return getUnits(func, options, isJoined);
|
|
128
128
|
}
|
|
129
129
|
BusinessUtils.getRepeatOptions = getRepeatOptions;
|
|
130
|
+
/**
|
|
131
|
+
* Set id value
|
|
132
|
+
* @param item QueryRQ or TiplistRQ or similiar item
|
|
133
|
+
* @param id Id value
|
|
134
|
+
*/
|
|
135
|
+
function setIdValue(item, id) {
|
|
136
|
+
if (id == null)
|
|
137
|
+
return;
|
|
138
|
+
if (typeof id === 'number')
|
|
139
|
+
item.id = id;
|
|
140
|
+
else
|
|
141
|
+
item.sid = id;
|
|
142
|
+
}
|
|
143
|
+
BusinessUtils.setIdValue = setIdValue;
|
|
130
144
|
})(BusinessUtils = exports.BusinessUtils || (exports.BusinessUtils = {}));
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
+
import { DataTypes } from '@etsoo/shared';
|
|
1
2
|
/**
|
|
2
3
|
* Tiplist request data
|
|
3
4
|
* com.etsoo.CoreFramework.Models.TiplistRQ
|
|
4
5
|
*/
|
|
5
|
-
export declare type TiplistRQ
|
|
6
|
+
export declare type TiplistRQ = {
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
+
* number id
|
|
8
9
|
*/
|
|
9
|
-
id
|
|
10
|
+
id?: number;
|
|
11
|
+
/**
|
|
12
|
+
* String id
|
|
13
|
+
*/
|
|
14
|
+
sid?: string;
|
|
10
15
|
/**
|
|
11
16
|
* Excluded ids
|
|
12
17
|
*/
|
|
13
|
-
excludedIds?:
|
|
18
|
+
excludedIds?: DataTypes.IdType[];
|
|
14
19
|
/**
|
|
15
20
|
* Filter keyword
|
|
16
21
|
*/
|
|
@@ -61,4 +61,13 @@ export declare namespace BusinessUtils {
|
|
|
61
61
|
* @returns Units
|
|
62
62
|
*/
|
|
63
63
|
function getRepeatOptions(func: ICultureGet, options?: string[], isJoined?: boolean): IdLabelDto[];
|
|
64
|
+
/**
|
|
65
|
+
* Set id value
|
|
66
|
+
* @param item QueryRQ or TiplistRQ or similiar item
|
|
67
|
+
* @param id Id value
|
|
68
|
+
*/
|
|
69
|
+
function setIdValue<T extends {
|
|
70
|
+
id?: number;
|
|
71
|
+
sid?: string;
|
|
72
|
+
}>(item: T, id?: DataTypes.IdType): void;
|
|
64
73
|
}
|
|
@@ -124,4 +124,18 @@ export var BusinessUtils;
|
|
|
124
124
|
return getUnits(func, options, isJoined);
|
|
125
125
|
}
|
|
126
126
|
BusinessUtils.getRepeatOptions = getRepeatOptions;
|
|
127
|
+
/**
|
|
128
|
+
* Set id value
|
|
129
|
+
* @param item QueryRQ or TiplistRQ or similiar item
|
|
130
|
+
* @param id Id value
|
|
131
|
+
*/
|
|
132
|
+
function setIdValue(item, id) {
|
|
133
|
+
if (id == null)
|
|
134
|
+
return;
|
|
135
|
+
if (typeof id === 'number')
|
|
136
|
+
item.id = id;
|
|
137
|
+
else
|
|
138
|
+
item.sid = id;
|
|
139
|
+
}
|
|
140
|
+
BusinessUtils.setIdValue = setIdValue;
|
|
127
141
|
})(BusinessUtils || (BusinessUtils = {}));
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
+
import { DataTypes } from '@etsoo/shared';
|
|
1
2
|
/**
|
|
2
3
|
* Tiplist request data
|
|
3
4
|
* com.etsoo.CoreFramework.Models.TiplistRQ
|
|
4
5
|
*/
|
|
5
|
-
export declare type TiplistRQ
|
|
6
|
+
export declare type TiplistRQ = {
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
+
* number id
|
|
8
9
|
*/
|
|
9
|
-
id
|
|
10
|
+
id?: number;
|
|
11
|
+
/**
|
|
12
|
+
* String id
|
|
13
|
+
*/
|
|
14
|
+
sid?: string;
|
|
10
15
|
/**
|
|
11
16
|
* Excluded ids
|
|
12
17
|
*/
|
|
13
|
-
excludedIds?:
|
|
18
|
+
excludedIds?: DataTypes.IdType[];
|
|
14
19
|
/**
|
|
15
20
|
* Filter keyword
|
|
16
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/appscript",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.79",
|
|
4
4
|
"description": "Applications shared TypeScript framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -54,19 +54,19 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@etsoo/notificationbase": "^1.1.6",
|
|
56
56
|
"@etsoo/restclient": "^1.0.70",
|
|
57
|
-
"@etsoo/shared": "^1.1.
|
|
57
|
+
"@etsoo/shared": "^1.1.46",
|
|
58
58
|
"@types/crypto-js": "^4.1.1",
|
|
59
59
|
"crypto-js": "^4.1.1"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@babel/cli": "^7.18.10",
|
|
63
|
-
"@babel/core": "^7.18.
|
|
63
|
+
"@babel/core": "^7.18.13",
|
|
64
64
|
"@babel/plugin-transform-runtime": "^7.18.10",
|
|
65
65
|
"@babel/preset-env": "^7.18.10",
|
|
66
66
|
"@babel/runtime-corejs3": "^7.18.9",
|
|
67
67
|
"@types/jest": "^28.1.7",
|
|
68
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
69
|
-
"@typescript-eslint/parser": "^5.
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^5.34.0",
|
|
69
|
+
"@typescript-eslint/parser": "^5.34.0",
|
|
70
70
|
"eslint": "^8.22.0",
|
|
71
71
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
72
72
|
"eslint-plugin-import": "^2.26.0",
|
|
@@ -167,4 +167,18 @@ export namespace BusinessUtils {
|
|
|
167
167
|
|
|
168
168
|
return getUnits(func, options, isJoined);
|
|
169
169
|
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Set id value
|
|
173
|
+
* @param item QueryRQ or TiplistRQ or similiar item
|
|
174
|
+
* @param id Id value
|
|
175
|
+
*/
|
|
176
|
+
export function setIdValue<T extends { id?: number; sid?: string }>(
|
|
177
|
+
item: T,
|
|
178
|
+
id?: DataTypes.IdType
|
|
179
|
+
) {
|
|
180
|
+
if (id == null) return;
|
|
181
|
+
if (typeof id === 'number') item.id = id;
|
|
182
|
+
else item.sid = id;
|
|
183
|
+
}
|
|
170
184
|
}
|
package/src/rq/TiplistRQ.ts
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
|
+
import { DataTypes } from '@etsoo/shared';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Tiplist request data
|
|
3
5
|
* com.etsoo.CoreFramework.Models.TiplistRQ
|
|
4
6
|
*/
|
|
5
|
-
export type TiplistRQ
|
|
7
|
+
export type TiplistRQ = {
|
|
8
|
+
/**
|
|
9
|
+
* number id
|
|
10
|
+
*/
|
|
11
|
+
id?: number;
|
|
12
|
+
|
|
6
13
|
/**
|
|
7
|
-
*
|
|
14
|
+
* String id
|
|
8
15
|
*/
|
|
9
|
-
|
|
16
|
+
sid?: string;
|
|
10
17
|
|
|
11
18
|
/**
|
|
12
19
|
* Excluded ids
|
|
13
20
|
*/
|
|
14
|
-
excludedIds?:
|
|
21
|
+
excludedIds?: DataTypes.IdType[];
|
|
15
22
|
|
|
16
23
|
/**
|
|
17
24
|
* Filter keyword
|