@stonecrop/stonecrop 0.31.0 → 0.32.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/stonecrop.js +3548 -2740
- package/dist/stonecrop.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +33 -27
- package/dist/src/client-action.d.ts +0 -31
- package/dist/src/client-action.d.ts.map +0 -1
- package/dist/src/client-action.js +0 -169
- package/dist/src/client-handler.d.ts +0 -43
- package/dist/src/client-handler.d.ts.map +0 -1
- package/dist/src/client-handler.js +0 -42
- package/dist/src/composables/lazy-link.d.ts +0 -25
- package/dist/src/composables/lazy-link.d.ts.map +0 -1
- package/dist/src/composables/lazy-link.js +0 -124
- package/dist/src/composables/operation-log.d.ts +0 -136
- package/dist/src/composables/operation-log.d.ts.map +0 -1
- package/dist/src/composables/operation-log.js +0 -224
- package/dist/src/composables/stonecrop.d.ts +0 -37
- package/dist/src/composables/stonecrop.d.ts.map +0 -1
- package/dist/src/composables/stonecrop.js +0 -433
- package/dist/src/doctype.d.ts +0 -243
- package/dist/src/doctype.d.ts.map +0 -1
- package/dist/src/doctype.js +0 -325
- package/dist/src/draft.d.ts +0 -35
- package/dist/src/draft.d.ts.map +0 -1
- package/dist/src/draft.js +0 -36
- package/dist/src/exceptions.d.ts +0 -14
- package/dist/src/exceptions.d.ts.map +0 -1
- package/dist/src/exceptions.js +0 -16
- package/dist/src/field-triggers.d.ts +0 -184
- package/dist/src/field-triggers.d.ts.map +0 -1
- package/dist/src/field-triggers.js +0 -577
- package/dist/src/index.d.ts +0 -25
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -39
- package/dist/src/plugins/index.d.ts +0 -35
- package/dist/src/plugins/index.d.ts.map +0 -1
- package/dist/src/plugins/index.js +0 -98
- package/dist/src/registry.d.ts +0 -161
- package/dist/src/registry.d.ts.map +0 -1
- package/dist/src/registry.js +0 -384
- package/dist/src/schema-validator.d.ts +0 -78
- package/dist/src/schema-validator.d.ts.map +0 -1
- package/dist/src/schema-validator.js +0 -398
- package/dist/src/stonecrop.d.ts +0 -539
- package/dist/src/stonecrop.d.ts.map +0 -1
- package/dist/src/stonecrop.js +0 -610
- package/dist/src/stores/hst.d.ts +0 -92
- package/dist/src/stores/hst.d.ts.map +0 -1
- package/dist/src/stores/hst.js +0 -487
- package/dist/src/stores/index.d.ts +0 -9
- package/dist/src/stores/index.d.ts.map +0 -1
- package/dist/src/stores/index.js +0 -13
- package/dist/src/stores/operation-log.d.ts +0 -262
- package/dist/src/stores/operation-log.d.ts.map +0 -1
- package/dist/src/stores/operation-log.js +0 -571
- package/dist/src/stores/validation.d.ts +0 -83
- package/dist/src/stores/validation.d.ts.map +0 -1
- package/dist/src/stores/validation.js +0 -104
- package/dist/src/types/client-action.d.ts +0 -121
- package/dist/src/types/client-action.d.ts.map +0 -1
- package/dist/src/types/client-action.js +0 -0
- package/dist/src/types/composable.d.ts +0 -268
- package/dist/src/types/composable.d.ts.map +0 -1
- package/dist/src/types/composable.js +0 -0
- package/dist/src/types/doctype.d.ts +0 -34
- package/dist/src/types/doctype.d.ts.map +0 -1
- package/dist/src/types/doctype.js +0 -0
- package/dist/src/types/field-triggers.d.ts +0 -186
- package/dist/src/types/field-triggers.d.ts.map +0 -1
- package/dist/src/types/field-triggers.js +0 -4
- package/dist/src/types/hst.d.ts +0 -70
- package/dist/src/types/hst.d.ts.map +0 -1
- package/dist/src/types/hst.js +0 -0
- package/dist/src/types/index.d.ts +0 -11
- package/dist/src/types/index.d.ts.map +0 -1
- package/dist/src/types/index.js +0 -11
- package/dist/src/types/operation-log.d.ts +0 -163
- package/dist/src/types/operation-log.d.ts.map +0 -1
- package/dist/src/types/operation-log.js +0 -0
- package/dist/src/types/plugin.d.ts +0 -37
- package/dist/src/types/plugin.d.ts.map +0 -1
- package/dist/src/types/plugin.js +0 -0
- package/dist/src/types/registry.d.ts +0 -11
- package/dist/src/types/registry.d.ts.map +0 -1
- package/dist/src/types/registry.js +0 -0
- package/dist/src/types/schema-validator.d.ts +0 -66
- package/dist/src/types/schema-validator.d.ts.map +0 -1
- package/dist/src/types/schema-validator.js +0 -13
- package/dist/src/types/stonecrop.d.ts +0 -32
- package/dist/src/types/stonecrop.d.ts.map +0 -1
- package/dist/src/types/stonecrop.js +0 -0
- package/dist/stonecrop.tsbuildinfo +0 -1
- package/src/client-action.ts +0 -207
- package/src/client-handler.ts +0 -55
- package/src/composables/lazy-link.ts +0 -145
- package/src/composables/operation-log.ts +0 -257
- package/src/composables/stonecrop.ts +0 -556
- package/src/doctype.ts +0 -360
- package/src/draft.ts +0 -38
- package/src/exceptions.ts +0 -16
- package/src/field-triggers.ts +0 -686
- package/src/index.ts +0 -81
- package/src/plugins/index.ts +0 -113
- package/src/registry.ts +0 -433
- package/src/schema-validator.ts +0 -476
- package/src/stonecrop.ts +0 -721
- package/src/stores/hst.ts +0 -626
- package/src/stores/index.ts +0 -21
- package/src/stores/operation-log.ts +0 -675
- package/src/stores/validation.ts +0 -138
- package/src/types/client-action.ts +0 -121
- package/src/types/composable.ts +0 -288
- package/src/types/doctype.ts +0 -35
- package/src/types/field-triggers.ts +0 -201
- package/src/types/hst.ts +0 -77
- package/src/types/index.ts +0 -11
- package/src/types/operation-log.ts +0 -202
- package/src/types/plugin.ts +0 -38
- package/src/types/registry.ts +0 -10
- package/src/types/schema-validator.ts +0 -69
- package/src/types/stonecrop.ts +0 -33
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Field-level action trigger system types
|
|
3
|
-
* @public
|
|
4
|
-
*/
|
|
5
|
-
import type { HSTNode } from './hst';
|
|
6
|
-
/**
|
|
7
|
-
* Context provided to action functions when field changes occur
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
10
|
-
export interface FieldChangeContext {
|
|
11
|
-
/** The HST path that was changed */
|
|
12
|
-
path: string;
|
|
13
|
-
/** The field name (last segment of path) */
|
|
14
|
-
fieldname: string;
|
|
15
|
-
/** Value before the change */
|
|
16
|
-
beforeValue: any;
|
|
17
|
-
/** Value after the change */
|
|
18
|
-
afterValue: any;
|
|
19
|
-
/** The operation type */
|
|
20
|
-
operation: 'set' | 'delete' | 'patch';
|
|
21
|
-
/** The doctype of the record being changed */
|
|
22
|
-
doctype: string;
|
|
23
|
-
/** The record ID if applicable */
|
|
24
|
-
recordId?: string;
|
|
25
|
-
/** Timestamp of the change */
|
|
26
|
-
timestamp: Date;
|
|
27
|
-
/** Reference to the HST store for state access (optional) */
|
|
28
|
-
store?: HSTNode;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Context provided to XState transition action functions
|
|
32
|
-
* Extends FieldChangeContext with FSM-specific data
|
|
33
|
-
* @public
|
|
34
|
-
*/
|
|
35
|
-
export interface TransitionChangeContext extends FieldChangeContext {
|
|
36
|
-
/** The XState transition name that triggered this action */
|
|
37
|
-
transition: string;
|
|
38
|
-
/** Current workflow state before transition */
|
|
39
|
-
currentState?: string;
|
|
40
|
-
/** Target workflow state after transition */
|
|
41
|
-
targetState?: string;
|
|
42
|
-
/** Additional FSM context data */
|
|
43
|
-
fsmContext?: Record<string, any>;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Action function that can be triggered by field changes
|
|
47
|
-
* @public
|
|
48
|
-
*/
|
|
49
|
-
export type FieldActionFunction = (context: FieldChangeContext) => void | Promise<void>;
|
|
50
|
-
/**
|
|
51
|
-
* Action function for XState transition triggers
|
|
52
|
-
* Receives enhanced context with FSM state information
|
|
53
|
-
* @public
|
|
54
|
-
*/
|
|
55
|
-
export type TransitionActionFunction = (context: TransitionChangeContext) => void | Promise<void>;
|
|
56
|
-
/**
|
|
57
|
-
* String reference to a globally registered action function or inline function
|
|
58
|
-
* @public
|
|
59
|
-
*/
|
|
60
|
-
export type FieldActionString = string;
|
|
61
|
-
/**
|
|
62
|
-
* Supported action types for field triggers
|
|
63
|
-
* @public
|
|
64
|
-
*/
|
|
65
|
-
export type FieldAction = FieldActionFunction | FieldActionString;
|
|
66
|
-
/**
|
|
67
|
-
* Supported action types for XState transitions
|
|
68
|
-
* Can be either a transition-specific function or a string reference
|
|
69
|
-
* @public
|
|
70
|
-
*/
|
|
71
|
-
export type TransitionAction = TransitionActionFunction | FieldActionString;
|
|
72
|
-
/**
|
|
73
|
-
* Configuration for a single field trigger
|
|
74
|
-
* @public
|
|
75
|
-
*/
|
|
76
|
-
export interface FieldTriggerConfig {
|
|
77
|
-
/** Array of actions to execute when this field changes */
|
|
78
|
-
actions: FieldAction[];
|
|
79
|
-
/** Optional condition function to determine if actions should run */
|
|
80
|
-
condition?: (context: FieldChangeContext) => boolean | Promise<boolean>;
|
|
81
|
-
/** Whether to run actions before or after the value is set (default: 'after') */
|
|
82
|
-
timing?: 'before' | 'after';
|
|
83
|
-
/** Whether to stop execution on first error (default: true) */
|
|
84
|
-
stopOnError?: boolean;
|
|
85
|
-
/** Maximum execution time in milliseconds before timeout */
|
|
86
|
-
timeout?: number;
|
|
87
|
-
/** Whether to enable automatic rollback for this field trigger (overrides global setting) */
|
|
88
|
-
enableRollback?: boolean;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Map of field paths to trigger configurations
|
|
92
|
-
* Supports wildcard patterns like 'emailAddress.*.is_primary'
|
|
93
|
-
* @public
|
|
94
|
-
*/
|
|
95
|
-
export type FieldTriggerMap = Record<string, FieldTriggerConfig | FieldAction[]>;
|
|
96
|
-
/**
|
|
97
|
-
* Registry for storing global action functions
|
|
98
|
-
* @public
|
|
99
|
-
*/
|
|
100
|
-
export interface ActionRegistry {
|
|
101
|
-
/** Register a global action function */
|
|
102
|
-
register(name: string, fn: FieldActionFunction): void;
|
|
103
|
-
/** Get a registered action function */
|
|
104
|
-
get(name: string): FieldActionFunction | undefined;
|
|
105
|
-
/** Check if an action is registered */
|
|
106
|
-
has(name: string): boolean;
|
|
107
|
-
/** Unregister an action function */
|
|
108
|
-
unregister(name: string): void;
|
|
109
|
-
/** Get all registered action names */
|
|
110
|
-
list(): string[];
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Result of executing a field action
|
|
114
|
-
* @public
|
|
115
|
-
*/
|
|
116
|
-
export interface ActionExecutionResult {
|
|
117
|
-
/** Whether the action executed successfully */
|
|
118
|
-
success: boolean;
|
|
119
|
-
/** Error if execution failed */
|
|
120
|
-
error?: Error;
|
|
121
|
-
/** Execution time in milliseconds */
|
|
122
|
-
executionTime: number;
|
|
123
|
-
/** The action that was executed */
|
|
124
|
-
action: FieldAction;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Result of executing an XState transition action
|
|
128
|
-
* @public
|
|
129
|
-
*/
|
|
130
|
-
export interface TransitionExecutionResult {
|
|
131
|
-
/** Whether the action executed successfully */
|
|
132
|
-
success: boolean;
|
|
133
|
-
/** Error if execution failed */
|
|
134
|
-
error?: Error;
|
|
135
|
-
/** Execution time in milliseconds */
|
|
136
|
-
executionTime: number;
|
|
137
|
-
/** The action that was executed */
|
|
138
|
-
action: TransitionAction;
|
|
139
|
-
/** The transition name that was executed */
|
|
140
|
-
transition: string;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Result of executing all actions for a field change
|
|
144
|
-
* @public
|
|
145
|
-
*/
|
|
146
|
-
export interface FieldTriggerExecutionResult {
|
|
147
|
-
/** The path that triggered the actions */
|
|
148
|
-
path: string;
|
|
149
|
-
/** Results for each action that was executed */
|
|
150
|
-
actionResults: ActionExecutionResult[];
|
|
151
|
-
/** Total execution time for all actions */
|
|
152
|
-
totalExecutionTime: number;
|
|
153
|
-
/** Whether all actions succeeded */
|
|
154
|
-
allSucceeded: boolean;
|
|
155
|
-
/** Whether execution was stopped due to an error */
|
|
156
|
-
stoppedOnError: boolean;
|
|
157
|
-
/** Whether a rollback was performed */
|
|
158
|
-
rolledBack: boolean;
|
|
159
|
-
/** The snapshot that was captured before execution */
|
|
160
|
-
snapshot?: any;
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Options for the field trigger system
|
|
164
|
-
* @public
|
|
165
|
-
*/
|
|
166
|
-
export interface FieldTriggerOptions {
|
|
167
|
-
/** Default timeout for action execution in milliseconds */
|
|
168
|
-
defaultTimeout?: number;
|
|
169
|
-
/** Whether to log trigger executions for debugging */
|
|
170
|
-
debug?: boolean;
|
|
171
|
-
/** Custom error handler for action failures */
|
|
172
|
-
errorHandler?: (error: Error, context: FieldChangeContext, action: FieldAction) => void;
|
|
173
|
-
/** Whether to enable automatic rollback on failure (default: true) */
|
|
174
|
-
enableRollback?: boolean;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Pattern matching result for wildcard paths
|
|
178
|
-
* @internal
|
|
179
|
-
*/
|
|
180
|
-
export interface _PathMatchResult {
|
|
181
|
-
/** Whether the path matches the pattern */
|
|
182
|
-
matches: boolean;
|
|
183
|
-
/** Captured wildcard values */
|
|
184
|
-
captures: Record<string, string>;
|
|
185
|
-
}
|
|
186
|
-
//# sourceMappingURL=field-triggers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"field-triggers.d.ts","sourceRoot":"","sources":["../../../src/types/field-triggers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAEpC;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAClC,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAA;IACjB,8BAA8B;IAC9B,WAAW,EAAE,GAAG,CAAA;IAChB,6BAA6B;IAC7B,UAAU,EAAE,GAAG,CAAA;IACf,yBAAyB;IACzB,SAAS,EAAE,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAA;IACrC,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAA;IACf,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8BAA8B;IAC9B,SAAS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C1B,oCAAoC;IACpC,YAAY,EAAE,OAAO,CAAA;IACrB,oDAAoD;IACpD,cAAc,EAAE,OAAO,CAAA;IACvB,uCAAuC;IACvC,UAAU,EAAE,OAAO,CAAA;IACnB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,GAAG,CAAA;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IACnC,2DAA2D;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,sDAAsD;IACtD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,+CAA+C;IAC/C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,WAAW,KAAK,IAAI,CAAA;IACvF,sEAAsE;IACtE,cAAc,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAChC,2CAA2C;IAC3C,OAAO,EAAE,OAAO,CAAA;IAChB,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC"}
|
package/dist/src/types/hst.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Core HST Interface - enhanced with tree navigation
|
|
3
|
-
* Provides a hierarchical state tree interface for navigating and manipulating nested data structures.
|
|
4
|
-
*
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
export interface HSTNode {
|
|
8
|
-
/**
|
|
9
|
-
* Gets a value at the specified path
|
|
10
|
-
* @param path - The dot-separated path to the value
|
|
11
|
-
* @returns The value at the specified path
|
|
12
|
-
*/
|
|
13
|
-
get(path: string): any;
|
|
14
|
-
/**
|
|
15
|
-
* Sets a value at the specified path
|
|
16
|
-
* @param path - The dot-separated path where to set the value
|
|
17
|
-
* @param value - The value to set
|
|
18
|
-
* @param source - Optional source of the operation (user, system, sync, undo, redo)
|
|
19
|
-
*/
|
|
20
|
-
set(path: string, value: any, source?: 'user' | 'system' | 'sync' | 'undo' | 'redo'): void;
|
|
21
|
-
/**
|
|
22
|
-
* Checks if a value exists at the specified path
|
|
23
|
-
* @param path - The dot-separated path to check
|
|
24
|
-
* @returns True if the path exists, false otherwise
|
|
25
|
-
*/
|
|
26
|
-
has(path: string): boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Gets the ancestor node in the tree hierarchy (immediate predecessor)
|
|
29
|
-
* @returns The ancestor HSTNode or null if this is the root
|
|
30
|
-
*/
|
|
31
|
-
getAncestor(): HSTNode | null;
|
|
32
|
-
/**
|
|
33
|
-
* Gets the root node of the tree
|
|
34
|
-
* @returns The root HSTNode
|
|
35
|
-
*/
|
|
36
|
-
getRoot(): HSTNode;
|
|
37
|
-
/**
|
|
38
|
-
* Gets the full path from root to this node
|
|
39
|
-
* @returns The dot-separated path string
|
|
40
|
-
*/
|
|
41
|
-
getPath(): string;
|
|
42
|
-
/**
|
|
43
|
-
* Gets the depth level of this node in the tree
|
|
44
|
-
* @returns The depth as a number (0 for root)
|
|
45
|
-
*/
|
|
46
|
-
getDepth(): number;
|
|
47
|
-
/**
|
|
48
|
-
* Gets an array of path segments from root to this node
|
|
49
|
-
* @returns Array of path segments representing breadcrumbs
|
|
50
|
-
*/
|
|
51
|
-
getBreadcrumbs(): string[];
|
|
52
|
-
/**
|
|
53
|
-
* Gets a child node at the specified relative path
|
|
54
|
-
* @param path - The relative path to the child node
|
|
55
|
-
* @returns The child HSTNode
|
|
56
|
-
*/
|
|
57
|
-
getNode(path: string): HSTNode;
|
|
58
|
-
/**
|
|
59
|
-
* Trigger an XState transition with optional context data
|
|
60
|
-
* @param transition - The transition name (should be uppercase per convention)
|
|
61
|
-
* @param context - Optional additional FSM context data
|
|
62
|
-
* @returns Promise resolving to the transition execution results
|
|
63
|
-
*/
|
|
64
|
-
triggerTransition(transition: string, context?: {
|
|
65
|
-
currentState?: string;
|
|
66
|
-
targetState?: string;
|
|
67
|
-
fsmContext?: Record<string, any>;
|
|
68
|
-
}): Promise<any>;
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=hst.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hst.d.ts","sourceRoot":"","sources":["../../../src/types/hst.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACvB;;;;OAIG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAA;IAEtB;;;;;OAKG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAE1F;;;;OAIG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;IAE1B;;;OAGG;IACH,WAAW,IAAI,OAAO,GAAG,IAAI,CAAA;IAE7B;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAA;IAElB;;;OAGG;IACH,OAAO,IAAI,MAAM,CAAA;IAEjB;;;OAGG;IACH,QAAQ,IAAI,MAAM,CAAA;IAElB;;;OAGG;IACH,cAAc,IAAI,MAAM,EAAE,CAAA;IAE1B;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;IAE9B;;;;;OAKG;IACH,iBAAiB,CAChB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,GACzF,OAAO,CAAC,GAAG,CAAC,CAAA;CACf"}
|
package/dist/src/types/hst.js
DELETED
|
File without changes
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './client-action';
|
|
2
|
-
export * from './composable';
|
|
3
|
-
export * from './doctype';
|
|
4
|
-
export * from './field-triggers';
|
|
5
|
-
export * from './hst';
|
|
6
|
-
export * from './operation-log';
|
|
7
|
-
export * from './plugin';
|
|
8
|
-
export * from './registry';
|
|
9
|
-
export * from './schema-validator';
|
|
10
|
-
export * from './stonecrop';
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,kBAAkB,CAAA;AAChC,cAAc,OAAO,CAAA;AACrB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA"}
|
package/dist/src/types/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// Re-export all type files
|
|
2
|
-
export * from './client-action';
|
|
3
|
-
export * from './composable';
|
|
4
|
-
export * from './doctype';
|
|
5
|
-
export * from './field-triggers';
|
|
6
|
-
export * from './hst';
|
|
7
|
-
export * from './operation-log';
|
|
8
|
-
export * from './plugin';
|
|
9
|
-
export * from './registry';
|
|
10
|
-
export * from './schema-validator';
|
|
11
|
-
export * from './stonecrop';
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type of HST operation
|
|
3
|
-
* @public
|
|
4
|
-
*/
|
|
5
|
-
export type HSTOperationType = 'set' | 'delete' | 'batch' | 'transition' | 'action';
|
|
6
|
-
/**
|
|
7
|
-
* Operation source - where the change originated
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
10
|
-
export type OperationSource = 'user' | 'system' | 'sync' | 'undo' | 'redo';
|
|
11
|
-
/**
|
|
12
|
-
* Complete metadata for an HST mutation
|
|
13
|
-
* Enables time travel, synchronization, and audit trails
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
export interface HSTOperation {
|
|
17
|
-
/** Unique operation identifier */
|
|
18
|
-
id: string;
|
|
19
|
-
/** Type of operation performed */
|
|
20
|
-
type: HSTOperationType;
|
|
21
|
-
/** Full HST path affected (e.g., "task.123.title") */
|
|
22
|
-
path: string;
|
|
23
|
-
/** Field name extracted from path */
|
|
24
|
-
fieldname: string;
|
|
25
|
-
/** Value before the operation */
|
|
26
|
-
beforeValue: any;
|
|
27
|
-
/** Value after the operation */
|
|
28
|
-
afterValue: any;
|
|
29
|
-
/** Doctype this operation affects */
|
|
30
|
-
doctype: string;
|
|
31
|
-
/** Record ID if applicable */
|
|
32
|
-
recordId?: string;
|
|
33
|
-
/** Timestamp of the operation */
|
|
34
|
-
timestamp: Date;
|
|
35
|
-
/** Source of the operation (defaults to 'user' if not specified) */
|
|
36
|
-
source?: OperationSource;
|
|
37
|
-
/** Whether this operation can be undone */
|
|
38
|
-
reversible: boolean;
|
|
39
|
-
/** Reason if operation is irreversible */
|
|
40
|
-
irreversibleReason?: string;
|
|
41
|
-
/** XState transition name if triggered by FSM */
|
|
42
|
-
transition?: string;
|
|
43
|
-
/** XState current state before transition */
|
|
44
|
-
currentState?: string;
|
|
45
|
-
/** XState target state after transition */
|
|
46
|
-
targetState?: string;
|
|
47
|
-
/** Action name if operation is an action execution (type: 'action') */
|
|
48
|
-
actionName?: string;
|
|
49
|
-
/** Record IDs that the action was executed on */
|
|
50
|
-
actionRecordIds?: string[];
|
|
51
|
-
/** Result or status of the action execution */
|
|
52
|
-
actionResult?: 'success' | 'failure' | 'pending';
|
|
53
|
-
/** Error message if action execution failed */
|
|
54
|
-
actionError?: string;
|
|
55
|
-
/** User or session identifier */
|
|
56
|
-
userId?: string;
|
|
57
|
-
/** Additional metadata for custom use cases */
|
|
58
|
-
metadata?: Record<string, any>;
|
|
59
|
-
/** Ancestor operation ID for batch operations */
|
|
60
|
-
ancestorOperationId?: string;
|
|
61
|
-
/** Descendant operation IDs for batch operations */
|
|
62
|
-
descendantOperationIds?: string[];
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Input type for adding operations
|
|
66
|
-
* Excludes system-generated fields (id, timestamp)
|
|
67
|
-
* @public
|
|
68
|
-
*/
|
|
69
|
-
export type HSTOperationInput = Omit<HSTOperation, 'id' | 'timestamp' | 'source'> & {
|
|
70
|
-
source?: OperationSource;
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Batch operation wrapper
|
|
74
|
-
* @public
|
|
75
|
-
*/
|
|
76
|
-
export interface BatchOperation {
|
|
77
|
-
/** Unique batch identifier */
|
|
78
|
-
id: string;
|
|
79
|
-
/** Operations included in this batch */
|
|
80
|
-
operations: HSTOperation[];
|
|
81
|
-
/** When the batch was created */
|
|
82
|
-
timestamp: Date;
|
|
83
|
-
/** Optional description of what this batch represents */
|
|
84
|
-
description?: string;
|
|
85
|
-
/** Whether the entire batch can be undone */
|
|
86
|
-
reversible: boolean;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Operation log configuration
|
|
90
|
-
* @public
|
|
91
|
-
*/
|
|
92
|
-
export interface OperationLogConfig {
|
|
93
|
-
/** Maximum operations to store (default: 100) */
|
|
94
|
-
maxOperations?: number;
|
|
95
|
-
/** Enable cross-tab synchronization (default: true) */
|
|
96
|
-
enableCrossTabSync?: boolean;
|
|
97
|
-
/** Enable operation persistence to localStorage (default: false) */
|
|
98
|
-
enablePersistence?: boolean;
|
|
99
|
-
/** Persistence key prefix */
|
|
100
|
-
persistenceKeyPrefix?: string;
|
|
101
|
-
/** User identifier for multi-user scenarios */
|
|
102
|
-
userId?: string;
|
|
103
|
-
/** Custom operation filter */
|
|
104
|
-
operationFilter?: (operation: HSTOperation) => boolean;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Undo/Redo state
|
|
108
|
-
* @public
|
|
109
|
-
*/
|
|
110
|
-
export interface UndoRedoState {
|
|
111
|
-
/** Can undo */
|
|
112
|
-
canUndo: boolean;
|
|
113
|
-
/** Can redo */
|
|
114
|
-
canRedo: boolean;
|
|
115
|
-
/** Number of operations available for undo */
|
|
116
|
-
undoCount: number;
|
|
117
|
-
/** Number of operations available for redo */
|
|
118
|
-
redoCount: number;
|
|
119
|
-
/** Current operation index */
|
|
120
|
-
currentIndex: number;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Operation log snapshot for debugging
|
|
124
|
-
* @public
|
|
125
|
-
*/
|
|
126
|
-
export interface OperationLogSnapshot {
|
|
127
|
-
/** All operations in the log */
|
|
128
|
-
operations: HSTOperation[];
|
|
129
|
-
/** Current operation index in the history */
|
|
130
|
-
currentIndex: number;
|
|
131
|
-
/** Total number of operations */
|
|
132
|
-
totalOperations: number;
|
|
133
|
-
/** Number of operations that can be undone */
|
|
134
|
-
reversibleOperations: number;
|
|
135
|
-
/** Number of operations that cannot be undone */
|
|
136
|
-
irreversibleOperations: number;
|
|
137
|
-
/** Timestamp of the oldest operation */
|
|
138
|
-
oldestOperation?: Date;
|
|
139
|
-
/** Timestamp of the newest operation */
|
|
140
|
-
newestOperation?: Date;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Cross-tab message types
|
|
144
|
-
* @public
|
|
145
|
-
*/
|
|
146
|
-
export type CrossTabMessageType = 'operation' | 'undo' | 'redo' | 'sync-request' | 'sync-response';
|
|
147
|
-
/**
|
|
148
|
-
* Cross-tab message payload
|
|
149
|
-
* @public
|
|
150
|
-
*/
|
|
151
|
-
export interface CrossTabMessage {
|
|
152
|
-
/** Type of cross-tab message */
|
|
153
|
-
type: CrossTabMessageType;
|
|
154
|
-
/** Single operation for operation/undo/redo messages */
|
|
155
|
-
operation?: HSTOperation;
|
|
156
|
-
/** Multiple operations for sync messages */
|
|
157
|
-
operations?: HSTOperation[];
|
|
158
|
-
/** Identifier of the client/tab sending the message */
|
|
159
|
-
clientId: string;
|
|
160
|
-
/** When the message was sent */
|
|
161
|
-
timestamp: Date;
|
|
162
|
-
}
|
|
163
|
-
//# sourceMappingURL=operation-log.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operation-log.d.ts","sourceRoot":"","sources":["../../../src/types/operation-log.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,CAAA;AAEnF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;AAE1E;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC5B,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAA;IAEV,kCAAkC;IAClC,IAAI,EAAE,gBAAgB,CAAA;IAEtB,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAA;IAEZ,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAA;IAEjB,iCAAiC;IACjC,WAAW,EAAE,GAAG,CAAA;IAEhB,gCAAgC;IAChC,UAAU,EAAE,GAAG,CAAA;IAEf,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAA;IAEf,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,iCAAiC;IACjC,SAAS,EAAE,IAAI,CAAA;IAEf,oEAAoE;IACpE,MAAM,CAAC,EAAE,eAAe,CAAA;IAExB,2CAA2C;IAC3C,UAAU,EAAE,OAAO,CAAA;IAEnB,0CAA0C;IAC1C,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAE3B,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,iDAAiD;IACjD,eAAe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OAAO,CAAA;CACtD;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,eAAe;IACf,OAAO,EAAE,OAAO,CAAA;IAEhB,eAAe;IACf,OAAO,EAAE,OAAO,CAAA;IAEhB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAA;IAEjB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAA;IAEjB,8BAA8B;IAC9B,YAAY,EAAE,MAAM,CAAA;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACpC,gCAAgC;IAChC,UAAU,EAAE,YAAY,EAAE,CAAA;IAC1B,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAA;IACpB,iCAAiC;IACjC,eAAe,EAAE,MAAM,CAAA;IACvB,8CAA8C;IAC9C,oBAAoB,EAAE,MAAM,CAAA;IAC5B,iDAAiD;IACjD,sBAAsB,EAAE,MAAM,CAAA;IAC9B,wCAAwC;IACxC,eAAe,CAAC,EAAE,IAAI,CAAA;IACtB,wCAAwC;IACxC,eAAe,CAAC,EAAE,IAAI,CAAA;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,cAAc,GAAG,eAAe,CAAA;AAElG;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC/B,gCAAgC;IAChC,IAAI,EAAE,mBAAmB,CAAA;IACzB,wDAAwD;IACxD,SAAS,CAAC,EAAE,YAAY,CAAA;IACxB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,YAAY,EAAE,CAAA;IAC3B,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAA;IAChB,gCAAgC;IAChC,SAAS,EAAE,IAAI,CAAA;CACf"}
|
|
File without changes
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { DataClient } from '@stonecrop/schema';
|
|
2
|
-
import type { Component } from 'vue';
|
|
3
|
-
import type { Router } from 'vue-router';
|
|
4
|
-
import type Doctype from '../doctype';
|
|
5
|
-
import type Registry from '../registry';
|
|
6
|
-
import type { Stonecrop } from '../stonecrop';
|
|
7
|
-
import type { RouteContext } from './registry';
|
|
8
|
-
/**
|
|
9
|
-
* Install options for Stonecrop Vue plugin
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export type InstallOptions = {
|
|
13
|
-
router?: Router;
|
|
14
|
-
components?: Record<string, Component>;
|
|
15
|
-
getMeta?: (routeContext: RouteContext) => Doctype | Promise<Doctype>;
|
|
16
|
-
/**
|
|
17
|
-
* Data client for fetching doctype metadata and records.
|
|
18
|
-
* Use \@stonecrop/graphql-client's StonecropClient for GraphQL backends,
|
|
19
|
-
* or implement DataClient for custom data sources.
|
|
20
|
-
*
|
|
21
|
-
* Can be set later via `useStonecropRegistry().setClient()` for deferred configuration.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* import { StonecropClient } from '@stonecrop/graphql-client'
|
|
26
|
-
*
|
|
27
|
-
* const client = new StonecropClient({ endpoint: '/graphql' })
|
|
28
|
-
* app.use(StonecropPlugin, { client })
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
client?: DataClient;
|
|
32
|
-
/** Automatically run initialization callback after app mounting (default: false) */
|
|
33
|
-
autoInitializeRouter?: boolean;
|
|
34
|
-
/** Callback function called after plugin is ready and mounted */
|
|
35
|
-
onRouterInitialized?: (registry: Registry, stonecrop: Stonecrop) => void | Promise<void>;
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/types/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACpC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAExC,OAAO,KAAK,OAAO,MAAM,YAAY,CAAA;AACrC,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IACtC,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IACpE;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,oFAAoF;IACpF,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,iEAAiE;IACjE,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACxF,CAAA"}
|
package/dist/src/types/plugin.js
DELETED
|
File without changes
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Route context passed to getMeta function
|
|
3
|
-
* @public
|
|
4
|
-
*/
|
|
5
|
-
export interface RouteContext {
|
|
6
|
-
/** The full route path (e.g., "/todo/1" or "/todo") */
|
|
7
|
-
path: string;
|
|
8
|
-
/** Path segments split by "/" (e.g., ["todo", "1"] or ["todo"]) */
|
|
9
|
-
segments: string[];
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/types/registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC5B,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAA;IACZ,mEAAmE;IACnE,QAAQ,EAAE,MAAM,EAAE,CAAA;CAClB"}
|
|
File without changes
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type Registry from '../registry';
|
|
2
|
-
/**
|
|
3
|
-
* Validation severity levels
|
|
4
|
-
* @public
|
|
5
|
-
*/
|
|
6
|
-
export declare enum ValidationSeverity {
|
|
7
|
-
/** Blocking error that prevents save */
|
|
8
|
-
ERROR = "error",
|
|
9
|
-
/** Advisory warning that allows save */
|
|
10
|
-
WARNING = "warning",
|
|
11
|
-
/** Informational message */
|
|
12
|
-
INFO = "info"
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Validation issue
|
|
16
|
-
* @public
|
|
17
|
-
*/
|
|
18
|
-
export interface ValidationIssue {
|
|
19
|
-
/** Severity level */
|
|
20
|
-
severity: ValidationSeverity;
|
|
21
|
-
/** Validation rule that failed */
|
|
22
|
-
rule: string;
|
|
23
|
-
/** Human-readable message */
|
|
24
|
-
message: string;
|
|
25
|
-
/** Doctype name */
|
|
26
|
-
doctype?: string;
|
|
27
|
-
/** Field name if applicable */
|
|
28
|
-
fieldname?: string;
|
|
29
|
-
/** Additional context */
|
|
30
|
-
context?: Record<string, unknown>;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Validation result
|
|
34
|
-
* @public
|
|
35
|
-
*/
|
|
36
|
-
export interface ValidationResult {
|
|
37
|
-
/** Whether validation passed (no blocking errors) */
|
|
38
|
-
valid: boolean;
|
|
39
|
-
/** List of validation issues */
|
|
40
|
-
issues: ValidationIssue[];
|
|
41
|
-
/** Count of errors */
|
|
42
|
-
errorCount: number;
|
|
43
|
-
/** Count of warnings */
|
|
44
|
-
warningCount: number;
|
|
45
|
-
/** Count of info messages */
|
|
46
|
-
infoCount: number;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Schema validator options
|
|
50
|
-
* @public
|
|
51
|
-
*/
|
|
52
|
-
export interface ValidatorOptions {
|
|
53
|
-
/** Registry instance for doctype lookups */
|
|
54
|
-
registry?: Registry;
|
|
55
|
-
/** Whether to validate Link field targets */
|
|
56
|
-
validateLinkTargets?: boolean;
|
|
57
|
-
/** Whether to validate links object (target resolution, backlink consistency, Link field correspondence) */
|
|
58
|
-
validateLinks?: boolean;
|
|
59
|
-
/** Whether to validate workflow reachability */
|
|
60
|
-
validateWorkflows?: boolean;
|
|
61
|
-
/** Whether to validate action registration */
|
|
62
|
-
validateActions?: boolean;
|
|
63
|
-
/** Whether to validate required schema properties */
|
|
64
|
-
validateRequiredProperties?: boolean;
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=schema-validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema-validator.d.ts","sourceRoot":"","sources":["../../../src/types/schema-validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAA;AAEvC;;;GAGG;AACH,oBAAY,kBAAkB;IAC7B,wCAAwC;IACxC,KAAK,UAAU;IACf,wCAAwC;IACxC,OAAO,YAAY;IACnB,4BAA4B;IAC5B,IAAI,SAAS;CACb;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC/B,qBAAqB;IACrB,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,6BAA6B;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,mBAAmB;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAChC,qDAAqD;IACrD,KAAK,EAAE,OAAO,CAAA;IACd,gCAAgC;IAChC,MAAM,EAAE,eAAe,EAAE,CAAA;IACzB,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,wBAAwB;IACxB,YAAY,EAAE,MAAM,CAAA;IACpB,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAA;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAChC,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,6CAA6C;IAC7C,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,4GAA4G;IAC5G,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,8CAA8C;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,qDAAqD;IACrD,0BAA0B,CAAC,EAAE,OAAO,CAAA;CACpC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validation severity levels
|
|
3
|
-
* @public
|
|
4
|
-
*/
|
|
5
|
-
export var ValidationSeverity;
|
|
6
|
-
(function (ValidationSeverity) {
|
|
7
|
-
/** Blocking error that prevents save */
|
|
8
|
-
ValidationSeverity["ERROR"] = "error";
|
|
9
|
-
/** Advisory warning that allows save */
|
|
10
|
-
ValidationSeverity["WARNING"] = "warning";
|
|
11
|
-
/** Informational message */
|
|
12
|
-
ValidationSeverity["INFO"] = "info";
|
|
13
|
-
})(ValidationSeverity || (ValidationSeverity = {}));
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { DataClient } from '@stonecrop/schema';
|
|
2
|
-
/**
|
|
3
|
-
* Pagination metadata from the last {@link Stonecrop.getRecords} for a doctype.
|
|
4
|
-
* Kept beside HST, not in it — see {@link Stonecrop.getPageInfo}.
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
export interface PageInfo {
|
|
8
|
-
/** Whether the backend holds further records beyond what has been fetched */
|
|
9
|
-
hasMore: boolean;
|
|
10
|
-
/** Total matching the filters when the caller passed includeTotal */
|
|
11
|
-
count?: number;
|
|
12
|
-
/** Offset of the last fetch */
|
|
13
|
-
offset: number;
|
|
14
|
-
/** Number of rows in the last page (result.data.length) */
|
|
15
|
-
limit: number;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Options for constructing a Stonecrop instance directly.
|
|
19
|
-
* When using the Vue plugin, pass these via `InstallOptions` instead.
|
|
20
|
-
* @public
|
|
21
|
-
*/
|
|
22
|
-
export interface StonecropOptions {
|
|
23
|
-
/**
|
|
24
|
-
* Data client for fetching doctype metadata and records.
|
|
25
|
-
* Use \@stonecrop/graphql-client's StonecropClient for GraphQL backends,
|
|
26
|
-
* or implement DataClient for custom data sources.
|
|
27
|
-
*
|
|
28
|
-
* Can be set later via `setClient()` for deferred configuration.
|
|
29
|
-
*/
|
|
30
|
-
client?: DataClient;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=stonecrop.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stonecrop.d.ts","sourceRoot":"","sources":["../../../src/types/stonecrop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACxB,6EAA6E;IAC7E,OAAO,EAAE,OAAO,CAAA;IAChB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAA;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,UAAU,CAAA;CACnB"}
|
|
File without changes
|