@lunora/angular 1.0.0-alpha.35 → 1.0.0-alpha.36
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.mts +39 -2
- package/dist/index.d.ts +39 -2
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/runAction-BfiPq4Xz.mjs +1 -0
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DestroyRef, Signal, InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
2
|
-
import { FunctionReference, LunoraClient, SubscriptionError, User, LunoraClientOptions, ConnectionStatus, Preloaded, ArgsOf, ReturnOf, MutationCallOptions, MutatorHandle } from '@lunora/client';
|
|
2
|
+
import { FunctionReference, LunoraClient, SubscriptionError, User, LunoraClientOptions, ConnectionStatus, Preloaded, ArgsOf, ReturnOf, MutationCallOptions, MutatorHandle, ActionCallOptions } from '@lunora/client';
|
|
3
3
|
export type { ArgsOf, ConnectionStatus, FunctionReference, LunoraClient, LunoraClientOptions, MutationCallOptions, Preloaded, ReturnOf, SubscriptionError, Unsubscribe } from '@lunora/client';
|
|
4
4
|
import { PaginationStatus } from '@lunora/client/pagination';
|
|
5
5
|
import { RateLimitStatus, RateLimitConfig } from '@lunora/ratelimit';
|
|
@@ -1065,6 +1065,43 @@ interface RateLimitResult {
|
|
|
1065
1065
|
* @experimental
|
|
1066
1066
|
*/
|
|
1067
1067
|
declare const rateLimit: (config: RateLimitConfig, options?: RateLimitOptions) => RateLimitResult;
|
|
1068
|
+
/**
|
|
1069
|
+
* `RunActionOptions` is part of the experimental `@lunora/angular` API and may change without a major version bump.
|
|
1070
|
+
* @experimental
|
|
1071
|
+
*/
|
|
1072
|
+
interface RunActionOptions extends ActionCallOptions {
|
|
1073
|
+
/**
|
|
1074
|
+
* Client to run the action on. Defaults to the injected `LUNORA_CLIENT`.
|
|
1075
|
+
* Because actions usually fire from event handlers — which run *outside* an
|
|
1076
|
+
* injection context — capture the client once (`injectLunoraClient()` in a
|
|
1077
|
+
* field) and pass it here, or call `client.action(...)` directly.
|
|
1078
|
+
*/
|
|
1079
|
+
client?: LunoraClient;
|
|
1080
|
+
}
|
|
1081
|
+
/**
|
|
1082
|
+
* Run a Lunora action and resolve with the server result (rejects on failure).
|
|
1083
|
+
*
|
|
1084
|
+
* The sibling of `mutate`, and a plain function for the same reason: Angular's
|
|
1085
|
+
* adapter models writes as calls rather than reactive handles, because they fire
|
|
1086
|
+
* from event handlers where a signal-returning primitive has nothing to bind to.
|
|
1087
|
+
* The other adapters return a reactive `{ call, pending, … }` handle because
|
|
1088
|
+
* their idioms make that natural; this one does not.
|
|
1089
|
+
*
|
|
1090
|
+
* Unlike `mutate` there are no `optimistic` / `optimisticUpdate` options. An
|
|
1091
|
+
* optimistic update patches the subscription cache on the assumption a write
|
|
1092
|
+
* will land; an action is not a write — it runs in the Worker, may call a third
|
|
1093
|
+
* party, and has no declared effect on any query.
|
|
1094
|
+
*
|
|
1095
|
+
* ```ts
|
|
1096
|
+
* private readonly client = injectLunoraClient();
|
|
1097
|
+
* verify = () => runAction(api.commands.run, { command: "lunora", args: ["verify"] }, { client: this.client });
|
|
1098
|
+
* ```
|
|
1099
|
+
*
|
|
1100
|
+
* When called from within an injection context you may omit `client` and let it
|
|
1101
|
+
* resolve from the injector.
|
|
1102
|
+
* @experimental
|
|
1103
|
+
*/
|
|
1104
|
+
declare const runAction: <F extends FunctionReference>(reference: F, args: ArgsOf<F>, options?: RunActionOptions) => Promise<ReturnOf<F>>;
|
|
1068
1105
|
/**
|
|
1069
1106
|
* The lifecycle of a stream the primitive is observing.
|
|
1070
1107
|
* @experimental
|
|
@@ -1352,4 +1389,4 @@ export { type AgentApi, type AgentChatApi, type AgentChatMessage, type AgentChat
|
|
|
1352
1389
|
* queue pass through to the client). `connectionStatus` is a `signal` of the
|
|
1353
1390
|
* aggregate live-socket status.
|
|
1354
1391
|
*/
|
|
1355
|
-
type ProvideLunoraOptions, type RateLimitOptions, type RateLimitResult, type StreamOptions, type StreamResult, type StreamStatus, type SubscriptionOptions, type SubscriptionResult, type VoiceAgentOptions, type VoiceAgentResult, type VoiceAudioFormat, type VoiceReference, type VoiceStatus, agent, agentChat, agentState, agentToolEvents, auth, authGate, connectionStatus, flag, flags, hydratePreloaded, infiniteQuery, injectLunoraClient, liveQuery, mutate, mutator, paginatedQuery, presence, provideLunora, rateLimit, stream, subscription, voiceAgent };
|
|
1392
|
+
type ProvideLunoraOptions, type RateLimitOptions, type RateLimitResult, type RunActionOptions, type StreamOptions, type StreamResult, type StreamStatus, type SubscriptionOptions, type SubscriptionResult, type VoiceAgentOptions, type VoiceAgentResult, type VoiceAudioFormat, type VoiceReference, type VoiceStatus, agent, agentChat, agentState, agentToolEvents, auth, authGate, connectionStatus, flag, flags, hydratePreloaded, infiniteQuery, injectLunoraClient, liveQuery, mutate, mutator, paginatedQuery, presence, provideLunora, rateLimit, runAction, stream, subscription, voiceAgent };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DestroyRef, Signal, InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
2
|
-
import { FunctionReference, LunoraClient, SubscriptionError, User, LunoraClientOptions, ConnectionStatus, Preloaded, ArgsOf, ReturnOf, MutationCallOptions, MutatorHandle } from '@lunora/client';
|
|
2
|
+
import { FunctionReference, LunoraClient, SubscriptionError, User, LunoraClientOptions, ConnectionStatus, Preloaded, ArgsOf, ReturnOf, MutationCallOptions, MutatorHandle, ActionCallOptions } from '@lunora/client';
|
|
3
3
|
export type { ArgsOf, ConnectionStatus, FunctionReference, LunoraClient, LunoraClientOptions, MutationCallOptions, Preloaded, ReturnOf, SubscriptionError, Unsubscribe } from '@lunora/client';
|
|
4
4
|
import { PaginationStatus } from '@lunora/client/pagination';
|
|
5
5
|
import { RateLimitStatus, RateLimitConfig } from '@lunora/ratelimit';
|
|
@@ -1065,6 +1065,43 @@ interface RateLimitResult {
|
|
|
1065
1065
|
* @experimental
|
|
1066
1066
|
*/
|
|
1067
1067
|
declare const rateLimit: (config: RateLimitConfig, options?: RateLimitOptions) => RateLimitResult;
|
|
1068
|
+
/**
|
|
1069
|
+
* `RunActionOptions` is part of the experimental `@lunora/angular` API and may change without a major version bump.
|
|
1070
|
+
* @experimental
|
|
1071
|
+
*/
|
|
1072
|
+
interface RunActionOptions extends ActionCallOptions {
|
|
1073
|
+
/**
|
|
1074
|
+
* Client to run the action on. Defaults to the injected `LUNORA_CLIENT`.
|
|
1075
|
+
* Because actions usually fire from event handlers — which run *outside* an
|
|
1076
|
+
* injection context — capture the client once (`injectLunoraClient()` in a
|
|
1077
|
+
* field) and pass it here, or call `client.action(...)` directly.
|
|
1078
|
+
*/
|
|
1079
|
+
client?: LunoraClient;
|
|
1080
|
+
}
|
|
1081
|
+
/**
|
|
1082
|
+
* Run a Lunora action and resolve with the server result (rejects on failure).
|
|
1083
|
+
*
|
|
1084
|
+
* The sibling of `mutate`, and a plain function for the same reason: Angular's
|
|
1085
|
+
* adapter models writes as calls rather than reactive handles, because they fire
|
|
1086
|
+
* from event handlers where a signal-returning primitive has nothing to bind to.
|
|
1087
|
+
* The other adapters return a reactive `{ call, pending, … }` handle because
|
|
1088
|
+
* their idioms make that natural; this one does not.
|
|
1089
|
+
*
|
|
1090
|
+
* Unlike `mutate` there are no `optimistic` / `optimisticUpdate` options. An
|
|
1091
|
+
* optimistic update patches the subscription cache on the assumption a write
|
|
1092
|
+
* will land; an action is not a write — it runs in the Worker, may call a third
|
|
1093
|
+
* party, and has no declared effect on any query.
|
|
1094
|
+
*
|
|
1095
|
+
* ```ts
|
|
1096
|
+
* private readonly client = injectLunoraClient();
|
|
1097
|
+
* verify = () => runAction(api.commands.run, { command: "lunora", args: ["verify"] }, { client: this.client });
|
|
1098
|
+
* ```
|
|
1099
|
+
*
|
|
1100
|
+
* When called from within an injection context you may omit `client` and let it
|
|
1101
|
+
* resolve from the injector.
|
|
1102
|
+
* @experimental
|
|
1103
|
+
*/
|
|
1104
|
+
declare const runAction: <F extends FunctionReference>(reference: F, args: ArgsOf<F>, options?: RunActionOptions) => Promise<ReturnOf<F>>;
|
|
1068
1105
|
/**
|
|
1069
1106
|
* The lifecycle of a stream the primitive is observing.
|
|
1070
1107
|
* @experimental
|
|
@@ -1352,4 +1389,4 @@ export { type AgentApi, type AgentChatApi, type AgentChatMessage, type AgentChat
|
|
|
1352
1389
|
* queue pass through to the client). `connectionStatus` is a `signal` of the
|
|
1353
1390
|
* aggregate live-socket status.
|
|
1354
1391
|
*/
|
|
1355
|
-
type ProvideLunoraOptions, type RateLimitOptions, type RateLimitResult, type StreamOptions, type StreamResult, type StreamStatus, type SubscriptionOptions, type SubscriptionResult, type VoiceAgentOptions, type VoiceAgentResult, type VoiceAudioFormat, type VoiceReference, type VoiceStatus, agent, agentChat, agentState, agentToolEvents, auth, authGate, connectionStatus, flag, flags, hydratePreloaded, infiniteQuery, injectLunoraClient, liveQuery, mutate, mutator, paginatedQuery, presence, provideLunora, rateLimit, stream, subscription, voiceAgent };
|
|
1392
|
+
type ProvideLunoraOptions, type RateLimitOptions, type RateLimitResult, type RunActionOptions, type StreamOptions, type StreamResult, type StreamStatus, type SubscriptionOptions, type SubscriptionResult, type VoiceAgentOptions, type VoiceAgentResult, type VoiceAudioFormat, type VoiceReference, type VoiceStatus, agent, agentChat, agentState, agentToolEvents, auth, authGate, connectionStatus, flag, flags, hydratePreloaded, infiniteQuery, injectLunoraClient, liveQuery, mutate, mutator, paginatedQuery, presence, provideLunora, rateLimit, runAction, stream, subscription, voiceAgent };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{agent as
|
|
1
|
+
import{agent as t}from"./packem_shared/agent-DcC06SOO.mjs";import{agentChat as m}from"./packem_shared/agentChat-Cit2jdK_.mjs";import{agentState as f}from"./packem_shared/agentState-CBH9dKb7.mjs";import{agentToolEvents as n}from"./packem_shared/agentToolEvents-DSNEBf37.mjs";import{auth as i,authGate as u}from"./packem_shared/auth-BgwruT_M.mjs";import{LUNORA_CLIENT as c,injectLunoraClient as s,provideLunora as l}from"./packem_shared/LUNORA_CLIENT-B0toApHY.mjs";import{connectionStatus as L}from"./packem_shared/connectionStatus-UhmuwzMa.mjs";import{flag as v,flags as y}from"./packem_shared/flag-orUoJY7A.mjs";import{hydratePreloaded as C}from"./packem_shared/hydratePreloaded-DYqgj4Y1.mjs";import{liveQuery as S}from"./packem_shared/liveQuery-DR3i-aOo.mjs";import{mutate as I}from"./packem_shared/mutate-BZvLQLyu.mjs";import{mutator as P}from"./packem_shared/mutator-DjG1yGk8.mjs";import{infiniteQuery as b,paginatedQuery as j}from"./packem_shared/infiniteQuery-C1vVL3Nk.mjs";import{presence as K}from"./packem_shared/presence-BfPC_yqX.mjs";import{rateLimit as R}from"./packem_shared/rateLimit-B3h9qzh-.mjs";import{runAction as _}from"./packem_shared/runAction-BfiPq4Xz.mjs";import{stream as q}from"./packem_shared/stream-CcjYdpzt.mjs";import{subscription as z}from"./packem_shared/subscription-CWp5w6K4.mjs";import{voiceAgent as D}from"./packem_shared/voiceAgent-CzyUcUKj.mjs";import{SKIP as H}from"@lunora/client/query";export{c as LUNORA_CLIENT,H as SKIP,t as agent,m as agentChat,f as agentState,n as agentToolEvents,i as auth,u as authGate,L as connectionStatus,v as flag,y as flags,C as hydratePreloaded,b as infiniteQuery,s as injectLunoraClient,S as liveQuery,I as mutate,P as mutator,j as paginatedQuery,K as presence,l as provideLunora,R as rateLimit,_ as runAction,q as stream,z as subscription,D as voiceAgent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{resolveLunoraClient as e}from"./LUNORA_CLIENT-B0toApHY.mjs";const l=(n,o,t={})=>{const{client:r,...c}=t;return e(r).action(n,o,c)};export{l as runAction};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/angular",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.36",
|
|
4
4
|
"description": "Angular reactive adapter for Lunora — signal-based live queries and mutations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@lunora/client": "1.0.0-alpha.
|
|
56
|
+
"@lunora/client": "1.0.0-alpha.52",
|
|
57
57
|
"@lunora/ratelimit": "1.0.0-alpha.23",
|
|
58
58
|
"@visulima/storage-client": "1.0.2"
|
|
59
59
|
},
|