feat(sdk): complete action parameter and result types
This commit is contained in:
10 files changed
+1363
-2
No files matched your search
@@ -41,4 +41,8 @@ If the package version already exists on npm, the workflow skips publishing that
|
||||
|
||||
`SNOWLUMA_ACTIONS`, `isSnowLumaAction`, and `SnowLumaKnownAction` are available from both `@snowluma/sdk` and `@snowluma/sdk/actions`. The catalog includes this release's executable action names, compatibility aliases, and raw actions. OneBot's registry tests verify that the SDK catalog stays aligned with the server; the published SDK does not import server code.
|
||||
|
||||
This local catalog is not a capability check against a connected server. Detailed parameter and result types remain in `SnowLumaActionMap`; knowing an action name does not imply it has a specialized type mapping. Custom actions remain supported through `raw()`. Adding an action type is a minor change unless it changes an existing method signature or return type.
|
||||
This local catalog is not a capability check against a connected server. Every known action name has a parameter and result entry in `SnowLumaActionMap`, including aliases. Existing broad JSON contracts are retained for compatibility. New parameter types describe accepted input forms, including numeric strings and primitive coercions; server-side range and state validation still applies. Custom actions and dynamically selected names remain supported through `raw()` and `rawResponse()`. Adding an action type is a minor change unless it changes an existing method signature or return type.
|
||||
|
||||
Stream result types describe individual frame payloads, including intermediate and terminal frames. These declarations do not add streaming transport support to the single-response HTTP and WebSocket clients; applications consuming a full download must use a transport that reads every frame. Stream reset/error envelopes retain their existing error behavior. Album counts and IDs returned as decimal strings stay strings, and ordinary message IDs remain signed numbers.
|
||||
|
||||
The package consumer tests check complete action-map coverage, inferred results, compatibility aliases, and invalid input examples with both NodeNext and bundler resolution. The same parameter examples are checked against the server's real action parsers without starting QQ or executing actions.
|
||||
Reference in new issue
Block a user