dff-util 1.4.4 → 1.4.6
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/README.md +52 -4
- package/bun.lock +76 -0
- package/dist/main/const-keys.d.ts +1 -0
- package/dist/main/const-keys.js +1 -0
- package/dist/main/const-type.d.ts +45 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,7 +45,8 @@ Select a topic below to view its reference and examples.
|
|
|
45
45
|
| :--- | :--- | :--- | :--- | :--- |
|
|
46
46
|
| [LangDirType](#common-types) | [OrderType](#common-types) | [ThemeType](#common-types) | [UnixTimestampType](#common-types) | [OptionType](#common-types) |
|
|
47
47
|
| [FileType](#common-types) | [ResponseType](#request-and-response-types) | [SearchType](#request-and-response-types) | [KeyValueType](#request-and-response-types) | [JsonValueType](#request-and-response-types) |
|
|
48
|
-
| [RequestBodyType](#request-and-response-types) | [RequestParamType](#request-and-response-types) | [
|
|
48
|
+
| [RequestBodyType](#request-and-response-types) | [RequestParamType](#request-and-response-types) | [RequestQueryType](#request-and-response-types) | [RequestByIdType](#request-and-response-types) | [RequestByNameType](#request-and-response-types) |
|
|
49
|
+
| [RequestByTypeType](#request-and-response-types) | [RequestByCodeType](#request-and-response-types) | [PubSubEventType](#request-and-response-types) | [SessionUser](#session-user-sessionuser) | [SessionInfo](#session-information-sessioninfo) |
|
|
49
50
|
|
|
50
51
|
**[Constants and validation](#constants-and-validation)**
|
|
51
52
|
|
|
@@ -1211,19 +1212,65 @@ export type KeyValueType = {
|
|
|
1211
1212
|
[key: string]: any;
|
|
1212
1213
|
}
|
|
1213
1214
|
|
|
1214
|
-
|
|
1215
|
-
export type
|
|
1216
|
-
|
|
1215
|
+
|
|
1216
|
+
export type RequestQueryType = {
|
|
1217
|
+
query?: string;
|
|
1218
|
+
active?: boolean;
|
|
1219
|
+
data?: any;
|
|
1220
|
+
raw?: string;
|
|
1221
|
+
filters?: string;
|
|
1222
|
+
};
|
|
1223
|
+
|
|
1217
1224
|
export type RequestByIdType = {
|
|
1218
1225
|
id: string;
|
|
1226
|
+
query?: string;
|
|
1227
|
+
active?: boolean;
|
|
1228
|
+
data?: any;
|
|
1229
|
+
raw?: string;
|
|
1230
|
+
filters?: string;
|
|
1231
|
+
};
|
|
1232
|
+
|
|
1233
|
+
export type RequestByNameType = {
|
|
1234
|
+
name: string;
|
|
1235
|
+
query?: string;
|
|
1236
|
+
active?: boolean;
|
|
1237
|
+
data?: any;
|
|
1238
|
+
raw?: string;
|
|
1239
|
+
filters?: string;
|
|
1240
|
+
};
|
|
1241
|
+
|
|
1242
|
+
export type RequestByTypeType = {
|
|
1243
|
+
type: string;
|
|
1244
|
+
query?: string;
|
|
1245
|
+
active?: boolean;
|
|
1246
|
+
data?: any;
|
|
1247
|
+
raw?: string;
|
|
1248
|
+
filters?: string;
|
|
1249
|
+
};
|
|
1250
|
+
|
|
1251
|
+
export type RequestByCodeType = {
|
|
1252
|
+
code: string;
|
|
1253
|
+
query?: string;
|
|
1254
|
+
active?: boolean;
|
|
1255
|
+
data?: any;
|
|
1256
|
+
raw?: string;
|
|
1257
|
+
filters?: string;
|
|
1219
1258
|
};
|
|
1220
1259
|
|
|
1221
1260
|
export type PubSubEventType = {
|
|
1222
1261
|
id: string;
|
|
1223
1262
|
name?: string;
|
|
1263
|
+
query?: string;
|
|
1264
|
+
active?: boolean;
|
|
1265
|
+
data?: any;
|
|
1224
1266
|
raw?: string;
|
|
1267
|
+
filters?: string;
|
|
1225
1268
|
};
|
|
1226
1269
|
|
|
1270
|
+
export type JsonValueType = string | number | boolean | null | JsonValueType[] | { [key: string]: JsonValueType };
|
|
1271
|
+
export type RequestBodyType = Record<string, JsonValueType>;
|
|
1272
|
+
export type RequestParamType = Record<string, string | number | boolean | null>;
|
|
1273
|
+
|
|
1227
1274
|
```
|
|
1228
1275
|
|
|
1229
1276
|
### Session user (SessionUser)
|
|
@@ -1256,6 +1303,7 @@ export type SessionInfo = {
|
|
|
1256
1303
|
iat?: number;
|
|
1257
1304
|
exp?: number;
|
|
1258
1305
|
key: string;
|
|
1306
|
+
createdAt: string;
|
|
1259
1307
|
};
|
|
1260
1308
|
```
|
|
1261
1309
|
|
package/bun.lock
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lockfileVersion": 2,
|
|
3
|
+
"configVersion": 0,
|
|
4
|
+
"workspaces": {
|
|
5
|
+
"": {
|
|
6
|
+
"name": "dff-util",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"jwt-decode": "^4.0.0",
|
|
9
|
+
"jwt-encode": "^1.0.1",
|
|
10
|
+
"randomstring": "1.3.0",
|
|
11
|
+
},
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"@types/jwt-encode": "^1.0.3",
|
|
14
|
+
"@types/node": "^22.10.5",
|
|
15
|
+
"@types/randomstring": "^1.3.0",
|
|
16
|
+
"ts-node": "^10.9.2",
|
|
17
|
+
"typescript": "^5.7.2",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
"packages": {
|
|
22
|
+
"@cspotcode/source-map-support": ["@cspotcode/source-map-support@0.8.1", "", { "dependencies": { "@jridgewell/trace-mapping": "0.3.9" } }, "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw=="],
|
|
23
|
+
|
|
24
|
+
"@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="],
|
|
25
|
+
|
|
26
|
+
"@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.6.0", "", {}, "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw=="],
|
|
27
|
+
|
|
28
|
+
"@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.9", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ=="],
|
|
29
|
+
|
|
30
|
+
"@tsconfig/node10": ["@tsconfig/node10@1.0.13", "", {}, "sha512-gcLdvR9HO1ZJBypsOGqaP6TFEzb6vIta0KSTLt9NAQ6pXQO3cRgSVyCN6pzYqI9DlJgY71XKO0dpDhCf08b3pg=="],
|
|
31
|
+
|
|
32
|
+
"@tsconfig/node12": ["@tsconfig/node12@1.0.11", "", {}, "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag=="],
|
|
33
|
+
|
|
34
|
+
"@tsconfig/node14": ["@tsconfig/node14@1.0.3", "", {}, "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow=="],
|
|
35
|
+
|
|
36
|
+
"@tsconfig/node16": ["@tsconfig/node16@1.0.4", "", {}, "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA=="],
|
|
37
|
+
|
|
38
|
+
"@types/jwt-encode": ["@types/jwt-encode@1.0.3", "", {}, "sha512-4IAoiMbBSbiUfYkBZYvj6Sj68d5qaaYeHfeoxQp5qpYkjOPcou9chpfEqw7OfoTQxsrS6HnTVN/RTCF866Z9sw=="],
|
|
39
|
+
|
|
40
|
+
"@types/node": ["@types/node@22.20.2", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-xlvWf4Vs9n1PEVYwP1n4vvG07M6y8WgvJ2t0vbrWTmijsIHp1cS+uJ2kMIRdY3nHZK0nCYKrPeD171+SzF4/zw=="],
|
|
41
|
+
|
|
42
|
+
"@types/randomstring": ["@types/randomstring@1.3.0", "", {}, "sha512-kCP61wludjY7oNUeFiMxfswHB3Wn/aC03Cu82oQsNTO6OCuhVN/rCbBs68Cq6Nkgjmp2Sh3Js6HearJPkk7KQA=="],
|
|
43
|
+
|
|
44
|
+
"acorn": ["acorn@8.18.0", "", { "bin": "bin/acorn" }, "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ=="],
|
|
45
|
+
|
|
46
|
+
"acorn-walk": ["acorn-walk@8.3.5", "", { "dependencies": { "acorn": "^8.11.0" } }, "sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw=="],
|
|
47
|
+
|
|
48
|
+
"arg": ["arg@4.1.3", "", {}, "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA=="],
|
|
49
|
+
|
|
50
|
+
"create-require": ["create-require@1.1.1", "", {}, "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ=="],
|
|
51
|
+
|
|
52
|
+
"diff": ["diff@4.0.4", "", {}, "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ=="],
|
|
53
|
+
|
|
54
|
+
"jwt-decode": ["jwt-decode@4.0.0", "", {}, "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA=="],
|
|
55
|
+
|
|
56
|
+
"jwt-encode": ["jwt-encode@1.0.1", "", { "dependencies": { "ts.cryptojs256": "^1.0.1" } }, "sha512-QrGiNhynbAYyFdbC1GbjborzenSFs5Ga+2nE0uBokGXsH11xrgd1AX55HR7P+wGQyyZOn6LUO5iKlh74dlhBkA=="],
|
|
57
|
+
|
|
58
|
+
"make-error": ["make-error@1.3.6", "", {}, "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw=="],
|
|
59
|
+
|
|
60
|
+
"randombytes": ["randombytes@2.0.3", "", {}, "sha512-lDVjxQQFoCG1jcrP06LNo2lbWp4QTShEXnhActFBwYuHprllQV6VUpwreApsYqCgD+N1mHoqJ/BI/4eV4R2GYg=="],
|
|
61
|
+
|
|
62
|
+
"randomstring": ["randomstring@1.3.0", "", { "dependencies": { "randombytes": "2.0.3" }, "bin": "bin/randomstring" }, "sha512-gY7aQ4i1BgwZ8I1Op4YseITAyiDiajeZOPQUbIq9TPGPhUm5FX59izIaOpmKbME1nmnEiABf28d9K2VSii6BBg=="],
|
|
63
|
+
|
|
64
|
+
"ts-node": ["ts-node@10.9.2", "", { "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", "@tsconfig/node16": "^1.0.2", "acorn": "^8.4.1", "acorn-walk": "^8.1.1", "arg": "^4.1.0", "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, "peerDependencies": { "@swc/core": ">=1.2.50", "@swc/wasm": ">=1.2.50", "@types/node": "*", "typescript": ">=2.7" }, "optionalPeers": ["@swc/core", "@swc/wasm"], "bin": { "ts-node": "dist/bin.js", "ts-node-cwd": "dist/bin-cwd.js", "ts-node-esm": "dist/bin-esm.js", "ts-node-script": "dist/bin-script.js", "ts-node-transpile-only": "dist/bin-transpile.js", "ts-script": "dist/bin-script-deprecated.js" } }, "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ=="],
|
|
65
|
+
|
|
66
|
+
"ts.cryptojs256": ["ts.cryptojs256@1.0.1", "", {}, "sha512-9XtEgRVOZBCdpPcCEhfvv9I2AVXdvfI81I/KpFM0wEfbq5JVHlXH7bfIjGQmYrIHGiBEHKsIaStQ87k926J7dA=="],
|
|
67
|
+
|
|
68
|
+
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
|
69
|
+
|
|
70
|
+
"undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
|
|
71
|
+
|
|
72
|
+
"v8-compile-cache-lib": ["v8-compile-cache-lib@3.0.1", "", {}, "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg=="],
|
|
73
|
+
|
|
74
|
+
"yn": ["yn@3.1.1", "", {}, "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q=="],
|
|
75
|
+
}
|
|
76
|
+
}
|
package/dist/main/const-keys.js
CHANGED
|
@@ -104,6 +104,7 @@ exports.ConstKeys = {
|
|
|
104
104
|
HELLO: 'HELLO',
|
|
105
105
|
THANK_YOU: 'THANK_YOU',
|
|
106
106
|
TRY_AGAIN: 'TRY_AGAIN',
|
|
107
|
+
NOT_STARTED: 'NOT_STARTED',
|
|
107
108
|
UNDER_MAINTENANCE: 'UNDER_MAINTENANCE',
|
|
108
109
|
FEATURE_COMING_SOON: 'FEATURE_COMING_SOON',
|
|
109
110
|
CONTACT_SUPPORT: 'CONTACT_SUPPORT',
|
|
@@ -11,6 +11,7 @@ export type SessionInfo = {
|
|
|
11
11
|
iat?: number;
|
|
12
12
|
exp?: number;
|
|
13
13
|
key: string;
|
|
14
|
+
createdAt: string;
|
|
14
15
|
};
|
|
15
16
|
export type SessionUser = {
|
|
16
17
|
id: string;
|
|
@@ -46,19 +47,59 @@ export type SearchType = {
|
|
|
46
47
|
export type KeyValueType = {
|
|
47
48
|
[key: string]: any;
|
|
48
49
|
};
|
|
49
|
-
export type
|
|
50
|
-
|
|
50
|
+
export type RequestQueryType = {
|
|
51
|
+
query?: string;
|
|
52
|
+
active?: boolean;
|
|
53
|
+
data?: any;
|
|
54
|
+
raw?: string;
|
|
55
|
+
filters?: string;
|
|
51
56
|
};
|
|
52
|
-
export type RequestBodyType = Record<string, JsonValueType>;
|
|
53
|
-
export type RequestParamType = Record<string, string | number | boolean | null>;
|
|
54
57
|
export type RequestByIdType = {
|
|
55
58
|
id: string;
|
|
59
|
+
query?: string;
|
|
60
|
+
active?: boolean;
|
|
61
|
+
data?: any;
|
|
62
|
+
raw?: string;
|
|
63
|
+
filters?: string;
|
|
64
|
+
};
|
|
65
|
+
export type RequestByNameType = {
|
|
66
|
+
name: string;
|
|
67
|
+
query?: string;
|
|
68
|
+
active?: boolean;
|
|
69
|
+
data?: any;
|
|
70
|
+
raw?: string;
|
|
71
|
+
filters?: string;
|
|
72
|
+
};
|
|
73
|
+
export type RequestByTypeType = {
|
|
74
|
+
type: string;
|
|
75
|
+
query?: string;
|
|
76
|
+
active?: boolean;
|
|
77
|
+
data?: any;
|
|
78
|
+
raw?: string;
|
|
79
|
+
filters?: string;
|
|
80
|
+
};
|
|
81
|
+
export type RequestByCodeType = {
|
|
82
|
+
code: string;
|
|
83
|
+
query?: string;
|
|
84
|
+
active?: boolean;
|
|
85
|
+
data?: any;
|
|
86
|
+
raw?: string;
|
|
87
|
+
filters?: string;
|
|
56
88
|
};
|
|
57
89
|
export type PubSubEventType = {
|
|
58
90
|
id: string;
|
|
59
91
|
name?: string;
|
|
92
|
+
query?: string;
|
|
93
|
+
active?: boolean;
|
|
94
|
+
data?: any;
|
|
60
95
|
raw?: string;
|
|
96
|
+
filters?: string;
|
|
61
97
|
};
|
|
98
|
+
export type JsonValueType = string | number | boolean | null | JsonValueType[] | {
|
|
99
|
+
[key: string]: JsonValueType;
|
|
100
|
+
};
|
|
101
|
+
export type RequestBodyType = Record<string, JsonValueType>;
|
|
102
|
+
export type RequestParamType = Record<string, string | number | boolean | null>;
|
|
62
103
|
export type CountryType = {
|
|
63
104
|
code: string;
|
|
64
105
|
name: string;
|