@fozy-labs/rx-toolkit 0.5.3-rc.1 → 0.5.3-rc.2

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.
Files changed (61) hide show
  1. package/README.md +3 -3
  2. package/dist/common/options/DefaultOptions.d.ts +1 -1
  3. package/dist/common/options/SharedOptions.d.ts +2 -2
  4. package/dist/query/api/createCommand.d.ts +21 -0
  5. package/dist/query/api/createCommand.js +20 -0
  6. package/dist/query/api/createOperation.d.ts +5 -3
  7. package/dist/query/api/createOperation.js +6 -2
  8. package/dist/query/api/createResource.d.ts +2 -2
  9. package/dist/query/api/createResourceDuplicator.d.ts +2 -2
  10. package/dist/query/core/Command/Command.d.ts +35 -0
  11. package/dist/query/core/Command/Command.js +210 -0
  12. package/dist/query/core/Command/CommandAgent.d.ts +19 -0
  13. package/dist/query/core/Command/CommandAgent.js +54 -0
  14. package/dist/query/core/Command/index.d.ts +2 -0
  15. package/dist/query/core/Command/index.js +2 -0
  16. package/dist/query/core/Opertation/Operation.d.ts +8 -35
  17. package/dist/query/core/Opertation/Operation.js +4 -211
  18. package/dist/query/core/Opertation/OperationAgent.d.ts +4 -19
  19. package/dist/query/core/Opertation/OperationAgent.js +4 -54
  20. package/dist/query/core/QueriesCache.d.ts +1 -1
  21. package/dist/query/core/QueriesLifetimeHooks.d.ts +1 -1
  22. package/dist/query/core/Resource/Resource.d.ts +2 -2
  23. package/dist/query/core/Resource/ResourceAgent.d.ts +1 -1
  24. package/dist/query/core/Resource/ResourceAgent.js +1 -1
  25. package/dist/query/core/Resource/ResourceDuplicator.d.ts +3 -3
  26. package/dist/query/core/Resource/ResourceDuplicator.js +1 -1
  27. package/dist/query/core/Resource/ResourceDuplicatorAgent.d.ts +2 -2
  28. package/dist/query/core/Resource/ResourceDuplicatorAgent.js +1 -1
  29. package/dist/query/core/Resource/ResourceRef.d.ts +1 -1
  30. package/dist/query/index.d.ts +4 -2
  31. package/dist/query/index.js +7 -2
  32. package/dist/query/lib/ReactiveCache.d.ts +1 -1
  33. package/dist/query/react/useCommandAgent.d.ts +24 -0
  34. package/dist/query/react/useCommandAgent.js +39 -0
  35. package/dist/query/react/useOperationAgent.d.ts +6 -8
  36. package/dist/query/react/useOperationAgent.js +6 -23
  37. package/dist/query/react/useResourceAgent.d.ts +3 -3
  38. package/dist/query/types/Command.types.d.ts +154 -0
  39. package/dist/query/types/Command.types.js +1 -0
  40. package/dist/query/types/Operation.types.d.ts +13 -154
  41. package/dist/query/types/index.d.ts +2 -1
  42. package/dist/query/types/index.js +3 -1
  43. package/dist/signals/base/Devtools.d.ts +1 -1
  44. package/dist/signals/operators/signalize.d.ts +1 -1
  45. package/dist/signals/signals/Computed.d.ts +2 -2
  46. package/dist/signals/signals/LocalState.d.ts +45 -0
  47. package/dist/signals/signals/{LocalSignal.js → LocalState.js} +59 -25
  48. package/dist/signals/signals/Signal.d.ts +4 -4
  49. package/dist/signals/signals/Signal.js +1 -1
  50. package/dist/signals/signals/State.d.ts +2 -2
  51. package/dist/signals/signals/index.d.ts +1 -1
  52. package/dist/signals/signals/index.js +1 -1
  53. package/dist/signals/types/signals.types.d.ts +5 -0
  54. package/docs/CHANGELOG.md +76 -18
  55. package/docs/devtools/README.md +4 -4
  56. package/docs/options/README.md +4 -2
  57. package/docs/query/README.md +34 -32
  58. package/docs/signals/README.md +10 -5
  59. package/docs/usage/react/README.md +17 -15
  60. package/package.json +1 -1
  61. package/dist/signals/signals/LocalSignal.d.ts +0 -32
