document-model 2.1.0 → 2.3.0
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/browser/cjs/document-model.js +2 -2
- package/dist/browser/cjs/document.js +2 -2
- package/dist/browser/cjs/index.js +2 -2
- package/dist/browser/cjs/index.js.map +1 -1
- package/dist/browser/cjs/internal/{index-UG6TQ_ad.js → index-D7ogZ-1X.js} +94 -210
- package/dist/browser/cjs/internal/index-D7ogZ-1X.js.map +1 -0
- package/dist/{node/cjs/internal/index-5qN282Jw.js → browser/cjs/internal/index-DBZMMMwJ.js} +2 -2
- package/dist/browser/cjs/internal/index-DBZMMMwJ.js.map +1 -0
- package/dist/browser/cjs/internal/{object-CCclzskm.js → object-B5-AIfjI.js} +19 -38
- package/dist/browser/cjs/internal/object-B5-AIfjI.js.map +1 -0
- package/dist/browser/document-model.d.ts +1 -0
- package/dist/browser/document.d.ts +1 -0
- package/dist/browser/es/document-model.js +2 -2
- package/dist/browser/es/document.js +2 -2
- package/dist/browser/es/index.js +2 -2
- package/dist/browser/es/index.js.map +1 -1
- package/dist/browser/es/internal/{index-CDwXQBxG.js → index-CImeZ8j7.js} +94 -210
- package/dist/browser/es/internal/index-CImeZ8j7.js.map +1 -0
- package/dist/browser/es/internal/{index-v4H3kbAF.js → index-CvhVkkup.js} +2 -2
- package/dist/browser/es/internal/index-CvhVkkup.js.map +1 -0
- package/dist/browser/es/internal/{object-CU5T1DpX.js → object-DEjLfGoe.js} +19 -38
- package/dist/browser/es/internal/object-DEjLfGoe.js.map +1 -0
- package/dist/browser/index.d.ts +3 -0
- package/dist/browser/src/document/actions/creators.d.ts +0 -1
- package/dist/browser/src/document/actions/index.d.ts +0 -1
- package/dist/browser/src/document/actions/types.d.ts +6 -7
- package/dist/browser/src/document/object.d.ts +1 -2
- package/dist/browser/src/document/reducer.d.ts +0 -1
- package/dist/browser/src/document/schema/types.d.ts +48 -49
- package/dist/browser/src/document/schema/zod.d.ts +0 -1
- package/dist/browser/src/document/signal.d.ts +3 -4
- package/dist/browser/src/document/types.d.ts +3 -4
- package/dist/browser/src/document/utils/base.d.ts +2 -3
- package/dist/browser/src/document/utils/crypto.d.ts +2 -3
- package/dist/browser/src/document/utils/document-helpers.d.ts +1 -2
- package/dist/browser/src/document/utils/file.d.ts +0 -1
- package/dist/browser/src/document/utils/node.d.ts +0 -1
- package/dist/browser/src/document/utils/validation.d.ts +0 -1
- package/dist/browser/src/document-model/custom/reducers/header.d.ts +0 -1
- package/dist/browser/src/document-model/custom/reducers/module.d.ts +0 -1
- package/dist/browser/src/document-model/custom/reducers/operation-error.d.ts +0 -1
- package/dist/browser/src/document-model/custom/reducers/operation-example.d.ts +0 -1
- package/dist/browser/src/document-model/custom/reducers/operation.d.ts +0 -1
- package/dist/browser/src/document-model/custom/reducers/state.d.ts +0 -1
- package/dist/browser/src/document-model/custom/reducers/versioning.d.ts +0 -1
- package/dist/browser/src/document-model/custom/utils.d.ts +0 -1
- package/dist/browser/src/document-model/gen/actions.d.ts +0 -1
- package/dist/browser/src/document-model/gen/document-model.d.ts +0 -1
- package/dist/browser/src/document-model/gen/header/actions.d.ts +6 -7
- package/dist/browser/src/document-model/gen/header/creators.d.ts +0 -1
- package/dist/browser/src/document-model/gen/header/object.d.ts +0 -1
- package/dist/browser/src/document-model/gen/header/operations.d.ts +0 -1
- package/dist/browser/src/document-model/gen/module/actions.d.ts +5 -6
- package/dist/browser/src/document-model/gen/module/creators.d.ts +0 -1
- package/dist/browser/src/document-model/gen/module/object.d.ts +0 -1
- package/dist/browser/src/document-model/gen/module/operations.d.ts +0 -1
- package/dist/browser/src/document-model/gen/object.d.ts +0 -1
- package/dist/browser/src/document-model/gen/operation/actions.d.ts +10 -11
- package/dist/browser/src/document-model/gen/operation/creators.d.ts +0 -1
- package/dist/browser/src/document-model/gen/operation/object.d.ts +0 -1
- package/dist/browser/src/document-model/gen/operation/operations.d.ts +0 -1
- package/dist/browser/src/document-model/gen/operation-error/actions.d.ts +7 -8
- package/dist/browser/src/document-model/gen/operation-error/creators.d.ts +0 -1
- package/dist/browser/src/document-model/gen/operation-error/object.d.ts +0 -1
- package/dist/browser/src/document-model/gen/operation-error/operations.d.ts +0 -1
- package/dist/browser/src/document-model/gen/operation-example/actions.d.ts +4 -5
- package/dist/browser/src/document-model/gen/operation-example/creators.d.ts +0 -1
- package/dist/browser/src/document-model/gen/operation-example/object.d.ts +0 -1
- package/dist/browser/src/document-model/gen/operation-example/operations.d.ts +0 -1
- package/dist/browser/src/document-model/gen/reducer.d.ts +1 -2
- package/dist/browser/src/document-model/gen/schema/types.d.ts +125 -126
- package/dist/browser/src/document-model/gen/schema/zod.d.ts +0 -1
- package/dist/browser/src/document-model/gen/state/actions.d.ts +6 -7
- package/dist/browser/src/document-model/gen/state/creators.d.ts +0 -1
- package/dist/browser/src/document-model/gen/state/object.d.ts +0 -1
- package/dist/browser/src/document-model/gen/state/operations.d.ts +0 -1
- package/dist/browser/src/document-model/gen/types.d.ts +0 -1
- package/dist/browser/src/document-model/gen/utils.d.ts +0 -1
- package/dist/browser/src/document-model/gen/versioning/actions.d.ts +5 -6
- package/dist/browser/src/document-model/gen/versioning/creators.d.ts +0 -1
- package/dist/browser/src/document-model/gen/versioning/object.d.ts +0 -1
- package/dist/browser/src/document-model/gen/versioning/operations.d.ts +0 -1
- package/dist/browser/src/document-model/index.d.ts +0 -1
- package/dist/browser/src/index.d.ts +4 -4
- package/dist/browser/test/document/crypto.test.d.ts +1 -0
- package/dist/browser/test/document/event-vs-command.test.d.ts +1 -0
- package/dist/browser/test/document/local.test.d.ts +1 -0
- package/dist/browser/test/document/object.test.d.ts +1 -0
- package/dist/browser/test/document/operation-id.test.d.ts +1 -0
- package/dist/browser/test/document/prune.test.d.ts +1 -0
- package/dist/browser/test/document/reducer.test.d.ts +1 -0
- package/dist/browser/test/document/skip-operations.test.d.ts +1 -0
- package/dist/browser/test/document/undo-redo.test.d.ts +1 -0
- package/dist/browser/test/document/utils.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/addUndo.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/attachBranch.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/checkCleanedOperationsIntegrity.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/conflictResolution.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/filterDuplicatedOperations.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/garbageCollect.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/groupOperationsByScope.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/merge.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/nextSkipNumber.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/prepareOperations.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/removeExistingOperations.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/reshuffleByTimestamp.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/reshuffleByTimestampAndIndex.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/skipHeaderOperations.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/sortOperations.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/split.test.d.ts +1 -0
- package/dist/browser/test/document-helpers/utils.d.ts +7 -0
- package/dist/browser/test/document-model/object.test.d.ts +1 -0
- package/dist/browser/test/document-model/replay.test.d.ts +1 -0
- package/dist/browser/test/document-model/skip-operations.test.d.ts +1 -0
- package/dist/browser/test/document-model/validation.test.d.ts +1 -0
- package/dist/browser/test/document-model/zip.test.d.ts +1 -0
- package/dist/browser/test/helpers.d.ts +39 -0
- package/dist/node/cjs/document-model.js +2 -2
- package/dist/node/cjs/document.js +2 -2
- package/dist/node/cjs/index.js +2 -2
- package/dist/node/cjs/index.js.map +1 -1
- package/dist/{browser/cjs/internal/index-jRdLtWv9.js → node/cjs/internal/index-BBbycjES.js} +2 -2
- package/dist/node/cjs/internal/index-BBbycjES.js.map +1 -0
- package/dist/node/cjs/internal/{index-Bm-pIfaz.js → index-Dlf49-AQ.js} +94 -210
- package/dist/node/cjs/internal/index-Dlf49-AQ.js.map +1 -0
- package/dist/node/cjs/internal/{object-BMOaYPkd.js → object-DzLAPebv.js} +19 -38
- package/dist/node/cjs/internal/object-DzLAPebv.js.map +1 -0
- package/dist/node/document-model.d.ts +1 -0
- package/dist/node/document.d.ts +1 -0
- package/dist/node/es/document-model.js +2 -2
- package/dist/node/es/document.js +2 -2
- package/dist/node/es/index.js +2 -2
- package/dist/node/es/index.js.map +1 -1
- package/dist/node/es/internal/{index-CVuLZAmf.js → index-BJGNYShV.js} +2 -2
- package/dist/node/es/internal/index-BJGNYShV.js.map +1 -0
- package/dist/node/es/internal/{index-CAjAt1Xx.js → index-DWctPhBy.js} +94 -210
- package/dist/node/es/internal/index-DWctPhBy.js.map +1 -0
- package/dist/node/es/internal/{object-COSf2HUT.js → object-DkTQ4HGg.js} +19 -38
- package/dist/node/es/internal/object-DkTQ4HGg.js.map +1 -0
- package/dist/node/index.d.ts +3 -0
- package/dist/node/src/document/actions/creators.d.ts +0 -1
- package/dist/node/src/document/actions/index.d.ts +0 -1
- package/dist/node/src/document/actions/types.d.ts +6 -7
- package/dist/node/src/document/object.d.ts +1 -2
- package/dist/node/src/document/reducer.d.ts +0 -1
- package/dist/node/src/document/schema/types.d.ts +48 -49
- package/dist/node/src/document/schema/zod.d.ts +0 -1
- package/dist/node/src/document/signal.d.ts +3 -4
- package/dist/node/src/document/types.d.ts +3 -4
- package/dist/node/src/document/utils/base.d.ts +2 -3
- package/dist/node/src/document/utils/crypto.d.ts +2 -3
- package/dist/node/src/document/utils/document-helpers.d.ts +1 -2
- package/dist/node/src/document/utils/file.d.ts +0 -1
- package/dist/node/src/document/utils/node.d.ts +0 -1
- package/dist/node/src/document/utils/validation.d.ts +0 -1
- package/dist/node/src/document-model/custom/reducers/header.d.ts +0 -1
- package/dist/node/src/document-model/custom/reducers/module.d.ts +0 -1
- package/dist/node/src/document-model/custom/reducers/operation-error.d.ts +0 -1
- package/dist/node/src/document-model/custom/reducers/operation-example.d.ts +0 -1
- package/dist/node/src/document-model/custom/reducers/operation.d.ts +0 -1
- package/dist/node/src/document-model/custom/reducers/state.d.ts +0 -1
- package/dist/node/src/document-model/custom/reducers/versioning.d.ts +0 -1
- package/dist/node/src/document-model/custom/utils.d.ts +0 -1
- package/dist/node/src/document-model/gen/actions.d.ts +0 -1
- package/dist/node/src/document-model/gen/document-model.d.ts +0 -1
- package/dist/node/src/document-model/gen/header/actions.d.ts +6 -7
- package/dist/node/src/document-model/gen/header/creators.d.ts +0 -1
- package/dist/node/src/document-model/gen/header/object.d.ts +0 -1
- package/dist/node/src/document-model/gen/header/operations.d.ts +0 -1
- package/dist/node/src/document-model/gen/module/actions.d.ts +5 -6
- package/dist/node/src/document-model/gen/module/creators.d.ts +0 -1
- package/dist/node/src/document-model/gen/module/object.d.ts +0 -1
- package/dist/node/src/document-model/gen/module/operations.d.ts +0 -1
- package/dist/node/src/document-model/gen/object.d.ts +0 -1
- package/dist/node/src/document-model/gen/operation/actions.d.ts +10 -11
- package/dist/node/src/document-model/gen/operation/creators.d.ts +0 -1
- package/dist/node/src/document-model/gen/operation/object.d.ts +0 -1
- package/dist/node/src/document-model/gen/operation/operations.d.ts +0 -1
- package/dist/node/src/document-model/gen/operation-error/actions.d.ts +7 -8
- package/dist/node/src/document-model/gen/operation-error/creators.d.ts +0 -1
- package/dist/node/src/document-model/gen/operation-error/object.d.ts +0 -1
- package/dist/node/src/document-model/gen/operation-error/operations.d.ts +0 -1
- package/dist/node/src/document-model/gen/operation-example/actions.d.ts +4 -5
- package/dist/node/src/document-model/gen/operation-example/creators.d.ts +0 -1
- package/dist/node/src/document-model/gen/operation-example/object.d.ts +0 -1
- package/dist/node/src/document-model/gen/operation-example/operations.d.ts +0 -1
- package/dist/node/src/document-model/gen/reducer.d.ts +1 -2
- package/dist/node/src/document-model/gen/schema/types.d.ts +125 -126
- package/dist/node/src/document-model/gen/schema/zod.d.ts +0 -1
- package/dist/node/src/document-model/gen/state/actions.d.ts +6 -7
- package/dist/node/src/document-model/gen/state/creators.d.ts +0 -1
- package/dist/node/src/document-model/gen/state/object.d.ts +0 -1
- package/dist/node/src/document-model/gen/state/operations.d.ts +0 -1
- package/dist/node/src/document-model/gen/types.d.ts +0 -1
- package/dist/node/src/document-model/gen/utils.d.ts +0 -1
- package/dist/node/src/document-model/gen/versioning/actions.d.ts +5 -6
- package/dist/node/src/document-model/gen/versioning/creators.d.ts +0 -1
- package/dist/node/src/document-model/gen/versioning/object.d.ts +0 -1
- package/dist/node/src/document-model/gen/versioning/operations.d.ts +0 -1
- package/dist/node/src/document-model/index.d.ts +0 -1
- package/dist/node/src/index.d.ts +4 -4
- package/dist/node/test/document/crypto.test.d.ts +1 -0
- package/dist/node/test/document/event-vs-command.test.d.ts +1 -0
- package/dist/node/test/document/local.test.d.ts +1 -0
- package/dist/node/test/document/object.test.d.ts +1 -0
- package/dist/node/test/document/operation-id.test.d.ts +1 -0
- package/dist/node/test/document/prune.test.d.ts +1 -0
- package/dist/node/test/document/reducer.test.d.ts +1 -0
- package/dist/node/test/document/skip-operations.test.d.ts +1 -0
- package/dist/node/test/document/undo-redo.test.d.ts +1 -0
- package/dist/node/test/document/utils.test.d.ts +1 -0
- package/dist/node/test/document-helpers/addUndo.test.d.ts +1 -0
- package/dist/node/test/document-helpers/attachBranch.test.d.ts +1 -0
- package/dist/node/test/document-helpers/checkCleanedOperationsIntegrity.test.d.ts +1 -0
- package/dist/node/test/document-helpers/conflictResolution.test.d.ts +1 -0
- package/dist/node/test/document-helpers/filterDuplicatedOperations.test.d.ts +1 -0
- package/dist/node/test/document-helpers/garbageCollect.test.d.ts +1 -0
- package/dist/node/test/document-helpers/groupOperationsByScope.test.d.ts +1 -0
- package/dist/node/test/document-helpers/merge.test.d.ts +1 -0
- package/dist/node/test/document-helpers/nextSkipNumber.test.d.ts +1 -0
- package/dist/node/test/document-helpers/prepareOperations.test.d.ts +1 -0
- package/dist/node/test/document-helpers/removeExistingOperations.test.d.ts +1 -0
- package/dist/node/test/document-helpers/reshuffleByTimestamp.test.d.ts +1 -0
- package/dist/node/test/document-helpers/reshuffleByTimestampAndIndex.test.d.ts +1 -0
- package/dist/node/test/document-helpers/skipHeaderOperations.test.d.ts +1 -0
- package/dist/node/test/document-helpers/sortOperations.test.d.ts +1 -0
- package/dist/node/test/document-helpers/split.test.d.ts +1 -0
- package/dist/node/test/document-helpers/utils.d.ts +7 -0
- package/dist/node/test/document-model/object.test.d.ts +1 -0
- package/dist/node/test/document-model/replay.test.d.ts +1 -0
- package/dist/node/test/document-model/skip-operations.test.d.ts +1 -0
- package/dist/node/test/document-model/validation.test.d.ts +1 -0
- package/dist/node/test/document-model/zip.test.d.ts +1 -0
- package/dist/node/test/helpers.d.ts +39 -0
- package/package.json +78 -84
- package/dist/browser/cjs/internal/index-UG6TQ_ad.js.map +0 -1
- package/dist/browser/cjs/internal/index-jRdLtWv9.js.map +0 -1
- package/dist/browser/cjs/internal/object-CCclzskm.js.map +0 -1
- package/dist/browser/es/internal/index-CDwXQBxG.js.map +0 -1
- package/dist/browser/es/internal/index-v4H3kbAF.js.map +0 -1
- package/dist/browser/es/internal/object-CU5T1DpX.js.map +0 -1
- package/dist/node/cjs/internal/index-5qN282Jw.js.map +0 -1
- package/dist/node/cjs/internal/index-Bm-pIfaz.js.map +0 -1
- package/dist/node/cjs/internal/object-BMOaYPkd.js.map +0 -1
- package/dist/node/es/internal/index-CAjAt1Xx.js.map +0 -1
- package/dist/node/es/internal/index-CVuLZAmf.js.map +0 -1
- package/dist/node/es/internal/object-COSf2HUT.js.map +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { OperationScope } from '..';
|
|
2
|
-
|
|
3
2
|
export type Maybe<T> = T | null;
|
|
4
3
|
export type InputMaybe<T> = T | null | undefined;
|
|
5
4
|
export type Exact<T extends Record<string, unknown>> = {
|
|
@@ -15,7 +14,7 @@ export type MakeEmpty<T extends Record<string, unknown>, K extends keyof T> = {
|
|
|
15
14
|
[_ in K]?: never;
|
|
16
15
|
};
|
|
17
16
|
export type Incremental<T> = T | {
|
|
18
|
-
[P in keyof T]?: P extends
|
|
17
|
+
[P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never;
|
|
19
18
|
};
|
|
20
19
|
/** All built-in and custom scalars, mapped to their actual values */
|
|
21
20
|
export type Scalars = {
|
|
@@ -57,50 +56,50 @@ export type Scalars = {
|
|
|
57
56
|
};
|
|
58
57
|
};
|
|
59
58
|
export type Action = IAction & {
|
|
60
|
-
__typename?:
|
|
61
|
-
type: Scalars[
|
|
59
|
+
__typename?: "Action";
|
|
60
|
+
type: Scalars["String"]["output"];
|
|
62
61
|
};
|
|
63
62
|
export type UndoRedoAction = RedoAction | UndoAction;
|
|
64
63
|
export type DocumentFile = {
|
|
65
|
-
__typename?:
|
|
66
|
-
data: Scalars[
|
|
67
|
-
extension: Maybe<Scalars[
|
|
68
|
-
fileName: Maybe<Scalars[
|
|
69
|
-
mimeType: Scalars[
|
|
64
|
+
__typename?: "DocumentFile";
|
|
65
|
+
data: Scalars["String"]["output"];
|
|
66
|
+
extension: Maybe<Scalars["String"]["output"]>;
|
|
67
|
+
fileName: Maybe<Scalars["String"]["output"]>;
|
|
68
|
+
mimeType: Scalars["String"]["output"];
|
|
70
69
|
};
|
|
71
70
|
export type IAction = {
|
|
72
|
-
type: Scalars[
|
|
71
|
+
type: Scalars["String"]["output"];
|
|
73
72
|
};
|
|
74
73
|
export type IDocument = {
|
|
75
|
-
created: Scalars[
|
|
76
|
-
documentType: Scalars[
|
|
77
|
-
lastModified: Scalars[
|
|
78
|
-
name: Scalars[
|
|
74
|
+
created: Scalars["DateTime"]["output"];
|
|
75
|
+
documentType: Scalars["String"]["output"];
|
|
76
|
+
lastModified: Scalars["DateTime"]["output"];
|
|
77
|
+
name: Scalars["String"]["output"];
|
|
79
78
|
operations: Array<IOperation>;
|
|
80
|
-
revision: Scalars[
|
|
79
|
+
revision: Scalars["Int"]["output"];
|
|
81
80
|
};
|
|
82
81
|
export type IOperation = {
|
|
83
|
-
hash: Scalars[
|
|
84
|
-
index: Scalars[
|
|
85
|
-
timestamp: Scalars[
|
|
86
|
-
type: Scalars[
|
|
82
|
+
hash: Scalars["String"]["output"];
|
|
83
|
+
index: Scalars["Int"]["output"];
|
|
84
|
+
timestamp: Scalars["DateTime"]["output"];
|
|
85
|
+
type: Scalars["String"]["output"];
|
|
87
86
|
};
|
|
88
|
-
export type Load_State =
|
|
87
|
+
export type Load_State = "LOAD_STATE";
|
|
89
88
|
export type LoadStateAction = {
|
|
90
89
|
input: LoadStateActionInput;
|
|
91
90
|
type: Load_State;
|
|
92
91
|
scope: OperationScope;
|
|
93
92
|
};
|
|
94
93
|
export type LoadStateActionInput = {
|
|
95
|
-
operations: Scalars[
|
|
94
|
+
operations: Scalars["Int"]["input"];
|
|
96
95
|
state: LoadStateActionStateInput;
|
|
97
96
|
};
|
|
98
97
|
export type LoadStateActionStateInput = {
|
|
99
|
-
data?: InputMaybe<Scalars[
|
|
100
|
-
name: Scalars[
|
|
98
|
+
data?: InputMaybe<Scalars["Unknown"]["input"]>;
|
|
99
|
+
name: Scalars["String"]["input"];
|
|
101
100
|
};
|
|
102
101
|
export type Mutation = {
|
|
103
|
-
__typename?:
|
|
102
|
+
__typename?: "Mutation";
|
|
104
103
|
loadState: Maybe<IDocument>;
|
|
105
104
|
prune: Maybe<IDocument>;
|
|
106
105
|
redo: Maybe<IDocument>;
|
|
@@ -123,55 +122,55 @@ export type MutationUndoArgs = {
|
|
|
123
122
|
input: UndoAction;
|
|
124
123
|
};
|
|
125
124
|
export type Operation = IOperation & {
|
|
126
|
-
__typename?:
|
|
127
|
-
hash: Scalars[
|
|
128
|
-
index: Scalars[
|
|
129
|
-
timestamp: Scalars[
|
|
130
|
-
type: Scalars[
|
|
125
|
+
__typename?: "Operation";
|
|
126
|
+
hash: Scalars["String"]["output"];
|
|
127
|
+
index: Scalars["Int"]["output"];
|
|
128
|
+
timestamp: Scalars["DateTime"]["output"];
|
|
129
|
+
type: Scalars["String"]["output"];
|
|
131
130
|
};
|
|
132
|
-
export type Prune =
|
|
131
|
+
export type Prune = "PRUNE";
|
|
133
132
|
export type PruneAction = {
|
|
134
133
|
input: PruneActionInput;
|
|
135
134
|
type: Prune;
|
|
136
135
|
scope: OperationScope;
|
|
137
136
|
};
|
|
138
137
|
export type PruneActionInput = {
|
|
139
|
-
end?: InputMaybe<Scalars[
|
|
140
|
-
start?: InputMaybe<Scalars[
|
|
138
|
+
end?: InputMaybe<Scalars["Int"]["input"]>;
|
|
139
|
+
start?: InputMaybe<Scalars["Int"]["input"]>;
|
|
141
140
|
};
|
|
142
141
|
export type Query = {
|
|
143
|
-
__typename?:
|
|
142
|
+
__typename?: "Query";
|
|
144
143
|
document: Maybe<IDocument>;
|
|
145
144
|
};
|
|
146
|
-
export type Redo =
|
|
145
|
+
export type Redo = "REDO";
|
|
147
146
|
export type RedoAction = {
|
|
148
|
-
input: Scalars[
|
|
147
|
+
input: Scalars["Int"]["input"];
|
|
149
148
|
type: Redo;
|
|
150
149
|
scope: OperationScope;
|
|
151
150
|
};
|
|
152
|
-
export type Set_Name =
|
|
151
|
+
export type Set_Name = "SET_NAME";
|
|
153
152
|
export type SetNameAction = {
|
|
154
|
-
input: Scalars[
|
|
153
|
+
input: Scalars["String"]["input"];
|
|
155
154
|
type: Set_Name;
|
|
156
|
-
scope:
|
|
155
|
+
scope: "global";
|
|
157
156
|
};
|
|
158
157
|
export type SetNameOperation = IOperation & {
|
|
159
|
-
__typename?:
|
|
160
|
-
hash: Scalars[
|
|
161
|
-
index: Scalars[
|
|
162
|
-
input: Scalars[
|
|
163
|
-
timestamp: Scalars[
|
|
164
|
-
type: Scalars[
|
|
165
|
-
};
|
|
166
|
-
export type Undo =
|
|
158
|
+
__typename?: "SetNameOperation";
|
|
159
|
+
hash: Scalars["String"]["output"];
|
|
160
|
+
index: Scalars["Int"]["output"];
|
|
161
|
+
input: Scalars["String"]["output"];
|
|
162
|
+
timestamp: Scalars["DateTime"]["output"];
|
|
163
|
+
type: Scalars["String"]["output"];
|
|
164
|
+
};
|
|
165
|
+
export type Undo = "UNDO";
|
|
167
166
|
export type UndoAction = {
|
|
168
|
-
input: Scalars[
|
|
167
|
+
input: Scalars["Int"]["input"];
|
|
169
168
|
type: Undo;
|
|
170
169
|
scope: OperationScope;
|
|
171
170
|
};
|
|
172
|
-
export type NOOP =
|
|
171
|
+
export type NOOP = "NOOP";
|
|
173
172
|
export type NOOPAction = {
|
|
174
|
-
input: Scalars[
|
|
173
|
+
input: Scalars["Unknown"]["input"];
|
|
175
174
|
type: NOOP;
|
|
176
175
|
scope: OperationScope;
|
|
177
176
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Action, DocumentFile, Load_State, LoadStateAction, LoadStateActionInput, LoadStateActionStateInput, Operation, Prune, PruneAction, PruneActionInput, Redo, RedoAction, Set_Name, SetNameAction, SetNameOperation, Undo, UndoAction } from '.';
|
|
3
3
|
import { OperationScope } from '../types';
|
|
4
|
-
|
|
5
4
|
type Properties<T> = Required<{
|
|
6
5
|
[K in keyof T]: z.ZodType<T[K], any, T[K]>;
|
|
7
6
|
}>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Document, OperationScope } from './types';
|
|
2
|
-
|
|
3
2
|
export interface ISignal<T extends string = string, I = unknown> {
|
|
4
3
|
type: T;
|
|
5
4
|
input: I;
|
|
@@ -15,16 +14,16 @@ export type CreateChildDocumentInput = {
|
|
|
15
14
|
document?: Document;
|
|
16
15
|
synchronizationUnits: SynchronizationUnit[];
|
|
17
16
|
};
|
|
18
|
-
export type CreateChildDocumentSignal = ISignal<
|
|
17
|
+
export type CreateChildDocumentSignal = ISignal<"CREATE_CHILD_DOCUMENT", CreateChildDocumentInput>;
|
|
19
18
|
export type DeleteChildDocumentInput = {
|
|
20
19
|
id: string;
|
|
21
20
|
};
|
|
22
|
-
export type DeleteChildDocumentSignal = ISignal<
|
|
21
|
+
export type DeleteChildDocumentSignal = ISignal<"DELETE_CHILD_DOCUMENT", DeleteChildDocumentInput>;
|
|
23
22
|
export type CopyChildDocumentInput = {
|
|
24
23
|
id: string;
|
|
25
24
|
newId: string;
|
|
26
25
|
synchronizationUnits: SynchronizationUnit[];
|
|
27
26
|
};
|
|
28
|
-
export type CopyChildDocumentSignal = ISignal<
|
|
27
|
+
export type CopyChildDocumentSignal = ISignal<"COPY_CHILD_DOCUMENT", CopyChildDocumentInput>;
|
|
29
28
|
export type Signal = CreateChildDocumentSignal | DeleteChildDocumentSignal | CopyChildDocumentSignal;
|
|
30
29
|
export type SignalDispatch = (signal: Signal) => void;
|
|
@@ -5,7 +5,6 @@ import { BaseAction } from './actions/types';
|
|
|
5
5
|
import { BaseDocument } from './object';
|
|
6
6
|
import { FileInput } from './utils';
|
|
7
7
|
import { SignalDispatch } from './signal';
|
|
8
|
-
|
|
9
8
|
export { z } from './schema';
|
|
10
9
|
export type * from './schema/types';
|
|
11
10
|
export type { FileInput } from './utils';
|
|
@@ -88,7 +87,7 @@ export type StateReducer<S, A extends Action, L = unknown> = ImmutableStateReduc
|
|
|
88
87
|
* Global: The operation is synchronized everywhere in the network. This is the default document operation.
|
|
89
88
|
* Local: The operation is applied only locally (to a local state). Used for local settings such as a drive's local path
|
|
90
89
|
*/
|
|
91
|
-
export type OperationScope =
|
|
90
|
+
export type OperationScope = "global" | "local";
|
|
92
91
|
/**
|
|
93
92
|
* An operation that was applied to a {@link Document}.
|
|
94
93
|
*
|
|
@@ -173,7 +172,7 @@ export type MappedOperation<A extends Action> = {
|
|
|
173
172
|
export type DocumentOperationsIgnoreMap<A extends Action> = Required<Record<OperationScope, MappedOperation<A>[]>>;
|
|
174
173
|
export type OperationSignatureContext = {
|
|
175
174
|
documentId: string;
|
|
176
|
-
signer: Omit<ActionSigner,
|
|
175
|
+
signer: Omit<ActionSigner, "signatures"> & {
|
|
177
176
|
signatures?: Signature[];
|
|
178
177
|
};
|
|
179
178
|
operation: Operation;
|
|
@@ -241,7 +240,7 @@ export type User = {
|
|
|
241
240
|
ens?: ENSInfo;
|
|
242
241
|
};
|
|
243
242
|
export type EditorContext = {
|
|
244
|
-
theme:
|
|
243
|
+
theme: "light" | "dark";
|
|
245
244
|
debug?: boolean;
|
|
246
245
|
user?: User;
|
|
247
246
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { baseReducer, mutableBaseReducer } from '../reducer';
|
|
2
2
|
import { Action, BaseAction, UndoRedoAction, Document, ExtendedState, ImmutableStateReducer, Reducer, OperationScope, State, CreateState, PartialState, DocumentOperations, DocumentHeader, DocumentOperationsIgnoreMap, Operation, MappedOperation, ReducerOptions, UndoAction } from '../types';
|
|
3
3
|
import { SignalDispatch } from '../signal';
|
|
4
|
-
|
|
5
4
|
export declare function isNoopOperation(op: Partial<Operation>): boolean;
|
|
6
5
|
export declare function isUndoRedo(action: Action): action is UndoRedoAction;
|
|
7
6
|
export declare function isUndo(action: Action): action is UndoAction;
|
|
@@ -26,8 +25,8 @@ export declare function isBaseAction(action: Action): action is BaseAction;
|
|
|
26
25
|
*
|
|
27
26
|
* @returns The new action.
|
|
28
27
|
*/
|
|
29
|
-
export declare function createAction<A extends Action>(type: A[
|
|
30
|
-
parse(v: unknown): A[
|
|
28
|
+
export declare function createAction<A extends Action>(type: A["type"], input?: A["input"], attachments?: Action["attachments"], validator?: () => {
|
|
29
|
+
parse(v: unknown): A["input"];
|
|
31
30
|
}, scope?: OperationScope): A;
|
|
32
31
|
/**
|
|
33
32
|
* Helper function to create a document model reducer.
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Action, ActionSigner, BaseAction, Document, Operation, OperationSignatureContext, OperationSigningHandler, OperationVerificationHandler, Reducer, Signature } from '../types';
|
|
2
|
-
|
|
3
2
|
export declare function getUnixTimestamp(date: Date | string): string;
|
|
4
3
|
export declare function buildOperationSignatureParams({ documentId, signer, operation, previousStateHash, }: OperationSignatureContext): [string, string, string, string];
|
|
5
4
|
export declare function buildOperationSignatureMessage(params: [string, string, string, string]): Uint8Array;
|
|
6
5
|
export declare function ab2hex(ab: ArrayBuffer): string;
|
|
7
6
|
export declare function hex2ab(hex: string): Uint8Array;
|
|
8
7
|
export declare function buildOperationSignature(context: OperationSignatureContext, signMethod: OperationSigningHandler): Promise<Signature>;
|
|
9
|
-
export declare function buildSignedOperation<T, A extends Action, L>(action: A | Operation<A>, reducer: Reducer<T, A, L>, document: Document<T, A, L>, context: Omit<OperationSignatureContext,
|
|
10
|
-
export declare function verifyOperationSignature<T, A extends Action, L>(signature: Signature, signer: Omit<ActionSigner,
|
|
8
|
+
export declare function buildSignedOperation<T, A extends Action, L>(action: A | Operation<A>, reducer: Reducer<T, A, L>, document: Document<T, A, L>, context: Omit<OperationSignatureContext, "operation" | "previousStateHash">, signHandler: OperationSigningHandler): Promise<Operation<A | BaseAction>>;
|
|
9
|
+
export declare function verifyOperationSignature<T, A extends Action, L>(signature: Signature, signer: Omit<ActionSigner, "signatures">, verifyHandler: OperationVerificationHandler): Promise<boolean>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Operation, OperationScope, Action, DocumentOperations } from '../types';
|
|
2
|
-
|
|
3
2
|
export type OperationIndex = {
|
|
4
3
|
index: number;
|
|
5
4
|
skip: number;
|
|
@@ -41,7 +40,7 @@ type PrepareOperationsResult = {
|
|
|
41
40
|
};
|
|
42
41
|
export declare const prepareOperations: (operationsHistory: Operation[], newOperations: Operation[]) => PrepareOperationsResult;
|
|
43
42
|
export declare function removeExistingOperations(newOperations: Operation[], operationsHistory: Operation[]): Operation[];
|
|
44
|
-
export type SkipHeaderOperationIndex = Partial<Pick<OperationIndex,
|
|
43
|
+
export type SkipHeaderOperationIndex = Partial<Pick<OperationIndex, "index">> & Pick<OperationIndex, "skip">;
|
|
45
44
|
/**
|
|
46
45
|
* Skips header operations and returns the remaining operations.
|
|
47
46
|
*
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { default as JSZip } from 'jszip';
|
|
2
2
|
import { Action, AttachmentInput, Document, Reducer } from '../types';
|
|
3
3
|
import { ReplayDocumentOptions } from './base';
|
|
4
|
-
|
|
5
4
|
export type FileInput = string | number[] | Uint8Array | ArrayBuffer | Blob;
|
|
6
5
|
export declare const createZip: (document: Document) => Promise<JSZip>;
|
|
7
6
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ValidationError } from '../../document';
|
|
2
2
|
import { Module, Operation } from '../gen/schema';
|
|
3
|
-
|
|
4
3
|
export declare function validateInitialState(initialState: string, allowEmptyState?: boolean): ValidationError[];
|
|
5
4
|
export declare function validateStateSchemaName(schema: string, documentName: string, scope?: string, allowEmptySchema?: boolean): ValidationError[];
|
|
6
5
|
export declare function validateModules(modules: Array<Module>): ValidationError[];
|
|
@@ -5,7 +5,6 @@ import { DocumentModelOperationErrorAction } from './operation-error/actions';
|
|
|
5
5
|
import { DocumentModelOperationExampleAction } from './operation-example/actions';
|
|
6
6
|
import { DocumentModelOperationAction } from './operation/actions';
|
|
7
7
|
import { DocumentModelStateAction } from './state/actions';
|
|
8
|
-
|
|
9
8
|
export * from './header/actions';
|
|
10
9
|
export * from './versioning/actions';
|
|
11
10
|
export * from './module/actions';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Action } from '../../../document';
|
|
2
2
|
import { SetModelNameInput, SetModelIdInput, SetModelExtensionInput, SetModelDescriptionInput, SetAuthorNameInput, SetAuthorWebsiteInput } from '../types';
|
|
3
|
-
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
export type SetAuthorWebsiteAction = Action<'SET_AUTHOR_WEBSITE', SetAuthorWebsiteInput>;
|
|
3
|
+
export type SetModelNameAction = Action<"SET_MODEL_NAME", SetModelNameInput>;
|
|
4
|
+
export type SetModelIdAction = Action<"SET_MODEL_ID", SetModelIdInput>;
|
|
5
|
+
export type SetModelExtensionAction = Action<"SET_MODEL_EXTENSION", SetModelExtensionInput>;
|
|
6
|
+
export type SetModelDescriptionAction = Action<"SET_MODEL_DESCRIPTION", SetModelDescriptionInput>;
|
|
7
|
+
export type SetAuthorNameAction = Action<"SET_AUTHOR_NAME", SetAuthorNameInput>;
|
|
8
|
+
export type SetAuthorWebsiteAction = Action<"SET_AUTHOR_WEBSITE", SetAuthorWebsiteInput>;
|
|
10
9
|
export type DocumentModelHeaderAction = SetModelNameAction | SetModelIdAction | SetModelExtensionAction | SetModelDescriptionAction | SetAuthorNameAction | SetAuthorWebsiteAction;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SetModelNameInput, SetModelIdInput, SetModelExtensionInput, SetModelDescriptionInput, SetAuthorNameInput, SetAuthorWebsiteInput } from '../types';
|
|
2
2
|
import { SetModelNameAction, SetModelIdAction, SetModelExtensionAction, SetModelDescriptionAction, SetAuthorNameAction, SetAuthorWebsiteAction } from './actions';
|
|
3
|
-
|
|
4
3
|
export declare const setModelName: (input: SetModelNameInput) => SetModelNameAction;
|
|
5
4
|
export declare const setModelId: (input: SetModelIdInput) => SetModelIdAction;
|
|
6
5
|
export declare const setModelExtension: (input: SetModelExtensionInput) => SetModelExtensionAction;
|
|
@@ -2,7 +2,6 @@ import { BaseDocument } from '../../../document/object';
|
|
|
2
2
|
import { SetModelNameInput, SetModelIdInput, SetModelExtensionInput, SetModelDescriptionInput, SetAuthorNameInput, SetAuthorWebsiteInput, DocumentModelState, DocumentModelLocalState } from '../types';
|
|
3
3
|
import { DocumentModelAction } from '../actions';
|
|
4
4
|
import { ReducerOptions } from '../../../document';
|
|
5
|
-
|
|
6
5
|
export default class DocumentModel_Header extends BaseDocument<DocumentModelState, DocumentModelAction, DocumentModelLocalState> {
|
|
7
6
|
setModelName(input: SetModelNameInput, options?: ReducerOptions): this;
|
|
8
7
|
setModelId(input: SetModelIdInput, options?: ReducerOptions): this;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SetModelNameAction, SetModelIdAction, SetModelExtensionAction, SetModelDescriptionAction, SetAuthorNameAction, SetAuthorWebsiteAction } from './actions';
|
|
2
2
|
import { DocumentModelState } from '../types';
|
|
3
|
-
|
|
4
3
|
export interface DocumentModelHeaderOperations {
|
|
5
4
|
setModelNameOperation: (state: DocumentModelState, action: SetModelNameAction) => void;
|
|
6
5
|
setModelIdOperation: (state: DocumentModelState, action: SetModelIdAction) => void;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Action } from '../../../document';
|
|
2
2
|
import { AddModuleInput, SetModuleNameInput, SetModuleDescriptionInput, DeleteModuleInput, ReorderModulesInput } from '../types';
|
|
3
|
-
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
8
|
-
export type ReorderModulesAction = Action<'REORDER_MODULES', ReorderModulesInput>;
|
|
3
|
+
export type AddModuleAction = Action<"ADD_MODULE", AddModuleInput>;
|
|
4
|
+
export type SetModuleNameAction = Action<"SET_MODULE_NAME", SetModuleNameInput>;
|
|
5
|
+
export type SetModuleDescriptionAction = Action<"SET_MODULE_DESCRIPTION", SetModuleDescriptionInput>;
|
|
6
|
+
export type DeleteModuleAction = Action<"DELETE_MODULE", DeleteModuleInput>;
|
|
7
|
+
export type ReorderModulesAction = Action<"REORDER_MODULES", ReorderModulesInput>;
|
|
9
8
|
export type DocumentModelModuleAction = AddModuleAction | SetModuleNameAction | SetModuleDescriptionAction | DeleteModuleAction | ReorderModulesAction;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AddModuleInput, SetModuleNameInput, SetModuleDescriptionInput, DeleteModuleInput, ReorderModulesInput } from '../types';
|
|
2
2
|
import { AddModuleAction, SetModuleNameAction, SetModuleDescriptionAction, DeleteModuleAction, ReorderModulesAction } from './actions';
|
|
3
|
-
|
|
4
3
|
export declare const addModule: (input: AddModuleInput) => AddModuleAction;
|
|
5
4
|
export declare const setModuleName: (input: SetModuleNameInput) => SetModuleNameAction;
|
|
6
5
|
export declare const setModuleDescription: (input: SetModuleDescriptionInput) => SetModuleDescriptionAction;
|
|
@@ -2,7 +2,6 @@ import { BaseDocument } from '../../../document/object';
|
|
|
2
2
|
import { AddModuleInput, SetModuleNameInput, SetModuleDescriptionInput, DeleteModuleInput, ReorderModulesInput, DocumentModelState, DocumentModelLocalState } from '../types';
|
|
3
3
|
import { DocumentModelAction } from '../actions';
|
|
4
4
|
import { ReducerOptions } from '../../../document';
|
|
5
|
-
|
|
6
5
|
export default class DocumentModel_Module extends BaseDocument<DocumentModelState, DocumentModelAction, DocumentModelLocalState> {
|
|
7
6
|
addModule(input: AddModuleInput, options?: ReducerOptions): this;
|
|
8
7
|
setModuleName(input: SetModuleNameInput, options?: ReducerOptions): this;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AddModuleAction, SetModuleNameAction, SetModuleDescriptionAction, DeleteModuleAction, ReorderModulesAction } from './actions';
|
|
2
2
|
import { DocumentModelState } from '../types';
|
|
3
|
-
|
|
4
3
|
export interface DocumentModelModuleOperations {
|
|
5
4
|
addModuleOperation: (state: DocumentModelState, action: AddModuleAction) => void;
|
|
6
5
|
setModuleNameOperation: (state: DocumentModelState, action: SetModuleNameAction) => void;
|
|
@@ -9,7 +9,6 @@ import { default as DocumentModel_OperationError } from './operation-error/objec
|
|
|
9
9
|
import { default as DocumentModel_OperationExample } from './operation-example/object';
|
|
10
10
|
import { default as DocumentModel_Operation } from './operation/object';
|
|
11
11
|
import { default as DocumentModel_State } from './state/object';
|
|
12
|
-
|
|
13
12
|
export * from './header/object';
|
|
14
13
|
export * from './versioning/object';
|
|
15
14
|
export * from './module/object';
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { Action } from '../../../document';
|
|
2
2
|
import { AddOperationInput, SetOperationNameInput, SetOperationSchemaInput, SetOperationDescriptionInput, SetOperationTemplateInput, SetOperationReducerInput, MoveOperationInput, DeleteOperationInput, ReorderModuleOperationsInput, SetOperationScopeInput } from '../types';
|
|
3
|
-
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
10
|
-
export type
|
|
11
|
-
export type
|
|
12
|
-
export type
|
|
13
|
-
export type ReorderModuleOperationsAction = Action<'REORDER_MODULE_OPERATIONS', ReorderModuleOperationsInput>;
|
|
3
|
+
export type AddOperationAction = Action<"ADD_OPERATION", AddOperationInput>;
|
|
4
|
+
export type SetOperationNameAction = Action<"SET_OPERATION_NAME", SetOperationNameInput>;
|
|
5
|
+
export type SetOperationScopeAction = Action<"SET_OPERATION_SCOPE", SetOperationScopeInput>;
|
|
6
|
+
export type SetOperationSchemaAction = Action<"SET_OPERATION_SCHEMA", SetOperationSchemaInput>;
|
|
7
|
+
export type SetOperationDescriptionAction = Action<"SET_OPERATION_DESCRIPTION", SetOperationDescriptionInput>;
|
|
8
|
+
export type SetOperationTemplateAction = Action<"SET_OPERATION_TEMPLATE", SetOperationTemplateInput>;
|
|
9
|
+
export type SetOperationReducerAction = Action<"SET_OPERATION_REDUCER", SetOperationReducerInput>;
|
|
10
|
+
export type MoveOperationAction = Action<"MOVE_OPERATION", MoveOperationInput>;
|
|
11
|
+
export type DeleteOperationAction = Action<"DELETE_OPERATION", DeleteOperationInput>;
|
|
12
|
+
export type ReorderModuleOperationsAction = Action<"REORDER_MODULE_OPERATIONS", ReorderModuleOperationsInput>;
|
|
14
13
|
export type DocumentModelOperationAction = AddOperationAction | SetOperationNameAction | SetOperationScopeAction | SetOperationSchemaAction | SetOperationDescriptionAction | SetOperationTemplateAction | SetOperationReducerAction | MoveOperationAction | DeleteOperationAction | ReorderModuleOperationsAction;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AddOperationInput, SetOperationNameInput, SetOperationSchemaInput, SetOperationDescriptionInput, SetOperationTemplateInput, SetOperationReducerInput, MoveOperationInput, DeleteOperationInput, ReorderModuleOperationsInput, SetOperationScopeInput } from '../types';
|
|
2
2
|
import { AddOperationAction, SetOperationNameAction, SetOperationSchemaAction, SetOperationDescriptionAction, SetOperationTemplateAction, SetOperationReducerAction, MoveOperationAction, DeleteOperationAction, ReorderModuleOperationsAction, SetOperationScopeAction } from './actions';
|
|
3
|
-
|
|
4
3
|
export declare const addOperation: (input: AddOperationInput) => AddOperationAction;
|
|
5
4
|
export declare const setOperationName: (input: SetOperationNameInput) => SetOperationNameAction;
|
|
6
5
|
export declare const setOperationScope: (input: SetOperationScopeInput) => SetOperationScopeAction;
|
|
@@ -2,7 +2,6 @@ import { BaseDocument } from '../../../document/object';
|
|
|
2
2
|
import { AddOperationInput, SetOperationNameInput, SetOperationSchemaInput, SetOperationDescriptionInput, SetOperationTemplateInput, SetOperationReducerInput, MoveOperationInput, DeleteOperationInput, ReorderModuleOperationsInput, DocumentModelState, SetOperationScopeInput, DocumentModelLocalState } from '../types';
|
|
3
3
|
import { DocumentModelAction } from '../actions';
|
|
4
4
|
import { ReducerOptions } from '../../../document';
|
|
5
|
-
|
|
6
5
|
export default class DocumentModel_Operation extends BaseDocument<DocumentModelState, DocumentModelAction, DocumentModelLocalState> {
|
|
7
6
|
addOperation(input: AddOperationInput, options?: ReducerOptions): this;
|
|
8
7
|
setOperationName(input: SetOperationNameInput, options?: ReducerOptions): this;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AddOperationAction, SetOperationNameAction, SetOperationSchemaAction, SetOperationDescriptionAction, SetOperationTemplateAction, SetOperationReducerAction, MoveOperationAction, DeleteOperationAction, ReorderModuleOperationsAction, SetOperationScopeAction } from './actions';
|
|
2
2
|
import { DocumentModelState } from '../types';
|
|
3
|
-
|
|
4
3
|
export interface DocumentModelOperationOperations {
|
|
5
4
|
addOperationOperation: (state: DocumentModelState, action: AddOperationAction) => void;
|
|
6
5
|
setOperationNameOperation: (state: DocumentModelState, action: SetOperationNameAction) => void;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Action } from '../../../document';
|
|
2
2
|
import { AddOperationErrorInput, SetOperationErrorCodeInput, SetOperationErrorNameInput, SetOperationErrorDescriptionInput, SetOperationErrorTemplateInput, DeleteOperationErrorInput, ReorderOperationErrorsInput } from '../types';
|
|
3
|
-
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
10
|
-
export type ReorderOperationErrorsAction = Action<'REORDER_OPERATION_ERRORS', ReorderOperationErrorsInput>;
|
|
3
|
+
export type AddOperationErrorAction = Action<"ADD_OPERATION_ERROR", AddOperationErrorInput>;
|
|
4
|
+
export type SetOperationErrorCodeAction = Action<"SET_OPERATION_ERROR_CODE", SetOperationErrorCodeInput>;
|
|
5
|
+
export type SetOperationErrorNameAction = Action<"SET_OPERATION_ERROR_NAME", SetOperationErrorNameInput>;
|
|
6
|
+
export type SetOperationErrorDescriptionAction = Action<"SET_OPERATION_ERROR_DESCRIPTION", SetOperationErrorDescriptionInput>;
|
|
7
|
+
export type SetOperationErrorTemplateAction = Action<"SET_OPERATION_ERROR_TEMPLATE", SetOperationErrorTemplateInput>;
|
|
8
|
+
export type DeleteOperationErrorAction = Action<"DELETE_OPERATION_ERROR", DeleteOperationErrorInput>;
|
|
9
|
+
export type ReorderOperationErrorsAction = Action<"REORDER_OPERATION_ERRORS", ReorderOperationErrorsInput>;
|
|
11
10
|
export type DocumentModelOperationErrorAction = AddOperationErrorAction | SetOperationErrorCodeAction | SetOperationErrorNameAction | SetOperationErrorDescriptionAction | SetOperationErrorTemplateAction | DeleteOperationErrorAction | ReorderOperationErrorsAction;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AddOperationErrorInput, SetOperationErrorCodeInput, SetOperationErrorNameInput, SetOperationErrorDescriptionInput, SetOperationErrorTemplateInput, DeleteOperationErrorInput, ReorderOperationErrorsInput } from '../types';
|
|
2
2
|
import { AddOperationErrorAction, SetOperationErrorCodeAction, SetOperationErrorNameAction, SetOperationErrorDescriptionAction, SetOperationErrorTemplateAction, DeleteOperationErrorAction, ReorderOperationErrorsAction } from './actions';
|
|
3
|
-
|
|
4
3
|
export declare const addOperationError: (input: AddOperationErrorInput) => AddOperationErrorAction;
|
|
5
4
|
export declare const setOperationErrorCode: (input: SetOperationErrorCodeInput) => SetOperationErrorCodeAction;
|
|
6
5
|
export declare const setOperationErrorName: (input: SetOperationErrorNameInput) => SetOperationErrorNameAction;
|
|
@@ -2,7 +2,6 @@ import { BaseDocument } from '../../../document/object';
|
|
|
2
2
|
import { AddOperationErrorInput, SetOperationErrorCodeInput, SetOperationErrorNameInput, SetOperationErrorDescriptionInput, SetOperationErrorTemplateInput, DeleteOperationErrorInput, ReorderOperationErrorsInput, DocumentModelState, DocumentModelLocalState } from '../types';
|
|
3
3
|
import { DocumentModelAction } from '../actions';
|
|
4
4
|
import { ReducerOptions } from '../../../document';
|
|
5
|
-
|
|
6
5
|
export default class DocumentModel_OperationError extends BaseDocument<DocumentModelState, DocumentModelAction, DocumentModelLocalState> {
|
|
7
6
|
addOperationError(input: AddOperationErrorInput, options?: ReducerOptions): this;
|
|
8
7
|
setOperationErrorCode(input: SetOperationErrorCodeInput, options?: ReducerOptions): this;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AddOperationErrorAction, SetOperationErrorCodeAction, SetOperationErrorNameAction, SetOperationErrorDescriptionAction, SetOperationErrorTemplateAction, DeleteOperationErrorAction, ReorderOperationErrorsAction } from './actions';
|
|
2
2
|
import { DocumentModelState } from '../types';
|
|
3
|
-
|
|
4
3
|
export interface DocumentModelOperationErrorOperations {
|
|
5
4
|
addOperationErrorOperation: (state: DocumentModelState, action: AddOperationErrorAction) => void;
|
|
6
5
|
setOperationErrorCodeOperation: (state: DocumentModelState, action: SetOperationErrorCodeAction) => void;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Action } from '../../../document';
|
|
2
2
|
import { AddOperationExampleInput, UpdateOperationExampleInput, DeleteOperationExampleInput, ReorderOperationExamplesInput } from '../types';
|
|
3
|
-
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export type ReorderOperationExamplesAction = Action<'REORDER_OPERATION_EXAMPLES', ReorderOperationExamplesInput>;
|
|
3
|
+
export type AddOperationExampleAction = Action<"ADD_OPERATION_EXAMPLE", AddOperationExampleInput>;
|
|
4
|
+
export type UpdateOperationExampleAction = Action<"UPDATE_OPERATION_EXAMPLE", UpdateOperationExampleInput>;
|
|
5
|
+
export type DeleteOperationExampleAction = Action<"DELETE_OPERATION_EXAMPLE", DeleteOperationExampleInput>;
|
|
6
|
+
export type ReorderOperationExamplesAction = Action<"REORDER_OPERATION_EXAMPLES", ReorderOperationExamplesInput>;
|
|
8
7
|
export type DocumentModelOperationExampleAction = AddOperationExampleAction | UpdateOperationExampleAction | DeleteOperationExampleAction | ReorderOperationExamplesAction;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AddOperationExampleInput, UpdateOperationExampleInput, DeleteOperationExampleInput, ReorderOperationExamplesInput } from '../types';
|
|
2
2
|
import { AddOperationExampleAction, UpdateOperationExampleAction, DeleteOperationExampleAction, ReorderOperationExamplesAction } from './actions';
|
|
3
|
-
|
|
4
3
|
export declare const addOperationExample: (input: AddOperationExampleInput) => AddOperationExampleAction;
|
|
5
4
|
export declare const updateOperationExample: (input: UpdateOperationExampleInput) => UpdateOperationExampleAction;
|
|
6
5
|
export declare const deleteOperationExample: (input: DeleteOperationExampleInput) => DeleteOperationExampleAction;
|