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.
79 lines
1.5 KiB
TypeScript
79 lines
1.5 KiB
TypeScript
export { SnowLumaApiClient } from './client/api-client';
|
|
export { createHttpClient, SnowLumaHttpClient } from './client/http-client';
|
|
export type {
|
|
SnowLumaHttpClientOptions
|
|
} from './client/http-client';
|
|
export { createWebSocketClient, SnowLumaWebSocketClient } from './client/websocket-client';
|
|
export {
|
|
createSnowLumaApiError, SnowLumaAbortError,
|
|
SnowLumaApiError,
|
|
SnowLumaAuthError,
|
|
SnowLumaConnectionError,
|
|
SnowLumaError,
|
|
SnowLumaParseError,
|
|
SnowLumaTimeoutError,
|
|
SnowLumaTransportError
|
|
} from './errors';
|
|
export {
|
|
createEventContext,
|
|
isGroupMessageEvent,
|
|
isMessageEvent,
|
|
isMetaEvent,
|
|
isNoticeEvent,
|
|
isPrivateMessageEvent,
|
|
isRequestEvent,
|
|
matchCommand,
|
|
noticeType,
|
|
requestType
|
|
} from './events/index';
|
|
export {
|
|
at,
|
|
atAll,
|
|
br,
|
|
chain,
|
|
contact,
|
|
escapeCqParam,
|
|
escapeCqText,
|
|
face,
|
|
forward, fromCQString, image,
|
|
json,
|
|
location,
|
|
message, MessageChain, music,
|
|
node,
|
|
normalizeMessage,
|
|
parseSegments,
|
|
poke,
|
|
raw,
|
|
record,
|
|
reply,
|
|
share,
|
|
text,
|
|
toCQString,
|
|
video,
|
|
xml
|
|
} from './messages/index';
|
|
|
|
export type {
|
|
ReconnectOptions,
|
|
SnowLumaWebSocketClientOptions,
|
|
SnowLumaWebSocketEvents,
|
|
WebSocketCloseInfo,
|
|
WebSocketConstructor
|
|
} from './client/websocket-client';
|
|
|
|
export type {
|
|
CommandHandler,
|
|
CommandMatch,
|
|
CommandOptions,
|
|
EventHandler,
|
|
EventMiddleware,
|
|
EventNext,
|
|
EventPredicate,
|
|
MaybePromise,
|
|
RequestDecisionOptions,
|
|
SnowLumaEventContext
|
|
} from './events/index';
|
|
|
|
export type * from './types/index';
|
|
|