Remove actions list and update SDK exports
Delete the obsolete actions.ts (SNOWLUMA_ACTIONS / isSnowLumaAction) and update package SDK top-level exports. index.ts was refactored to reorganize and expose additional helpers and types (createSnowLumaApiError, createEventContext, event/type guards, request/notice helpers, fromCQString, MessageChain, SnowLumaHttpClientOptions, etc.), remove duplicate/unused re-exports, and streamline message/client/error exports for consumers.
This commit is contained in:
1 parent
36c3ed031b
commit
c49ae1c8d9
2 files changed
+25
-186
No files matched your search
+25
-35
@@ -1,20 +1,32 @@
|
||||
export { SNOWLUMA_ACTIONS, isSnowLumaAction } from './actions';
|
||||
export { SnowLumaApiClient } from './client/api-client';
|
||||
export { SnowLumaHttpClient, createHttpClient } from './client/http-client';
|
||||
export { SnowLumaWebSocketClient, createWebSocketClient } from './client/websocket-client';
|
||||
export { createHttpClient, SnowLumaHttpClient } from './client/http-client';
|
||||
export type {
|
||||
SnowLumaHttpClientOptions
|
||||
} from './client/http-client';
|
||||
export { createWebSocketClient, SnowLumaWebSocketClient } from './client/websocket-client';
|
||||
export {
|
||||
SnowLumaAbortError,
|
||||
createSnowLumaApiError, SnowLumaAbortError,
|
||||
SnowLumaApiError,
|
||||
SnowLumaAuthError,
|
||||
SnowLumaConnectionError,
|
||||
SnowLumaError,
|
||||
SnowLumaParseError,
|
||||
SnowLumaTimeoutError,
|
||||
SnowLumaTransportError,
|
||||
createSnowLumaApiError,
|
||||
SnowLumaTransportError
|
||||
} from './errors';
|
||||
export {
|
||||
MessageChain,
|
||||
createEventContext,
|
||||
isGroupMessageEvent,
|
||||
isMessageEvent,
|
||||
isMetaEvent,
|
||||
isNoticeEvent,
|
||||
isPrivateMessageEvent,
|
||||
isRequestEvent,
|
||||
matchCommand,
|
||||
noticeType,
|
||||
requestType
|
||||
} from './events/index';
|
||||
export {
|
||||
at,
|
||||
atAll,
|
||||
br,
|
||||
@@ -23,12 +35,10 @@ export {
|
||||
escapeCqParam,
|
||||
escapeCqText,
|
||||
face,
|
||||
forward,
|
||||
image,
|
||||
forward, fromCQString, image,
|
||||
json,
|
||||
location,
|
||||
message,
|
||||
music,
|
||||
message, MessageChain, music,
|
||||
node,
|
||||
normalizeMessage,
|
||||
parseSegments,
|
||||
@@ -40,36 +50,15 @@ export {
|
||||
text,
|
||||
toCQString,
|
||||
video,
|
||||
xml,
|
||||
fromCQString,
|
||||
xml
|
||||
} from './messages/index';
|
||||
export {
|
||||
createEventContext,
|
||||
isGroupMessageEvent,
|
||||
isMessageEvent,
|
||||
isMetaEvent,
|
||||
isNoticeEvent,
|
||||
isPrivateMessageEvent,
|
||||
isRequestEvent,
|
||||
matchCommand,
|
||||
noticeType,
|
||||
requestType,
|
||||
} from './events/index';
|
||||
|
||||
export type {
|
||||
SnowLumaKnownAction,
|
||||
} from './actions';
|
||||
|
||||
export type {
|
||||
SnowLumaHttpClientOptions,
|
||||
} from './client/http-client';
|
||||
|
||||
export type {
|
||||
ReconnectOptions,
|
||||
SnowLumaWebSocketClientOptions,
|
||||
SnowLumaWebSocketEvents,
|
||||
WebSocketCloseInfo,
|
||||
WebSocketConstructor,
|
||||
WebSocketConstructor
|
||||
} from './client/websocket-client';
|
||||
|
||||
export type {
|
||||
@@ -82,7 +71,8 @@ export type {
|
||||
EventPredicate,
|
||||
MaybePromise,
|
||||
RequestDecisionOptions,
|
||||
SnowLumaEventContext,
|
||||
SnowLumaEventContext
|
||||
} from './events/index';
|
||||
|
||||
export type * from './types/index';
|
||||
|
||||
Reference in new issue
Block a user