@zhin.js/contract 1.0.4 → 1.0.5
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/constants.d.ts +2 -58
- package/lib/constants.d.ts.map +1 -1
- package/lib/constants.js +2 -39
- package/lib/constants.js.map +1 -1
- package/package.json +3 -2
- package/src/constants.ts +8 -43
package/lib/constants.d.ts
CHANGED
|
@@ -2,62 +2,6 @@
|
|
|
2
2
|
export declare const DEFAULT_CONSOLE_BASE_PATH = "/";
|
|
3
3
|
export declare const CONSOLE_HOST_REACT_NAMESPACE_KEY = "__ZHIN_CONSOLE_HOST_REACT_NAMESPACE__";
|
|
4
4
|
export declare const CONSOLE_SHARED_MODULES_KEY = "__ZHIN_CONSOLE_SHARED_MODULES__";
|
|
5
|
-
/**
|
|
6
|
-
export
|
|
7
|
-
readonly NOTICE_RECEIVE: "notice.receive";
|
|
8
|
-
readonly REQUEST_RECEIVE: "request.receive";
|
|
9
|
-
readonly MESSAGE_RECEIVE: "message.receive";
|
|
10
|
-
readonly ENDPOINT_LIFECYCLE: "endpoint.lifecycle";
|
|
11
|
-
};
|
|
12
|
-
export declare const SIDE_EVENT_RPC: {
|
|
13
|
-
readonly REQUEST_LIST: "request.list";
|
|
14
|
-
readonly REQUEST_APPROVE: "request.approve";
|
|
15
|
-
readonly REQUEST_REJECT: "request.reject";
|
|
16
|
-
readonly REQUEST_CONSUMED: "request.consumed";
|
|
17
|
-
readonly NOTICE_CONSUMED: "notice.consumed";
|
|
18
|
-
};
|
|
19
|
-
export declare const INBOX_RPC: {
|
|
20
|
-
readonly MESSAGES: "inbox.messages";
|
|
21
|
-
readonly REQUESTS: "inbox.requests";
|
|
22
|
-
readonly NOTICES: "inbox.notices";
|
|
23
|
-
};
|
|
24
|
-
export declare const ENDPOINT_RPC: {
|
|
25
|
-
readonly LIST: "endpoint.list";
|
|
26
|
-
readonly INFO: "endpoint.info";
|
|
27
|
-
readonly SEND_MESSAGE: "endpoint.send_message";
|
|
28
|
-
readonly FRIENDS: "endpoint.friends";
|
|
29
|
-
readonly GROUPS: "endpoint.groups";
|
|
30
|
-
readonly CHANNELS: "endpoint.channels";
|
|
31
|
-
readonly DELETE_FRIEND: "endpoint.delete_friend";
|
|
32
|
-
readonly GROUP_MEMBERS: "endpoint.group_members";
|
|
33
|
-
readonly GROUP_KICK: "endpoint.group_kick";
|
|
34
|
-
readonly GROUP_MUTE: "endpoint.group_mute";
|
|
35
|
-
readonly GROUP_ADMIN: "endpoint.group_admin";
|
|
36
|
-
};
|
|
37
|
-
/** 全量 Side Event / Endpoint WS 事件名 SSOT(推送 + RPC) */
|
|
38
|
-
export declare const SIDE_EVENT_NAMES: {
|
|
39
|
-
readonly LIST: "endpoint.list";
|
|
40
|
-
readonly INFO: "endpoint.info";
|
|
41
|
-
readonly SEND_MESSAGE: "endpoint.send_message";
|
|
42
|
-
readonly FRIENDS: "endpoint.friends";
|
|
43
|
-
readonly GROUPS: "endpoint.groups";
|
|
44
|
-
readonly CHANNELS: "endpoint.channels";
|
|
45
|
-
readonly DELETE_FRIEND: "endpoint.delete_friend";
|
|
46
|
-
readonly GROUP_MEMBERS: "endpoint.group_members";
|
|
47
|
-
readonly GROUP_KICK: "endpoint.group_kick";
|
|
48
|
-
readonly GROUP_MUTE: "endpoint.group_mute";
|
|
49
|
-
readonly GROUP_ADMIN: "endpoint.group_admin";
|
|
50
|
-
readonly MESSAGES: "inbox.messages";
|
|
51
|
-
readonly REQUESTS: "inbox.requests";
|
|
52
|
-
readonly NOTICES: "inbox.notices";
|
|
53
|
-
readonly REQUEST_LIST: "request.list";
|
|
54
|
-
readonly REQUEST_APPROVE: "request.approve";
|
|
55
|
-
readonly REQUEST_REJECT: "request.reject";
|
|
56
|
-
readonly REQUEST_CONSUMED: "request.consumed";
|
|
57
|
-
readonly NOTICE_CONSUMED: "notice.consumed";
|
|
58
|
-
readonly NOTICE_RECEIVE: "notice.receive";
|
|
59
|
-
readonly REQUEST_RECEIVE: "request.receive";
|
|
60
|
-
readonly MESSAGE_RECEIVE: "message.receive";
|
|
61
|
-
readonly ENDPOINT_LIFECYCLE: "endpoint.lifecycle";
|
|
62
|
-
};
|
|
5
|
+
/** Compatibility re-exports; @zhin.js/console-protocol is the wire SSOT. */
|
|
6
|
+
export { SIDE_EVENT_PUSH, SIDE_EVENT_RPC, INBOX_RPC, ENDPOINT_RPC, SIDE_EVENT_NAMES, } from '@zhin.js/console-protocol';
|
|
63
7
|
//# sourceMappingURL=constants.d.ts.map
|
package/lib/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C,eAAO,MAAM,gCAAgC,0CAA0C,CAAC;AAExF,eAAO,MAAM,0BAA0B,oCAAoC,CAAC;AAE5E,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C,eAAO,MAAM,gCAAgC,0CAA0C,CAAC;AAExF,eAAO,MAAM,0BAA0B,oCAAoC,CAAC;AAE5E,4EAA4E;AAC5E,OAAO,EACL,eAAe,EACf,cAAc,EACd,SAAS,EACT,YAAY,EACZ,gBAAgB,GACjB,MAAM,2BAA2B,CAAC"}
|
package/lib/constants.js
CHANGED
|
@@ -2,43 +2,6 @@
|
|
|
2
2
|
export const DEFAULT_CONSOLE_BASE_PATH = "/";
|
|
3
3
|
export const CONSOLE_HOST_REACT_NAMESPACE_KEY = "__ZHIN_CONSOLE_HOST_REACT_NAMESPACE__";
|
|
4
4
|
export const CONSOLE_SHARED_MODULES_KEY = "__ZHIN_CONSOLE_SHARED_MODULES__";
|
|
5
|
-
/**
|
|
6
|
-
export
|
|
7
|
-
NOTICE_RECEIVE: 'notice.receive',
|
|
8
|
-
REQUEST_RECEIVE: 'request.receive',
|
|
9
|
-
MESSAGE_RECEIVE: 'message.receive',
|
|
10
|
-
ENDPOINT_LIFECYCLE: 'endpoint.lifecycle',
|
|
11
|
-
};
|
|
12
|
-
export const SIDE_EVENT_RPC = {
|
|
13
|
-
REQUEST_LIST: 'request.list',
|
|
14
|
-
REQUEST_APPROVE: 'request.approve',
|
|
15
|
-
REQUEST_REJECT: 'request.reject',
|
|
16
|
-
REQUEST_CONSUMED: 'request.consumed',
|
|
17
|
-
NOTICE_CONSUMED: 'notice.consumed',
|
|
18
|
-
};
|
|
19
|
-
export const INBOX_RPC = {
|
|
20
|
-
MESSAGES: 'inbox.messages',
|
|
21
|
-
REQUESTS: 'inbox.requests',
|
|
22
|
-
NOTICES: 'inbox.notices',
|
|
23
|
-
};
|
|
24
|
-
export const ENDPOINT_RPC = {
|
|
25
|
-
LIST: 'endpoint.list',
|
|
26
|
-
INFO: 'endpoint.info',
|
|
27
|
-
SEND_MESSAGE: 'endpoint.send_message',
|
|
28
|
-
FRIENDS: 'endpoint.friends',
|
|
29
|
-
GROUPS: 'endpoint.groups',
|
|
30
|
-
CHANNELS: 'endpoint.channels',
|
|
31
|
-
DELETE_FRIEND: 'endpoint.delete_friend',
|
|
32
|
-
GROUP_MEMBERS: 'endpoint.group_members',
|
|
33
|
-
GROUP_KICK: 'endpoint.group_kick',
|
|
34
|
-
GROUP_MUTE: 'endpoint.group_mute',
|
|
35
|
-
GROUP_ADMIN: 'endpoint.group_admin',
|
|
36
|
-
};
|
|
37
|
-
/** 全量 Side Event / Endpoint WS 事件名 SSOT(推送 + RPC) */
|
|
38
|
-
export const SIDE_EVENT_NAMES = {
|
|
39
|
-
...SIDE_EVENT_PUSH,
|
|
40
|
-
...SIDE_EVENT_RPC,
|
|
41
|
-
...INBOX_RPC,
|
|
42
|
-
...ENDPOINT_RPC,
|
|
43
|
-
};
|
|
5
|
+
/** Compatibility re-exports; @zhin.js/console-protocol is the wire SSOT. */
|
|
6
|
+
export { SIDE_EVENT_PUSH, SIDE_EVENT_RPC, INBOX_RPC, ENDPOINT_RPC, SIDE_EVENT_NAMES, } from '@zhin.js/console-protocol';
|
|
44
7
|
//# sourceMappingURL=constants.js.map
|
package/lib/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAE7C,MAAM,CAAC,MAAM,gCAAgC,GAAG,uCAAuC,CAAC;AAExF,MAAM,CAAC,MAAM,0BAA0B,GAAG,iCAAiC,CAAC;AAE5E,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAE7C,MAAM,CAAC,MAAM,gCAAgC,GAAG,uCAAuC,CAAC;AAExF,MAAM,CAAC,MAAM,0BAA0B,GAAG,iCAAiC,CAAC;AAE5E,4EAA4E;AAC5E,OAAO,EACL,eAAe,EACf,cAAc,EACd,SAAS,EACT,YAAY,EACZ,gBAAgB,GACjB,MAAM,2BAA2B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/contract",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Zhin console / PageManager shared contract (entries, PluginRegisterHostApi)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"src"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@zhin.js/ai": "1.4.5"
|
|
18
|
+
"@zhin.js/ai": "1.4.5",
|
|
19
|
+
"@zhin.js/console-protocol": "1.1.0"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
22
|
"@types/react": "^19.2.17",
|
package/src/constants.ts
CHANGED
|
@@ -5,46 +5,11 @@ export const CONSOLE_HOST_REACT_NAMESPACE_KEY = "__ZHIN_CONSOLE_HOST_REACT_NAMES
|
|
|
5
5
|
|
|
6
6
|
export const CONSOLE_SHARED_MODULES_KEY = "__ZHIN_CONSOLE_SHARED_MODULES__";
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export const SIDE_EVENT_RPC = {
|
|
17
|
-
REQUEST_LIST: 'request.list',
|
|
18
|
-
REQUEST_APPROVE: 'request.approve',
|
|
19
|
-
REQUEST_REJECT: 'request.reject',
|
|
20
|
-
REQUEST_CONSUMED: 'request.consumed',
|
|
21
|
-
NOTICE_CONSUMED: 'notice.consumed',
|
|
22
|
-
} as const;
|
|
23
|
-
|
|
24
|
-
export const INBOX_RPC = {
|
|
25
|
-
MESSAGES: 'inbox.messages',
|
|
26
|
-
REQUESTS: 'inbox.requests',
|
|
27
|
-
NOTICES: 'inbox.notices',
|
|
28
|
-
} as const;
|
|
29
|
-
|
|
30
|
-
export const ENDPOINT_RPC = {
|
|
31
|
-
LIST: 'endpoint.list',
|
|
32
|
-
INFO: 'endpoint.info',
|
|
33
|
-
SEND_MESSAGE: 'endpoint.send_message',
|
|
34
|
-
FRIENDS: 'endpoint.friends',
|
|
35
|
-
GROUPS: 'endpoint.groups',
|
|
36
|
-
CHANNELS: 'endpoint.channels',
|
|
37
|
-
DELETE_FRIEND: 'endpoint.delete_friend',
|
|
38
|
-
GROUP_MEMBERS: 'endpoint.group_members',
|
|
39
|
-
GROUP_KICK: 'endpoint.group_kick',
|
|
40
|
-
GROUP_MUTE: 'endpoint.group_mute',
|
|
41
|
-
GROUP_ADMIN: 'endpoint.group_admin',
|
|
42
|
-
} as const;
|
|
43
|
-
|
|
44
|
-
/** 全量 Side Event / Endpoint WS 事件名 SSOT(推送 + RPC) */
|
|
45
|
-
export const SIDE_EVENT_NAMES = {
|
|
46
|
-
...SIDE_EVENT_PUSH,
|
|
47
|
-
...SIDE_EVENT_RPC,
|
|
48
|
-
...INBOX_RPC,
|
|
49
|
-
...ENDPOINT_RPC,
|
|
50
|
-
} as const;
|
|
8
|
+
/** Compatibility re-exports; @zhin.js/console-protocol is the wire SSOT. */
|
|
9
|
+
export {
|
|
10
|
+
SIDE_EVENT_PUSH,
|
|
11
|
+
SIDE_EVENT_RPC,
|
|
12
|
+
INBOX_RPC,
|
|
13
|
+
ENDPOINT_RPC,
|
|
14
|
+
SIDE_EVENT_NAMES,
|
|
15
|
+
} from '@zhin.js/console-protocol';
|