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
|
@@ -2,7 +2,6 @@ import { BaseDocument } from '../../../document/object';
|
|
|
2
2
|
import { AddOperationExampleInput, UpdateOperationExampleInput, DeleteOperationExampleInput, ReorderOperationExamplesInput, DocumentModelState, DocumentModelLocalState } from '../types';
|
|
3
3
|
import { DocumentModelAction } from '../actions';
|
|
4
4
|
import { ReducerOptions } from '../../../document';
|
|
5
|
-
|
|
6
5
|
export default class DocumentModel_OperationExample extends BaseDocument<DocumentModelState, DocumentModelAction, DocumentModelLocalState> {
|
|
7
6
|
addOperationExample(input: AddOperationExampleInput, options?: ReducerOptions): this;
|
|
8
7
|
updateOperationExample(input: UpdateOperationExampleInput, options?: ReducerOptions): this;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AddOperationExampleAction, UpdateOperationExampleAction, DeleteOperationExampleAction, ReorderOperationExamplesAction } from './actions';
|
|
2
2
|
import { DocumentModelState } from '../types';
|
|
3
|
-
|
|
4
3
|
export interface DocumentModelOperationExampleOperations {
|
|
5
4
|
addOperationExampleOperation: (state: DocumentModelState, action: AddOperationExampleAction) => void;
|
|
6
5
|
updateOperationExampleOperation: (state: DocumentModelState, action: UpdateOperationExampleAction) => void;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ImmutableStateReducer } from '../../document/types';
|
|
2
2
|
import { DocumentModelLocalState, DocumentModelState } from './schema';
|
|
3
3
|
import { DocumentModelAction } from './actions';
|
|
4
|
-
|
|
5
4
|
export declare const stateReducer: ImmutableStateReducer<DocumentModelState, DocumentModelAction, DocumentModelLocalState>;
|
|
6
|
-
export declare const reducer: import('../../document
|
|
5
|
+
export declare const reducer: import('../../document').Reducer<DocumentModelState, DocumentModelAction, DocumentModelLocalState>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { OperationScope } from '../../../document';
|
|
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 {
|
|
@@ -19,7 +18,7 @@ export type MakeEmpty<T extends {
|
|
|
19
18
|
[_ in K]?: never;
|
|
20
19
|
};
|
|
21
20
|
export type Incremental<T> = T | {
|
|
22
|
-
[P in keyof T]?: P extends
|
|
21
|
+
[P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never;
|
|
23
22
|
};
|
|
24
23
|
/** All built-in and custom scalars, mapped to their actual values */
|
|
25
24
|
export type Scalars = {
|
|
@@ -45,83 +44,83 @@ export type Scalars = {
|
|
|
45
44
|
};
|
|
46
45
|
};
|
|
47
46
|
export type AddChangeLogItemInput = {
|
|
48
|
-
__typename?:
|
|
49
|
-
content: Scalars[
|
|
50
|
-
id: Scalars[
|
|
51
|
-
insertBefore: Maybe<Scalars[
|
|
47
|
+
__typename?: "AddChangeLogItemInput";
|
|
48
|
+
content: Scalars["String"]["output"];
|
|
49
|
+
id: Scalars["ID"]["output"];
|
|
50
|
+
insertBefore: Maybe<Scalars["ID"]["output"]>;
|
|
52
51
|
};
|
|
53
52
|
export type AddModuleInput = {
|
|
54
|
-
description?: InputMaybe<Scalars[
|
|
55
|
-
id: Scalars[
|
|
56
|
-
name: Scalars[
|
|
53
|
+
description?: InputMaybe<Scalars["String"]["input"]>;
|
|
54
|
+
id: Scalars["ID"]["input"];
|
|
55
|
+
name: Scalars["String"]["input"];
|
|
57
56
|
};
|
|
58
57
|
export type AddOperationErrorInput = {
|
|
59
|
-
errorCode?: InputMaybe<Scalars[
|
|
60
|
-
errorDescription?: InputMaybe<Scalars[
|
|
61
|
-
errorName?: InputMaybe<Scalars[
|
|
62
|
-
errorTemplate?: InputMaybe<Scalars[
|
|
63
|
-
id: Scalars[
|
|
64
|
-
operationId: Scalars[
|
|
58
|
+
errorCode?: InputMaybe<Scalars["String"]["input"]>;
|
|
59
|
+
errorDescription?: InputMaybe<Scalars["String"]["input"]>;
|
|
60
|
+
errorName?: InputMaybe<Scalars["String"]["input"]>;
|
|
61
|
+
errorTemplate?: InputMaybe<Scalars["String"]["input"]>;
|
|
62
|
+
id: Scalars["ID"]["input"];
|
|
63
|
+
operationId: Scalars["ID"]["input"];
|
|
65
64
|
};
|
|
66
65
|
export type AddOperationExampleInput = {
|
|
67
|
-
example: Scalars[
|
|
68
|
-
id: Scalars[
|
|
69
|
-
operationId: Scalars[
|
|
66
|
+
example: Scalars["String"]["input"];
|
|
67
|
+
id: Scalars["ID"]["input"];
|
|
68
|
+
operationId: Scalars["ID"]["input"];
|
|
70
69
|
};
|
|
71
70
|
export type AddOperationInput = {
|
|
72
|
-
description?: InputMaybe<Scalars[
|
|
73
|
-
id: Scalars[
|
|
74
|
-
moduleId: Scalars[
|
|
75
|
-
name: Scalars[
|
|
76
|
-
reducer?: InputMaybe<Scalars[
|
|
77
|
-
schema?: InputMaybe<Scalars[
|
|
78
|
-
template?: InputMaybe<Scalars[
|
|
71
|
+
description?: InputMaybe<Scalars["String"]["input"]>;
|
|
72
|
+
id: Scalars["ID"]["input"];
|
|
73
|
+
moduleId: Scalars["ID"]["input"];
|
|
74
|
+
name: Scalars["String"]["input"];
|
|
75
|
+
reducer?: InputMaybe<Scalars["String"]["input"]>;
|
|
76
|
+
schema?: InputMaybe<Scalars["String"]["input"]>;
|
|
77
|
+
template?: InputMaybe<Scalars["String"]["input"]>;
|
|
79
78
|
scope?: InputMaybe<OperationScope>;
|
|
80
79
|
};
|
|
81
80
|
export type AddStateExampleInput = {
|
|
82
|
-
scope: Scalars[
|
|
83
|
-
example: Scalars[
|
|
84
|
-
id: Scalars[
|
|
85
|
-
insertBefore?: InputMaybe<Scalars[
|
|
81
|
+
scope: Scalars["String"]["input"];
|
|
82
|
+
example: Scalars["String"]["input"];
|
|
83
|
+
id: Scalars["ID"]["input"];
|
|
84
|
+
insertBefore?: InputMaybe<Scalars["ID"]["input"]>;
|
|
86
85
|
};
|
|
87
86
|
export type Author = {
|
|
88
|
-
__typename?:
|
|
89
|
-
name: Scalars[
|
|
90
|
-
website: Maybe<Scalars[
|
|
87
|
+
__typename?: "Author";
|
|
88
|
+
name: Scalars["String"]["output"];
|
|
89
|
+
website: Maybe<Scalars["String"]["output"]>;
|
|
91
90
|
};
|
|
92
91
|
export type CodeExample = {
|
|
93
|
-
__typename?:
|
|
94
|
-
id: Scalars[
|
|
95
|
-
value: Scalars[
|
|
92
|
+
__typename?: "CodeExample";
|
|
93
|
+
id: Scalars["ID"]["output"];
|
|
94
|
+
value: Scalars["String"]["output"];
|
|
96
95
|
};
|
|
97
96
|
export type DeleteChangeLogItemInput = {
|
|
98
|
-
__typename?:
|
|
99
|
-
id: Scalars[
|
|
97
|
+
__typename?: "DeleteChangeLogItemInput";
|
|
98
|
+
id: Scalars["ID"]["output"];
|
|
100
99
|
};
|
|
101
100
|
export type DeleteModuleInput = {
|
|
102
|
-
id: Scalars[
|
|
101
|
+
id: Scalars["ID"]["input"];
|
|
103
102
|
};
|
|
104
103
|
export type DeleteOperationErrorInput = {
|
|
105
|
-
id: Scalars[
|
|
104
|
+
id: Scalars["ID"]["input"];
|
|
106
105
|
};
|
|
107
106
|
export type DeleteOperationExampleInput = {
|
|
108
|
-
id: Scalars[
|
|
107
|
+
id: Scalars["ID"]["input"];
|
|
109
108
|
};
|
|
110
109
|
export type DeleteOperationInput = {
|
|
111
|
-
id: Scalars[
|
|
110
|
+
id: Scalars["ID"]["input"];
|
|
112
111
|
};
|
|
113
112
|
export type DeleteStateExampleInput = {
|
|
114
|
-
scope: Scalars[
|
|
115
|
-
id: Scalars[
|
|
113
|
+
scope: Scalars["String"]["input"];
|
|
114
|
+
id: Scalars["ID"]["input"];
|
|
116
115
|
};
|
|
117
116
|
export type DocumentModelInput = AddChangeLogItemInput | AddModuleInput | AddOperationErrorInput | AddOperationExampleInput | AddOperationInput | AddStateExampleInput | DeleteChangeLogItemInput | DeleteModuleInput | DeleteOperationErrorInput | DeleteOperationExampleInput | DeleteOperationInput | DeleteStateExampleInput | MoveOperationInput | ReorderChangeLogItemsInput | ReorderModuleOperationsInput | ReorderModulesInput | ReorderOperationErrorsInput | ReorderOperationExamplesInput | ReorderStateExamplesInput | SetAuthorNameInput | SetAuthorWebsiteInput | SetInitialStateInput | SetModelDescriptionInput | SetModelExtensionInput | SetModelIdInput | SetModelNameInput | SetModuleDescriptionInput | SetModuleNameInput | SetOperationDescriptionInput | SetOperationErrorCodeInput | SetOperationErrorDescriptionInput | SetOperationErrorNameInput | SetOperationErrorTemplateInput | SetOperationNameInput | SetOperationReducerInput | SetOperationSchemaInput | SetOperationTemplateInput | SetStateSchemaInput | UpdateChangeLogItemInput | UpdateOperationExampleInput | UpdateStateExampleInput;
|
|
118
117
|
export type DocumentModelState = {
|
|
119
|
-
__typename?:
|
|
118
|
+
__typename?: "DocumentModelState";
|
|
120
119
|
author: Author;
|
|
121
|
-
description: Scalars[
|
|
122
|
-
extension: Scalars[
|
|
123
|
-
id: Scalars[
|
|
124
|
-
name: Scalars[
|
|
120
|
+
description: Scalars["String"]["output"];
|
|
121
|
+
extension: Scalars["String"]["output"];
|
|
122
|
+
id: Scalars["String"]["output"];
|
|
123
|
+
name: Scalars["String"]["output"];
|
|
125
124
|
specifications: Array<DocumentSpecification>;
|
|
126
125
|
};
|
|
127
126
|
export type ScopeState = {
|
|
@@ -130,25 +129,25 @@ export type ScopeState = {
|
|
|
130
129
|
};
|
|
131
130
|
export type DocumentModelLocalState = {};
|
|
132
131
|
export type DocumentSpecification = {
|
|
133
|
-
__typename?:
|
|
134
|
-
changeLog: Array<Scalars[
|
|
132
|
+
__typename?: "DocumentSpecification";
|
|
133
|
+
changeLog: Array<Scalars["String"]["output"]>;
|
|
135
134
|
modules: Array<Module>;
|
|
136
135
|
state: ScopeState;
|
|
137
|
-
version: Scalars[
|
|
136
|
+
version: Scalars["Int"]["output"];
|
|
138
137
|
};
|
|
139
138
|
export type Module = {
|
|
140
|
-
__typename?:
|
|
141
|
-
description: Maybe<Scalars[
|
|
142
|
-
id: Scalars[
|
|
143
|
-
name: Scalars[
|
|
139
|
+
__typename?: "Module";
|
|
140
|
+
description: Maybe<Scalars["String"]["output"]>;
|
|
141
|
+
id: Scalars["ID"]["output"];
|
|
142
|
+
name: Scalars["String"]["output"];
|
|
144
143
|
operations: Array<Operation>;
|
|
145
144
|
};
|
|
146
145
|
export type MoveOperationInput = {
|
|
147
|
-
newModuleId: Scalars[
|
|
148
|
-
operationId: Scalars[
|
|
146
|
+
newModuleId: Scalars["ID"]["input"];
|
|
147
|
+
operationId: Scalars["ID"]["input"];
|
|
149
148
|
};
|
|
150
149
|
export type Mutation = {
|
|
151
|
-
__typename?:
|
|
150
|
+
__typename?: "Mutation";
|
|
152
151
|
addChangeLogItemInput: DocumentModelState;
|
|
153
152
|
addModule: DocumentModelState;
|
|
154
153
|
addOperation: DocumentModelState;
|
|
@@ -316,139 +315,139 @@ export type MutationUpdateStateExampleArgs = {
|
|
|
316
315
|
input: UpdateStateExampleInput;
|
|
317
316
|
};
|
|
318
317
|
export type Operation = {
|
|
319
|
-
__typename?:
|
|
320
|
-
description: Maybe<Scalars[
|
|
318
|
+
__typename?: "Operation";
|
|
319
|
+
description: Maybe<Scalars["String"]["output"]>;
|
|
321
320
|
errors: Array<OperationError>;
|
|
322
321
|
examples: Array<CodeExample>;
|
|
323
|
-
id: Scalars[
|
|
324
|
-
name: Maybe<Scalars[
|
|
325
|
-
reducer: Maybe<Scalars[
|
|
326
|
-
schema: Maybe<Scalars[
|
|
327
|
-
template: Maybe<Scalars[
|
|
322
|
+
id: Scalars["ID"]["output"];
|
|
323
|
+
name: Maybe<Scalars["String"]["output"]>;
|
|
324
|
+
reducer: Maybe<Scalars["String"]["output"]>;
|
|
325
|
+
schema: Maybe<Scalars["String"]["output"]>;
|
|
326
|
+
template: Maybe<Scalars["String"]["output"]>;
|
|
328
327
|
scope: OperationScope;
|
|
329
328
|
};
|
|
330
329
|
export type OperationError = {
|
|
331
|
-
__typename?:
|
|
332
|
-
code: Maybe<Scalars[
|
|
333
|
-
description: Maybe<Scalars[
|
|
334
|
-
id: Scalars[
|
|
335
|
-
name: Maybe<Scalars[
|
|
336
|
-
template: Maybe<Scalars[
|
|
330
|
+
__typename?: "OperationError";
|
|
331
|
+
code: Maybe<Scalars["String"]["output"]>;
|
|
332
|
+
description: Maybe<Scalars["String"]["output"]>;
|
|
333
|
+
id: Scalars["ID"]["output"];
|
|
334
|
+
name: Maybe<Scalars["String"]["output"]>;
|
|
335
|
+
template: Maybe<Scalars["String"]["output"]>;
|
|
337
336
|
};
|
|
338
337
|
export type ReorderChangeLogItemsInput = {
|
|
339
|
-
__typename?:
|
|
340
|
-
order: Array<Scalars[
|
|
338
|
+
__typename?: "ReorderChangeLogItemsInput";
|
|
339
|
+
order: Array<Scalars["ID"]["output"]>;
|
|
341
340
|
};
|
|
342
341
|
export type ReorderModuleOperationsInput = {
|
|
343
|
-
moduleId: Scalars[
|
|
344
|
-
order: Array<Scalars[
|
|
342
|
+
moduleId: Scalars["ID"]["input"];
|
|
343
|
+
order: Array<Scalars["ID"]["input"]>;
|
|
345
344
|
};
|
|
346
345
|
export type ReorderModulesInput = {
|
|
347
|
-
order: Array<Scalars[
|
|
346
|
+
order: Array<Scalars["ID"]["input"]>;
|
|
348
347
|
};
|
|
349
348
|
export type ReorderOperationErrorsInput = {
|
|
350
|
-
operationId: Scalars[
|
|
351
|
-
order: Array<Scalars[
|
|
349
|
+
operationId: Scalars["ID"]["input"];
|
|
350
|
+
order: Array<Scalars["ID"]["input"]>;
|
|
352
351
|
};
|
|
353
352
|
export type ReorderOperationExamplesInput = {
|
|
354
|
-
operationId: Scalars[
|
|
355
|
-
order: Array<Scalars[
|
|
353
|
+
operationId: Scalars["ID"]["input"];
|
|
354
|
+
order: Array<Scalars["ID"]["input"]>;
|
|
356
355
|
};
|
|
357
356
|
export type ReorderStateExamplesInput = {
|
|
358
|
-
scope: Scalars[
|
|
359
|
-
order: Array<Scalars[
|
|
357
|
+
scope: Scalars["String"]["input"];
|
|
358
|
+
order: Array<Scalars["ID"]["input"]>;
|
|
360
359
|
};
|
|
361
360
|
export type SetAuthorNameInput = {
|
|
362
|
-
authorName: Scalars[
|
|
361
|
+
authorName: Scalars["String"]["input"];
|
|
363
362
|
};
|
|
364
363
|
export type SetAuthorWebsiteInput = {
|
|
365
|
-
authorWebsite: Scalars[
|
|
364
|
+
authorWebsite: Scalars["String"]["input"];
|
|
366
365
|
};
|
|
367
366
|
export type SetInitialStateInput = {
|
|
368
|
-
scope: Scalars[
|
|
369
|
-
initialValue: Scalars[
|
|
367
|
+
scope: Scalars["String"]["input"];
|
|
368
|
+
initialValue: Scalars["String"]["input"];
|
|
370
369
|
};
|
|
371
370
|
export type SetModelDescriptionInput = {
|
|
372
|
-
description: Scalars[
|
|
371
|
+
description: Scalars["String"]["input"];
|
|
373
372
|
};
|
|
374
373
|
export type SetModelExtensionInput = {
|
|
375
|
-
extension: Scalars[
|
|
374
|
+
extension: Scalars["String"]["input"];
|
|
376
375
|
};
|
|
377
376
|
export type SetModelIdInput = {
|
|
378
|
-
id: Scalars[
|
|
377
|
+
id: Scalars["String"]["input"];
|
|
379
378
|
};
|
|
380
379
|
export type SetModelNameInput = {
|
|
381
|
-
name: Scalars[
|
|
380
|
+
name: Scalars["String"]["input"];
|
|
382
381
|
};
|
|
383
382
|
export type SetModuleDescriptionInput = {
|
|
384
|
-
description?: InputMaybe<Scalars[
|
|
385
|
-
id: Scalars[
|
|
383
|
+
description?: InputMaybe<Scalars["String"]["input"]>;
|
|
384
|
+
id: Scalars["ID"]["input"];
|
|
386
385
|
};
|
|
387
386
|
export type SetModuleNameInput = {
|
|
388
|
-
id: Scalars[
|
|
389
|
-
name?: InputMaybe<Scalars[
|
|
387
|
+
id: Scalars["ID"]["input"];
|
|
388
|
+
name?: InputMaybe<Scalars["String"]["input"]>;
|
|
390
389
|
};
|
|
391
390
|
export type SetOperationDescriptionInput = {
|
|
392
|
-
description?: InputMaybe<Scalars[
|
|
393
|
-
id: Scalars[
|
|
391
|
+
description?: InputMaybe<Scalars["String"]["input"]>;
|
|
392
|
+
id: Scalars["ID"]["input"];
|
|
394
393
|
};
|
|
395
394
|
export type SetOperationErrorCodeInput = {
|
|
396
|
-
errorCode?: InputMaybe<Scalars[
|
|
397
|
-
id: Scalars[
|
|
395
|
+
errorCode?: InputMaybe<Scalars["String"]["input"]>;
|
|
396
|
+
id: Scalars["ID"]["input"];
|
|
398
397
|
};
|
|
399
398
|
export type SetOperationErrorDescriptionInput = {
|
|
400
|
-
errorDescription?: InputMaybe<Scalars[
|
|
401
|
-
id: Scalars[
|
|
399
|
+
errorDescription?: InputMaybe<Scalars["String"]["input"]>;
|
|
400
|
+
id: Scalars["ID"]["input"];
|
|
402
401
|
};
|
|
403
402
|
export type SetOperationErrorNameInput = {
|
|
404
|
-
errorName?: InputMaybe<Scalars[
|
|
405
|
-
id: Scalars[
|
|
403
|
+
errorName?: InputMaybe<Scalars["String"]["input"]>;
|
|
404
|
+
id: Scalars["ID"]["input"];
|
|
406
405
|
};
|
|
407
406
|
export type SetOperationErrorTemplateInput = {
|
|
408
|
-
errorTemplate?: InputMaybe<Scalars[
|
|
409
|
-
id: Scalars[
|
|
407
|
+
errorTemplate?: InputMaybe<Scalars["String"]["input"]>;
|
|
408
|
+
id: Scalars["ID"]["input"];
|
|
410
409
|
};
|
|
411
410
|
export type SetOperationNameInput = {
|
|
412
|
-
id: Scalars[
|
|
413
|
-
name?: InputMaybe<Scalars[
|
|
411
|
+
id: Scalars["ID"]["input"];
|
|
412
|
+
name?: InputMaybe<Scalars["String"]["input"]>;
|
|
414
413
|
};
|
|
415
414
|
export type SetOperationScopeInput = {
|
|
416
|
-
id: Scalars[
|
|
415
|
+
id: Scalars["ID"]["input"];
|
|
417
416
|
scope: InputMaybe<OperationScope>;
|
|
418
417
|
};
|
|
419
418
|
export type SetOperationReducerInput = {
|
|
420
|
-
id: Scalars[
|
|
421
|
-
reducer?: InputMaybe<Scalars[
|
|
419
|
+
id: Scalars["ID"]["input"];
|
|
420
|
+
reducer?: InputMaybe<Scalars["String"]["input"]>;
|
|
422
421
|
};
|
|
423
422
|
export type SetOperationSchemaInput = {
|
|
424
|
-
id: Scalars[
|
|
425
|
-
schema?: InputMaybe<Scalars[
|
|
423
|
+
id: Scalars["ID"]["input"];
|
|
424
|
+
schema?: InputMaybe<Scalars["String"]["input"]>;
|
|
426
425
|
};
|
|
427
426
|
export type SetOperationTemplateInput = {
|
|
428
|
-
id: Scalars[
|
|
429
|
-
template?: InputMaybe<Scalars[
|
|
427
|
+
id: Scalars["ID"]["input"];
|
|
428
|
+
template?: InputMaybe<Scalars["String"]["input"]>;
|
|
430
429
|
};
|
|
431
430
|
export type SetStateSchemaInput = {
|
|
432
|
-
scope: Scalars[
|
|
433
|
-
schema: Scalars[
|
|
431
|
+
scope: Scalars["String"]["input"];
|
|
432
|
+
schema: Scalars["String"]["input"];
|
|
434
433
|
};
|
|
435
434
|
export type State = {
|
|
436
|
-
__typename?:
|
|
435
|
+
__typename?: "State";
|
|
437
436
|
examples: Array<CodeExample>;
|
|
438
|
-
initialValue: Scalars[
|
|
439
|
-
schema: Scalars[
|
|
437
|
+
initialValue: Scalars["String"]["output"];
|
|
438
|
+
schema: Scalars["String"]["output"];
|
|
440
439
|
};
|
|
441
440
|
export type UpdateChangeLogItemInput = {
|
|
442
|
-
__typename?:
|
|
443
|
-
id: Scalars[
|
|
444
|
-
newContent: Scalars[
|
|
441
|
+
__typename?: "UpdateChangeLogItemInput";
|
|
442
|
+
id: Scalars["ID"]["output"];
|
|
443
|
+
newContent: Scalars["String"]["output"];
|
|
445
444
|
};
|
|
446
445
|
export type UpdateOperationExampleInput = {
|
|
447
|
-
example: Scalars[
|
|
448
|
-
id: Scalars[
|
|
446
|
+
example: Scalars["String"]["input"];
|
|
447
|
+
id: Scalars["ID"]["input"];
|
|
449
448
|
};
|
|
450
449
|
export type UpdateStateExampleInput = {
|
|
451
|
-
scope: Scalars[
|
|
452
|
-
id: Scalars[
|
|
453
|
-
newExample: Scalars[
|
|
450
|
+
scope: Scalars["String"]["input"];
|
|
451
|
+
id: Scalars["ID"]["input"];
|
|
452
|
+
newExample: Scalars["String"]["input"];
|
|
454
453
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { AddChangeLogItemInput, AddModuleInput, AddOperationErrorInput, AddOperationExampleInput, AddOperationInput, AddStateExampleInput, Author, CodeExample, DeleteChangeLogItemInput, DeleteModuleInput, DeleteOperationErrorInput, DeleteOperationExampleInput, DeleteOperationInput, DeleteStateExampleInput, DocumentModelState, DocumentSpecification, Module, MoveOperationInput, Operation, OperationError, ReorderChangeLogItemsInput, ReorderModuleOperationsInput, ReorderModulesInput, ReorderOperationErrorsInput, ReorderOperationExamplesInput, ReorderStateExamplesInput, ScopeState, SetAuthorNameInput, SetAuthorWebsiteInput, SetInitialStateInput, SetModelDescriptionInput, SetModelExtensionInput, SetModelIdInput, SetModelNameInput, SetModuleDescriptionInput, SetModuleNameInput, SetOperationDescriptionInput, SetOperationErrorCodeInput, SetOperationErrorDescriptionInput, SetOperationErrorNameInput, SetOperationErrorTemplateInput, SetOperationNameInput, SetOperationReducerInput, SetOperationSchemaInput, SetOperationScopeInput, SetOperationTemplateInput, SetStateSchemaInput, State, UpdateChangeLogItemInput, UpdateOperationExampleInput, UpdateStateExampleInput } from '.';
|
|
3
3
|
import { OperationScope } from '../../../document';
|
|
4
|
-
|
|
5
4
|
type Properties<T> = Required<{
|
|
6
5
|
[K in keyof T]: z.ZodType<T[K], any, T[K]>;
|
|
7
6
|
}>;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Action } from '../../../document';
|
|
2
2
|
import { SetStateSchemaInput, SetInitialStateInput, AddStateExampleInput, UpdateStateExampleInput, DeleteStateExampleInput, ReorderStateExamplesInput } from '../types';
|
|
3
|
-
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
export type ReorderStateExamplesAction = Action<'REORDER_STATE_EXAMPLES', ReorderStateExamplesInput>;
|
|
3
|
+
export type SetStateSchemaAction = Action<"SET_STATE_SCHEMA", SetStateSchemaInput>;
|
|
4
|
+
export type SetInitialStateAction = Action<"SET_INITIAL_STATE", SetInitialStateInput>;
|
|
5
|
+
export type AddStateExampleAction = Action<"ADD_STATE_EXAMPLE", AddStateExampleInput>;
|
|
6
|
+
export type UpdateStateExampleAction = Action<"UPDATE_STATE_EXAMPLE", UpdateStateExampleInput>;
|
|
7
|
+
export type DeleteStateExampleAction = Action<"DELETE_STATE_EXAMPLE", DeleteStateExampleInput>;
|
|
8
|
+
export type ReorderStateExamplesAction = Action<"REORDER_STATE_EXAMPLES", ReorderStateExamplesInput>;
|
|
10
9
|
export type DocumentModelStateAction = SetStateSchemaAction | SetInitialStateAction | AddStateExampleAction | UpdateStateExampleAction | DeleteStateExampleAction | ReorderStateExamplesAction;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SetStateSchemaInput, SetInitialStateInput, AddStateExampleInput, UpdateStateExampleInput, DeleteStateExampleInput, ReorderStateExamplesInput } from '../types';
|
|
2
2
|
import { SetStateSchemaAction, SetInitialStateAction, AddStateExampleAction, UpdateStateExampleAction, DeleteStateExampleAction, ReorderStateExamplesAction } from './actions';
|
|
3
|
-
|
|
4
3
|
export declare const setStateSchema: (input: SetStateSchemaInput) => SetStateSchemaAction;
|
|
5
4
|
export declare const setInitialState: (input: SetInitialStateInput) => SetInitialStateAction;
|
|
6
5
|
export declare const addStateExample: (input: AddStateExampleInput) => AddStateExampleAction;
|
|
@@ -2,7 +2,6 @@ import { BaseDocument } from '../../../document/object';
|
|
|
2
2
|
import { SetStateSchemaInput, SetInitialStateInput, AddStateExampleInput, UpdateStateExampleInput, DeleteStateExampleInput, ReorderStateExamplesInput, DocumentModelState, DocumentModelLocalState } from '../types';
|
|
3
3
|
import { DocumentModelAction } from '../actions';
|
|
4
4
|
import { ReducerOptions } from '../../../document';
|
|
5
|
-
|
|
6
5
|
export default class DocumentModel_State extends BaseDocument<DocumentModelState, DocumentModelAction, DocumentModelLocalState> {
|
|
7
6
|
setStateSchema(input: SetStateSchemaInput, options?: ReducerOptions): this;
|
|
8
7
|
setInitialState(input: SetInitialStateInput, options?: ReducerOptions): this;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SetStateSchemaAction, SetInitialStateAction, AddStateExampleAction, UpdateStateExampleAction, DeleteStateExampleAction, ReorderStateExamplesAction } from './actions';
|
|
2
2
|
import { DocumentModelState } from '../types';
|
|
3
|
-
|
|
4
3
|
export interface DocumentModelStateOperations {
|
|
5
4
|
setStateSchemaOperation: (state: DocumentModelState, action: SetStateSchemaAction) => void;
|
|
6
5
|
setInitialStateOperation: (state: DocumentModelState, action: SetInitialStateAction) => void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Document, ExtendedState } from '../../document/types';
|
|
2
2
|
import { DocumentModelState, DocumentModelLocalState } from './schema/types';
|
|
3
3
|
import { DocumentModelAction } from './actions';
|
|
4
|
-
|
|
5
4
|
export { z } from './schema';
|
|
6
5
|
export type * from './schema/types';
|
|
7
6
|
export type ExtendedDocumentModelState = ExtendedState<DocumentModelState>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DocumentModelUtils } from '../../document';
|
|
2
2
|
import { DocumentModelAction, DocumentModelLocalState, DocumentModelState } from './types';
|
|
3
|
-
|
|
4
3
|
export declare const initialGlobalState: DocumentModelState;
|
|
5
4
|
export declare const initialLocalState: DocumentModelLocalState;
|
|
6
5
|
declare const utils: DocumentModelUtils<DocumentModelState, DocumentModelAction, DocumentModelLocalState>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Action } from '../../../document';
|
|
2
2
|
import { AddChangeLogItemInput, UpdateChangeLogItemInput, DeleteChangeLogItemInput, ReorderChangeLogItemsInput } from '../types';
|
|
3
|
-
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export type
|
|
8
|
-
export type ReleaseNewVersionAction = Action<'RELEASE_NEW_VERSION', never>;
|
|
3
|
+
export type AddChangeLogItemAction = Action<"ADD_CHANGE_LOG_ITEM", AddChangeLogItemInput>;
|
|
4
|
+
export type UpdateChangeLogItemAction = Action<"UPDATE_CHANGE_LOG_ITEM", UpdateChangeLogItemInput>;
|
|
5
|
+
export type DeleteChangeLogItemAction = Action<"DELETE_CHANGE_LOG_ITEM", DeleteChangeLogItemInput>;
|
|
6
|
+
export type ReorderChangeLogItemsAction = Action<"REORDER_CHANGE_LOG_ITEMS", ReorderChangeLogItemsInput>;
|
|
7
|
+
export type ReleaseNewVersionAction = Action<"RELEASE_NEW_VERSION", never>;
|
|
9
8
|
export type DocumentModelVersioningAction = AddChangeLogItemAction | UpdateChangeLogItemAction | DeleteChangeLogItemAction | ReorderChangeLogItemsAction | ReleaseNewVersionAction;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AddChangeLogItemInput, UpdateChangeLogItemInput, DeleteChangeLogItemInput, ReorderChangeLogItemsInput } from '../types';
|
|
2
2
|
import { AddChangeLogItemAction, UpdateChangeLogItemAction, DeleteChangeLogItemAction, ReorderChangeLogItemsAction, ReleaseNewVersionAction } from './actions';
|
|
3
|
-
|
|
4
3
|
export declare const addChangeLogItem: (input: AddChangeLogItemInput) => AddChangeLogItemAction;
|
|
5
4
|
export declare const updateChangeLogItem: (input: UpdateChangeLogItemInput) => UpdateChangeLogItemAction;
|
|
6
5
|
export declare const deleteChangeLogItem: (input: DeleteChangeLogItemInput) => DeleteChangeLogItemAction;
|
|
@@ -2,7 +2,6 @@ import { BaseDocument } from '../../../document/object';
|
|
|
2
2
|
import { AddChangeLogItemInput, UpdateChangeLogItemInput, DeleteChangeLogItemInput, ReorderChangeLogItemsInput, DocumentModelState, DocumentModelLocalState } from '../types';
|
|
3
3
|
import { DocumentModelAction } from '../actions';
|
|
4
4
|
import { ReducerOptions } from '../../../document';
|
|
5
|
-
|
|
6
5
|
export default class DocumentModel_Versioning extends BaseDocument<DocumentModelState, DocumentModelAction, DocumentModelLocalState> {
|
|
7
6
|
addChangeLogItem(input: AddChangeLogItemInput, options?: ReducerOptions): this;
|
|
8
7
|
updateChangeLogItem(input: UpdateChangeLogItemInput, options?: ReducerOptions): this;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AddChangeLogItemAction, UpdateChangeLogItemAction, DeleteChangeLogItemAction, ReorderChangeLogItemsAction, ReleaseNewVersionAction } from './actions';
|
|
2
2
|
import { DocumentModelState } from '../types';
|
|
3
|
-
|
|
4
3
|
export interface DocumentModelVersioningOperations {
|
|
5
4
|
addChangeLogItemOperation: (state: DocumentModelState, action: AddChangeLogItemAction) => void;
|
|
6
5
|
updateChangeLogItemOperation: (state: DocumentModelState, action: UpdateChangeLogItemAction) => void;
|
|
@@ -3,7 +3,6 @@ import { DocumentModel } from './gen';
|
|
|
3
3
|
import { documentModel } from './gen/document-model';
|
|
4
4
|
import { reducer } from './gen/reducer';
|
|
5
5
|
import { DocumentModelAction, DocumentModelLocalState, DocumentModelState } from './gen/types';
|
|
6
|
-
|
|
7
6
|
declare const Document: typeof DocumentModel;
|
|
8
7
|
declare const utils: {
|
|
9
8
|
validateInitialState(initialState: string, allowEmptyState?: boolean): import('../document').ValidationError[];
|
package/dist/node/src/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as Document from
|
|
2
|
-
import * as DocumentModel from
|
|
1
|
+
import * as Document from "./document";
|
|
2
|
+
import * as DocumentModel from "./document-model";
|
|
3
3
|
/**
|
|
4
4
|
* This module exports all the public types, functions, and objects
|
|
5
5
|
* from the document module. It provides an easy-to-use interface
|
|
@@ -14,8 +14,8 @@ import * as DocumentModel from './document-model';
|
|
|
14
14
|
*/
|
|
15
15
|
export { Document, DocumentModel };
|
|
16
16
|
export declare const DocumentModels: {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
"powerhouse/document": typeof Document;
|
|
18
|
+
"powerhouse/document-model": typeof DocumentModel;
|
|
19
19
|
};
|
|
20
20
|
declare const _default: {
|
|
21
21
|
Document: typeof Document;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|