@session.js/consts 1.0.0 → 1.0.2
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/index.d.ts +61 -0
- package/package.json +3 -2
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/** in milliseconds */
|
|
2
|
+
export declare const DURATION: {
|
|
3
|
+
/** 1000ms */
|
|
4
|
+
SECONDS: number;
|
|
5
|
+
/** 60 * 1000 = 60,000 ms */
|
|
6
|
+
MINUTES: number;
|
|
7
|
+
/** 60 * 60 * 1000 = 3,600,000 ms */
|
|
8
|
+
HOURS: number;
|
|
9
|
+
/** 24 * 60 * 60 * 1000 = 86,400,000 ms */
|
|
10
|
+
DAYS: number;
|
|
11
|
+
/** 7 * 24 * 60 * 60 * 1000 = 604,800,000 ms */
|
|
12
|
+
WEEKS: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const TTL_DEFAULT: {
|
|
15
|
+
/** 20 seconds */
|
|
16
|
+
TYPING_MESSAGE: number;
|
|
17
|
+
/** 5 minutes */
|
|
18
|
+
CALL_MESSAGE: number;
|
|
19
|
+
/** 14 days */
|
|
20
|
+
CONTENT_MESSAGE: number;
|
|
21
|
+
/** 30 days */
|
|
22
|
+
CONFIG_MESSAGE: number;
|
|
23
|
+
};
|
|
24
|
+
export declare const SWARM_POLLING_TIMEOUT: {
|
|
25
|
+
/** 5 seconds */
|
|
26
|
+
ACTIVE: number;
|
|
27
|
+
/** 1 minute */
|
|
28
|
+
MEDIUM_ACTIVE: number;
|
|
29
|
+
/** 2 minutes */
|
|
30
|
+
INACTIVE: number;
|
|
31
|
+
};
|
|
32
|
+
export declare const PROTOCOLS: {
|
|
33
|
+
HTTP: string;
|
|
34
|
+
HTTPS: string;
|
|
35
|
+
};
|
|
36
|
+
export declare const CONVERSATION: {
|
|
37
|
+
readonly DEFAULT_MEDIA_FETCH_COUNT: 50;
|
|
38
|
+
readonly DEFAULT_DOCUMENTS_FETCH_COUNT: 100;
|
|
39
|
+
readonly DEFAULT_MESSAGE_FETCH_COUNT: 30;
|
|
40
|
+
readonly MAX_MESSAGE_FETCH_COUNT: 1000;
|
|
41
|
+
/** in seconds */
|
|
42
|
+
readonly MAX_VOICE_MESSAGE_DURATION: 300;
|
|
43
|
+
readonly MAX_CONVO_UNREAD_COUNT: 999;
|
|
44
|
+
readonly MAX_GLOBAL_UNREAD_COUNT: 99;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* The file server and onion request max upload size is 10MB precisely.
|
|
48
|
+
* 10MB is still ok, but one byte more is not.
|
|
49
|
+
*/
|
|
50
|
+
export declare const MAX_ATTACHMENT_FILESIZE_BYTES: number;
|
|
51
|
+
export declare const VALIDATION: {
|
|
52
|
+
MAX_GROUP_NAME_LENGTH: number;
|
|
53
|
+
CLOSED_GROUP_SIZE_LIMIT: number;
|
|
54
|
+
};
|
|
55
|
+
export declare const DEFAULT_RECENT_REACTS: string[];
|
|
56
|
+
export declare const REACT_LIMIT = 6;
|
|
57
|
+
export declare const MAX_USERNAME_BYTES = 64;
|
|
58
|
+
export declare const FEATURE_RELEASE_TIMESTAMPS: {
|
|
59
|
+
DISAPPEARING_MESSAGES_V2: number;
|
|
60
|
+
USER_CONFIG: number;
|
|
61
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@session.js/consts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"module": "src/index.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"description": "Session Desktop & Session.js constants",
|
|
17
17
|
"type": "module",
|
|
18
18
|
"files": [
|
|
19
|
-
"dist/index.js"
|
|
19
|
+
"dist/index.js",
|
|
20
|
+
"dist/index.d.ts"
|
|
20
21
|
],
|
|
21
22
|
"scripts": {
|
|
22
23
|
"build": "tsc --project tsconfig.build.json"
|