document-model 1.0.38 → 1.0.39

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.
@@ -59,7 +59,6 @@ export type Action = IAction & {
59
59
  __typename?: 'Action';
60
60
  type: Scalars['String']['output'];
61
61
  };
62
- export type BaseAction = LoadStateAction | PruneAction | RedoAction | SetNameAction | UndoAction | NOOPAction;
63
62
  export type UndoRedoAction = RedoAction | UndoAction;
64
63
  export type DocumentFile = {
65
64
  __typename?: 'DocumentFile';
@@ -9,10 +9,11 @@ export { z } from './schema';
9
9
  export type * from './schema/types';
10
10
  export type { FileInput } from './utils';
11
11
  export type { Immutable } from 'immer';
12
+ export type { BaseAction } from './actions/types';
12
13
  export type ActionSigner = {
13
14
  user: {
14
15
  address: string;
15
- chainId: string;
16
+ chainId: number;
16
17
  };
17
18
  app: {
18
19
  name: string;
@@ -67,12 +67,12 @@ declare const actions: {
67
67
  updateStateExample: (input: import("./gen").UpdateStateExampleInput) => import("./gen").UpdateStateExampleAction;
68
68
  deleteStateExample: (input: import("./gen").DeleteStateExampleInput) => import("./gen").DeleteStateExampleAction;
69
69
  reorderStateExamples: (input: import("./gen").ReorderStateExamplesInput) => import("./gen").ReorderStateExamplesAction;
70
- setName: (name: string) => import("../document").SetNameAction;
71
- undo: (skip?: number, scope?: import("../document").OperationScope) => import("../document").UndoAction;
72
- redo: (count?: number, scope?: import("../document").OperationScope) => import("../document").RedoAction;
73
- prune: (start?: number | undefined, end?: number | undefined, scope?: import("../document").OperationScope) => import("../document").PruneAction;
74
- loadState: <S, T>(state: Pick<import("../document").ExtendedState<S, T>, "name" | "state">, operations: number) => import("../document").LoadStateAction;
75
- noop: (scope?: import("../document").OperationScope) => import("../document").NOOPAction;
70
+ setName: (name: string) => import("../document/actions/types").SetNameAction;
71
+ undo: (skip?: number, scope?: import("../document").OperationScope) => import("../document/actions/types").UndoAction;
72
+ redo: (count?: number, scope?: import("../document").OperationScope) => import("../document/actions/types").RedoAction;
73
+ prune: (start?: number | undefined, end?: number | undefined, scope?: import("../document").OperationScope) => import("../document/actions/types").PruneAction;
74
+ loadState: <S, T>(state: Pick<import("../document").ExtendedState<S, T>, "name" | "state">, operations: number) => import("../document/actions/types").LoadStateAction;
75
+ noop: (scope?: import("../document").OperationScope) => import("../document/actions/types").NOOPAction;
76
76
  };
77
77
  export declare const module: _DocumentModel<DocumentModelState, DocumentModelAction, DocumentModelLocalState, DocumentModel>;
78
78
  export * from './custom/utils';
@@ -1,9 +1,15 @@
1
- import { BaseAction } from '../types';
1
+ import type { Action } from '../types';
2
+ import type { LoadStateActionInput, PruneActionInput, RedoAction as _RedoAction, SetNameAction as _SetNameAction, UndoAction as _UndoAction } from '../schema/types';
2
3
  export declare const SET_NAME = "SET_NAME";
3
4
  export declare const UNDO = "UNDO";
4
5
  export declare const REDO = "REDO";
5
6
  export declare const PRUNE = "PRUNE";
6
7
  export declare const LOAD_STATE = "LOAD_STATE";
7
8
  export declare const NOOP = "NOOP";
8
- export { LoadStateAction, PruneAction, RedoAction, SetNameAction, UndoAction, NOOPAction, } from '../types';
9
- export type { BaseAction };
9
+ export type LoadStateAction = Action<'LOAD_STATE', LoadStateActionInput>;
10
+ export type PruneAction = Action<'PRUNE', PruneActionInput>;
11
+ export type RedoAction = Action<'REDO', _RedoAction['input']>;
12
+ export type SetNameAction = Action<'SET_NAME', _SetNameAction['input']>;
13
+ export type UndoAction = Action<'UNDO', _UndoAction['input']>;
14
+ export type NOOPAction = Action<'NOOP'>;
15
+ export type BaseAction = LoadStateAction | PruneAction | RedoAction | SetNameAction | UndoAction | NOOPAction;