package/README.md CHANGED
@@ -44,7 +44,7 @@ RxToolkit решает эти проблемы, предоставляя сво
44
44
  ###### Создаем сигнал
45
45
  ```typescript
46
46
  // Описываем логику в обычном JavaScript
47
- const count$ = Signal.create(0);
47
+ const count$ = Signal.state(0);
48
48
  const doubled$ = Signal.compute(() => count$() * 2);
49
49
  const increment = () => count$.set(count$() + 1);
50
50
  ```
@@ -102,7 +102,7 @@ const getCart = createResource({
102
102
  queryFn: fetchCart,
103
103
  });
104
104
 
105
- const toggleCardItem = createOperation({
105
+ const toggleCardItem = createCommand({
106
106
  queryFn: fetchToggleCardItem,
107
107
  link(add) {
108
108
  add({
@@ -119,7 +119,7 @@ const toggleCardItem = createOperation({
119
119
 
120
120
  function ShoppingCart() {
121
121
  const cartQuery = useResourceAgent(getCart);
122
- const [toggleItem] = useOperationAgent(toggleCardItem);
122
+ const [toggleItem] = useCommandAgent(toggleCardItem);
123
123
  const cart = cartQuery.data;
124
124
 
125
125
  return (
@@ -1,4 +1,4 @@
1
- import type { DevtoolsLike } from "@/common/devtools";
1
+ import type { DevtoolsLike } from "../../common/devtools";
2
2
  type Update = Partial<{
3
3
  DEVTOOLS: DevtoolsLike | null;
4
4
  onQueryError: (error: unknown) => void;
@@ -1,5 +1,5 @@
1
- import { DevtoolsLike } from "@/common/devtools";
2
- import { shallowEqual } from "@/common/utils";
1
+ import { DevtoolsLike } from "../../common/devtools";
2
+ import { shallowEqual } from "../../common/utils";
3
3
  export declare class SharedOptions {
4
4
  static DEVTOOLS: DevtoolsLike | null;
5
5
  static onQueryError: ((error: unknown) => void) | null;
@@ -0,0 +1,21 @@
1
+ import type { CommandCreateOptions, CommandDefinition } from "../../query/types";
2
+ import { Command } from "../../query/core/Command/Command";
3
+ /**
4
+ * Создаёт команду (command) — единицу мутирующего запроса.
5
+ *
6
+ * Команда инкапсулирует асинхронную операцию с поддержкой кеширования,
7
+ * связывания с ресурсами (link) и оптимистичных обновлений.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const updateUser = createCommand({
12
+ * queryFn: (args: { id: string; name: string }) => api.updateUser(args),
13
+ * link: (link) => link({
14
+ * resource: userResource,
15
+ * forwardArgs: (args) => ({ id: args.id }),
16
+ * invalidate: true,
17
+ * }),
18
+ * });
19
+ * ```
20
+ */
21
+ export declare const createCommand: <ARGS, RESULT, SELECTED = never>(options: CommandCreateOptions<CommandDefinition<ARGS, RESULT, SELECTED>>) => Command<CommandDefinition<ARGS, RESULT, SELECTED>>;
@@ -0,0 +1,20 @@
1
+ import { Command } from "../../query/core/Command/Command";
2
+ /**
3
+ * Создаёт команду (command) — единицу мутирующего запроса.
4
+ *
5
+ * Команда инкапсулирует асинхронную операцию с поддержкой кеширования,
6
+ * связывания с ресурсами (link) и оптимистичных обновлений.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const updateUser = createCommand({
11
+ * queryFn: (args: { id: string; name: string }) => api.updateUser(args),
12
+ * link: (link) => link({
13
+ * resource: userResource,
14
+ * forwardArgs: (args) => ({ id: args.id }),
15
+ * invalidate: true,
16
+ * }),
17
+ * });
18
+ * ```
19
+ */
20
+ export const createCommand = ((options) => new Command(options));
@@ -1,3 +1,5 @@
1
- import type { OperationCreateOptions, OperationDefinition } from "@/query/types";
2
- import { Operation } from "@/query/core/Opertation/Operation";
3
- export declare const createOperation: <ARGS, RESULT, SELECTED = never>(options: OperationCreateOptions<OperationDefinition<ARGS, RESULT, SELECTED>>) => Operation<OperationDefinition<ARGS, RESULT, SELECTED>>;
1
+ /**
2
+ * @deprecated Use `createCommand` instead. Will be removed in v0.6.0.
3
+ * @see createCommand
4
+ */
5
+ export declare const createOperation: <ARGS, RESULT, SELECTED = never>(options: import("../types").CommandCreateOptions<import("../types").CommandDefinition<ARGS, RESULT, SELECTED>>) => import("../core/Command").Command<import("../types").CommandDefinition<ARGS, RESULT, SELECTED>>;
@@ -1,2 +1,6 @@
1
- import { Operation } from "../../query/core/Opertation/Operation";
2
- export const createOperation = ((options) => new Operation(options));
1
+ import { createCommand } from './createCommand';
2
+ /**
3
+ * @deprecated Use `createCommand` instead. Will be removed in v0.6.0.
4
+ * @see createCommand
5
+ */
6
+ export const createOperation = createCommand;
@@ -1,3 +1,3 @@
1
- import type { ResourceCreateOptions, ResourceDefinition } from "@/query/types";
2
- import { Resource } from "@/query/core/Resource/Resource";
1
+ import type { ResourceCreateOptions, ResourceDefinition } from "../../query/types";
2
+ import { Resource } from "../../query/core/Resource/Resource";
3
3
  export declare const createResource: <ARGS, RESULT, SELECTED = never>(options: ResourceCreateOptions<ResourceDefinition<ARGS, RESULT, SELECTED>>) => Resource<ResourceDefinition<ARGS, RESULT, SELECTED>>;
@@ -1,4 +1,4 @@
1
- import { DuplicatorOptions, ResourceDuplicator, DuplicatorDefinition } from "@/query/core/Resource/ResourceDuplicator";
2
- import { ResourceDefinition } from "@/query/types";
1
+ import { DuplicatorOptions, ResourceDuplicator, DuplicatorDefinition } from "../../query/core/Resource/ResourceDuplicator";
2
+ import { ResourceDefinition } from "../../query/types";
3
3
  export declare const createResourceDuplicator: <ARGS, RESULT, SELECTED = never>(options: DuplicatorOptions<DuplicatorDefinition<ResourceDefinition<ARGS, RESULT, SELECTED>>>) => ResourceDuplicator<DuplicatorDefinition<ResourceDefinition<ARGS, RESULT, SELECTED>>>;
4
4
  export type ResourceDuplicatorCreateFn<ARGS, RESULT, SELECTED = never> = (options: DuplicatorOptions<DuplicatorDefinition<ResourceDefinition<ARGS, RESULT, SELECTED>>>) => ResourceDuplicator<DuplicatorDefinition<ResourceDefinition<ARGS, RESULT, SELECTED>>>;
@@ -0,0 +1,35 @@
1
+ import type { ReactiveCache } from "../../../query/lib/ReactiveCache";
2
+ import type { FallbackOnNever, CommandCreateOptions, CommandDefinition, CommandInstance } from "../../../query/types";
3
+ import { CommandAgent } from "./CommandAgent";
4
+ export type CoreCommandQueryState<D extends CommandDefinition> = {
5
+ arg: D['Args'] | null;
6
+ data: FallbackOnNever<D['Selected'], D['Result']> | null;
7
+ error: unknown | null;
8
+ isError: boolean;
9
+ isLoading: boolean;
10
+ isRepeating: boolean;
11
+ isDone: boolean;
12
+ isSuccess: boolean;
13
+ isInitiated: boolean;
14
+ };
15
+ export declare class Command<D extends CommandDefinition> implements CommandInstance<D> {
16
+ private readonly _options;
17
+ private _queriesCache;
18
+ private _hooks;
19
+ private _links;
20
+ private _DEFAULT_CACHE_LIFETIME;
21
+ constructor(_options: CommandCreateOptions<D>);
22
+ private _createLinks;
23
+ createAgent(): CommandAgent<D>;
24
+ getQueryCache(args: D['Args']): ReactiveCache<CoreCommandQueryState<D>> | undefined;
25
+ createQueryCache(args: D['Args'], state?: CoreCommandQueryState<D>): ReactiveCache<CoreCommandQueryState<D>>;
26
+ initiate(args: D['Args'], options?: {
27
+ cache?: ReactiveCache<CoreCommandQueryState<D>>;
28
+ }): ReactiveCache<CoreCommandQueryState<D>>;
29
+ private _initiate;
30
+ /**
31
+ * Используется для обратной совместимости
32
+ * @deprecated
33
+ */
34
+ mutate(args: D['Args']): Promise<D['Data']>;
35
+ }
@@ -0,0 +1,210 @@
1
+ import { PromiseResolver } from "../../../common/utils";
2
+ import { Batcher } from "../../../signals";
3
+ import { QueriesCache } from "../QueriesCache";
4
+ import { QueriesLifetimeHooks } from "../QueriesLifetimeHooks";
5
+ import { CommandAgent } from "./CommandAgent";
6
+ import { ResetAllQueriesSignal } from "../../../query/core/ResetAllQueriesSignal";
7
+ class CommandQueryState {
8
+ static create() {
9
+ return {
10
+ arg: null,
11
+ data: null,
12
+ error: null,
13
+ isError: false,
14
+ isRepeating: false,
15
+ isDone: false,
16
+ isSuccess: false,
17
+ isLoading: false,
18
+ isInitiated: false,
19
+ };
20
+ }
21
+ static load(state = CommandQueryState.create(), args) {
22
+ return {
23
+ ...state,
24
+ arg: args,
25
+ isLoading: true,
26
+ isRepeating: state.isDone,
27
+ isInitiated: true,
28
+ };
29
+ }
30
+ static success(state, data) {
31
+ return {
32
+ ...state,
33
+ data,
34
+ isLoading: false,
35
+ isRepeating: false,
36
+ isDone: true,
37
+ isSuccess: true,
38
+ isError: false,
39
+ error: null,
40
+ };
41
+ }
42
+ static error(state, error) {
43
+ return {
44
+ ...state,
45
+ isLoading: false,
46
+ isRepeating: false,
47
+ isDone: true,
48
+ isSuccess: false,
49
+ isError: true,
50
+ error,
51
+ };
52
+ }
53
+ }
54
+ export class Command {
55
+ _options;
56
+ _queriesCache;
57
+ _hooks;
58
+ _links = [];
59
+ _DEFAULT_CACHE_LIFETIME = 1_000;
60
+ constructor(_options) {
61
+ this._options = _options;
62
+ this._queriesCache = new QueriesCache(this._options.cacheLifetime ?? this._DEFAULT_CACHE_LIFETIME);
63
+ this._hooks = new QueriesLifetimeHooks({
64
+ onCacheEntryAdded: _options.onCacheEntryAdded,
65
+ onQueryStarted: _options.onQueryStarted,
66
+ devtoolsName: _options.devtoolsName,
67
+ });
68
+ this._createLinks();
69
+ ResetAllQueriesSignal.clean$.subscribe(() => {
70
+ const caches = Array.from(this._queriesCache.values());
71
+ caches.forEach((cache) => {
72
+ cache.next(CommandQueryState.create());
73
+ });
74
+ });
75
+ }
76
+ _createLinks() {
77
+ this._options.link?.((linkOptions) => {
78
+ this._links.push(linkOptions);
79
+ });
80
+ }
81
+ createAgent() {
82
+ return new CommandAgent(this);
83
+ }
84
+ getQueryCache(args) {
85
+ return this._queriesCache.getQueryCache(args);
86
+ }
87
+ createQueryCache(args, state = CommandQueryState.create()) {
88
+ const cache = this._queriesCache.createQueryCache(args, state);
89
+ const hookResolvers = this._hooks.onCacheEntryAdded(args);
90
+ const spySub = cache.spy$.subscribe((state) => {
91
+ if (!state.isDone)
92
+ return;
93
+ hookResolvers.cacheDataLoaded();
94
+ spySub.unsubscribe();
95
+ });
96
+ cache.spy$.subscribe((state) => {
97
+ hookResolvers.dataChanged$.next(state);
98
+ });
99
+ cache.onClean$.subscribe(() => {
100
+ hookResolvers.cacheEntryRemoved();
101
+ });
102
+ return cache;
103
+ }
104
+ initiate(args, options) {
105
+ return Batcher.run(() => this._initiate(args, options));
106
+ }
107
+ _initiate(args, options) {
108
+ let cache = options?.cache ?? this.getQueryCache(args);
109
+ const state = CommandQueryState.load(cache?.value, args);
110
+ if (!cache) {
111
+ cache = this.createQueryCache(args, state);
112
+ }
113
+ else {
114
+ cache.next(state);
115
+ }
116
+ const linksMeta = this._links.map(link => {
117
+ const forwardedArgs = link.forwardArgs(args);
118
+ const ref = link.resource.createRef(forwardedArgs);
119
+ return { link, ref, state: {} };
120
+ });
121
+ const query = this._options.queryFn(args);
122
+ const hookResolvers = this._hooks.onQueryStarted(args);
123
+ linksMeta.forEach(({ link, ref, state }) => {
124
+ if (link.lock) {
125
+ state.unlocker = ref.lock();
126
+ }
127
+ if (link.optimisticUpdate && ref.has) {
128
+ state.patch = ref.patch((draft) => {
129
+ return link.optimisticUpdate({ draft, args });
130
+ });
131
+ }
132
+ });
133
+ query
134
+ .then((result) => {
135
+ Batcher.run(() => {
136
+ const data = this._options.select ? this._options.select(result) : result;
137
+ cache.next(CommandQueryState.success(state, data));
138
+ /**
139
+ * Обновляем связанные ресурсы
140
+ */
141
+ linksMeta.forEach(({ link, ref, state }) => {
142
+ if (link.update && ref.has) {
143
+ ref.patch((draft) => {
144
+ return link.update({ draft, args, data });
145
+ })?.commit();
146
+ }
147
+ if (link.create && !ref.has) {
148
+ ref.create(link.create({ args, data }));
149
+ }
150
+ if (link.invalidate) {
151
+ ref.invalidate();
152
+ }
153
+ state.patch?.commit();
154
+ });
155
+ hookResolvers.fulfilledSuccess(data);
156
+ /**
157
+ * Обновляем связанные ресурсы
158
+ */
159
+ linksMeta.forEach(({ state }) => {
160
+ state.unlocker?.unlock();
161
+ });
162
+ });
163
+ })
164
+ .catch((error) => {
165
+ Batcher.run(() => {
166
+ cache.next(CommandQueryState.error(state, error));
167
+ /**
168
+ * Обновляем связанные ресурсы
169
+ */
170
+ linksMeta.forEach(({ state }) => {
171
+ state.patch?.abort();
172
+ });
173
+ hookResolvers.fulfilledError(error);
174
+ /**
175
+ * Обновляем связанные ресурсы
176
+ */
177
+ linksMeta.forEach(({ state }) => {
178
+ state.unlocker?.unlock();
179
+ });
180
+ });
181
+ });
182
+ return cache;
183
+ }
184
+ /**
185
+ * Используется для обратной совместимости
186
+ * @deprecated
187
+ */
188
+ mutate(args) {
189
+ const cache = this.initiate(args);
190
+ const resolver = new PromiseResolver();
191
+ const subscription = cache.value$.obs.subscribe((state) => {
192
+ if (!state.isInitiated || state.isLoading || state.isRepeating)
193
+ return;
194
+ if (state.isError) {
195
+ resolver.reject(state.error);
196
+ return;
197
+ }
198
+ if (!state.isSuccess) {
199
+ console.error("Unexpected state in mutation:", state);
200
+ resolver.reject(new Error("Unexpected state in mutation"));
201
+ return;
202
+ }
203
+ resolver.resolve(state.data);
204
+ });
205
+ resolver.promise.finally(() => {
206
+ subscription.unsubscribe();
207
+ });
208
+ return resolver.promise;
209
+ }
210
+ }
@@ -0,0 +1,19 @@
1
+ import type { CommandAgentInstance, CommandDefinition } from "../../../query/types";
2
+ import type { Command } from "./Command";
3
+ export declare class CommandAgent<D extends CommandDefinition> implements CommandAgentInstance<D> {
4
+ private _command;
5
+ private _commands$;
6
+ state$: import("../../../signals/types").ComputeFn<{
7
+ isLoading: boolean;
8
+ isDone: boolean;
9
+ isSuccess: boolean;
10
+ isError: boolean;
11
+ error: {} | undefined;
12
+ data: NonNullable<import("../../../query/types").FallbackOnNever<D["Selected"], D["Result"]>> | undefined;
13
+ args: D["Args"];
14
+ }>;
15
+ constructor(_command: Command<D>);
16
+ private _next;
17
+ initiate(args: D["Args"]): void;
18
+ createAgent(): CommandAgentInstance<D>;
19
+ }
@@ -0,0 +1,54 @@
1
+ import { Computed, Signal } from "../../../signals";
2
+ export class CommandAgent {
3
+ _command;
4
+ _commands$ = Signal.state({
5
+ current$: null,
6
+ }, { isDisabled: true });
7
+ state$ = Computed.create(() => {
8
+ const commands = this._commands$.get();
9
+ const currState = commands.current$?.value$.get();
10
+ // Нет текущего состояния — дефолт
11
+ if (!currState) {
12
+ return {
13
+ isLoading: false,
14
+ isDone: false,
15
+ isSuccess: false,
16
+ isError: false,
17
+ error: undefined,
18
+ data: undefined,
19
+ args: undefined,
20
+ };
21
+ }
22
+ return {
23
+ isLoading: currState.isLoading,
24
+ isDone: currState.isDone,
25
+ isSuccess: currState.isSuccess,
26
+ isError: currState.isError,
27
+ error: currState.error ?? undefined,
28
+ data: currState.data ?? undefined,
29
+ args: currState.arg,
30
+ };
31
+ }, { isDisabled: true });
32
+ constructor(_command) {
33
+ this._command = _command;
34
+ }
35
+ _next(newCache) {
36
+ this._commands$.set({
37
+ current$: newCache,
38
+ });
39
+ }
40
+ initiate(args) {
41
+ const cache = this._command.getQueryCache(args);
42
+ if (!cache) {
43
+ const newCache = this._command.initiate(args);
44
+ this._next(newCache);
45
+ return;
46
+ }
47
+ // Всегда запускаем команду заново, так как команды обычно не кэшируются как ресурсы
48
+ const newCache = this._command.initiate(args, { cache });
49
+ this._next(newCache);
50
+ }
51
+ createAgent() {
52
+ return new CommandAgent(this._command);
53
+ }
54
+ }
@@ -0,0 +1,2 @@
1
+ export { Command } from './Command';
2
+ export { CommandAgent } from './CommandAgent';
@@ -0,0 +1,2 @@
1
+ export { Command } from './Command';
2
+ export { CommandAgent } from './CommandAgent';
@@ -1,35 +1,8 @@
1
- import type { ReactiveCache } from "@/query/lib/ReactiveCache";
2
- import type { FallbackOnNever, OperationCreateOptions, OperationDefinition, OperationInstance } from "@/query/types";
3
- import { OperationAgent } from "./OperationAgent";
4
- export type CoreOperationQueryState<D extends OperationDefinition> = {
5
- arg: D['Args'] | null;
6
- data: FallbackOnNever<D['Selected'], D['Result']> | null;
7
- error: unknown | null;
8
- isError: boolean;
9
- isLoading: boolean;
10
- isRepeating: boolean;
11
- isDone: boolean;
12
- isSuccess: boolean;
13
- isInitiated: boolean;
14
- };
15
- export declare class Operation<D extends OperationDefinition> implements OperationInstance<D> {
16
- private readonly _options;
17
- private _queriesCache;
18
- private _hooks;
19
- private _links;
20
- private _DEFAULT_CACHE_LIFETIME;
21
- constructor(_options: OperationCreateOptions<D>);
22
- private _createLinks;
23
- createAgent(): OperationAgent<D>;
24
- getQueryCache(args: D['Args']): ReactiveCache<CoreOperationQueryState<D>> | undefined;
25
- createQueryCache(args: D['Args'], state?: CoreOperationQueryState<D>): ReactiveCache<CoreOperationQueryState<D>>;
26
- initiate(args: D['Args'], options?: {
27
- cache?: ReactiveCache<CoreOperationQueryState<D>>;
28
- }): ReactiveCache<CoreOperationQueryState<D>>;
29
- private _initiate;
30
- /**
31
- * Используеются для обртной совместимости, а надо ли менять что-то - хз
32
- * @deprecated
33
- */
34
- mutate(args: D['Args']): Promise<D['Data']>;
35
- }
1
+ /**
2
+ * @deprecated Use `Command` from '../Command/Command' instead. Will be removed in v0.6.0.
3
+ */
4
+ export { Command as Operation } from '../Command/Command';
5
+ /**
6
+ * @deprecated Use `CoreCommandQueryState` from '../Command/Command' instead. Will be removed in v0.6.0.
7
+ */
8
+ export type { CoreCommandQueryState as CoreOperationQueryState } from '../Command/Command';