@statelyai/sdk 0.12.0 → 0.12.1
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/dist-C-AdA8Iw.mjs +9195 -0
- package/dist/{graphToXStateTS-D12GTMBp.mjs → dist-cQdIPK_n.mjs} +3735 -52
- package/dist/{graph-CszT5J6W.d.mts → graph-Bm4_GZX_.d.mts} +2 -264
- package/dist/graph.d.mts +1 -1
- package/dist/index-BpUKBSiq.d.mts +2843 -0
- package/dist/index.d.mts +5 -58
- package/dist/index.mjs +3 -3
- package/dist/inspect.d.mts +1 -1
- package/dist/oauth.d.mts +18 -1
- package/dist/oauth.mjs +36 -16
- package/dist/patchTypes.d.mts +2 -249
- package/dist/sync.d.mts +1 -1
- package/dist/sync.mjs +1 -3576
- package/package.json +3 -2
- /package/dist/{inspect-BibyPhFj.d.mts → inspect-BmZUcnZB.d.mts} +0 -0
|
@@ -1,269 +1,7 @@
|
|
|
1
|
+
import { r as CodeExpression } from "./index-BpUKBSiq.mjs";
|
|
1
2
|
import * as _statelyai_graph0 from "@statelyai/graph";
|
|
2
3
|
import { Graph } from "@statelyai/graph";
|
|
3
4
|
|
|
4
|
-
//#region ../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts
|
|
5
|
-
// ==================================================================================================
|
|
6
|
-
// JSON Schema Draft 07
|
|
7
|
-
// ==================================================================================================
|
|
8
|
-
// https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
|
|
9
|
-
// --------------------------------------------------------------------------------------------------
|
|
10
|
-
/**
|
|
11
|
-
* Primitive type
|
|
12
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
|
|
13
|
-
*/
|
|
14
|
-
type JSONSchema7TypeName = "string" //
|
|
15
|
-
| "number" | "integer" | "boolean" | "object" | "array" | "null";
|
|
16
|
-
/**
|
|
17
|
-
* Primitive type
|
|
18
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
|
|
19
|
-
*/
|
|
20
|
-
type JSONSchema7Type = string //
|
|
21
|
-
| number | boolean | JSONSchema7Object | JSONSchema7Array | null;
|
|
22
|
-
// Workaround for infinite type recursion
|
|
23
|
-
interface JSONSchema7Object {
|
|
24
|
-
[key: string]: JSONSchema7Type;
|
|
25
|
-
}
|
|
26
|
-
// Workaround for infinite type recursion
|
|
27
|
-
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
|
|
28
|
-
interface JSONSchema7Array extends Array<JSONSchema7Type> {}
|
|
29
|
-
/**
|
|
30
|
-
* Meta schema
|
|
31
|
-
*
|
|
32
|
-
* Recommended values:
|
|
33
|
-
* - 'http://json-schema.org/schema#'
|
|
34
|
-
* - 'http://json-schema.org/hyper-schema#'
|
|
35
|
-
* - 'http://json-schema.org/draft-07/schema#'
|
|
36
|
-
* - 'http://json-schema.org/draft-07/hyper-schema#'
|
|
37
|
-
*
|
|
38
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
|
|
39
|
-
*/
|
|
40
|
-
type JSONSchema7Version = string;
|
|
41
|
-
/**
|
|
42
|
-
* JSON Schema v7
|
|
43
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
|
|
44
|
-
*/
|
|
45
|
-
type JSONSchema7Definition = JSONSchema7 | boolean;
|
|
46
|
-
interface JSONSchema7 {
|
|
47
|
-
$id?: string | undefined;
|
|
48
|
-
$ref?: string | undefined;
|
|
49
|
-
$schema?: JSONSchema7Version | undefined;
|
|
50
|
-
$comment?: string | undefined;
|
|
51
|
-
/**
|
|
52
|
-
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
|
|
53
|
-
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
|
|
54
|
-
*/
|
|
55
|
-
$defs?: {
|
|
56
|
-
[key: string]: JSONSchema7Definition;
|
|
57
|
-
} | undefined;
|
|
58
|
-
/**
|
|
59
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
|
|
60
|
-
*/
|
|
61
|
-
type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
|
|
62
|
-
enum?: JSONSchema7Type[] | undefined;
|
|
63
|
-
const?: JSONSchema7Type | undefined;
|
|
64
|
-
/**
|
|
65
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
|
|
66
|
-
*/
|
|
67
|
-
multipleOf?: number | undefined;
|
|
68
|
-
maximum?: number | undefined;
|
|
69
|
-
exclusiveMaximum?: number | undefined;
|
|
70
|
-
minimum?: number | undefined;
|
|
71
|
-
exclusiveMinimum?: number | undefined;
|
|
72
|
-
/**
|
|
73
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
|
|
74
|
-
*/
|
|
75
|
-
maxLength?: number | undefined;
|
|
76
|
-
minLength?: number | undefined;
|
|
77
|
-
pattern?: string | undefined;
|
|
78
|
-
/**
|
|
79
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
|
|
80
|
-
*/
|
|
81
|
-
items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined;
|
|
82
|
-
additionalItems?: JSONSchema7Definition | undefined;
|
|
83
|
-
maxItems?: number | undefined;
|
|
84
|
-
minItems?: number | undefined;
|
|
85
|
-
uniqueItems?: boolean | undefined;
|
|
86
|
-
contains?: JSONSchema7Definition | undefined;
|
|
87
|
-
/**
|
|
88
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
|
|
89
|
-
*/
|
|
90
|
-
maxProperties?: number | undefined;
|
|
91
|
-
minProperties?: number | undefined;
|
|
92
|
-
required?: string[] | undefined;
|
|
93
|
-
properties?: {
|
|
94
|
-
[key: string]: JSONSchema7Definition;
|
|
95
|
-
} | undefined;
|
|
96
|
-
patternProperties?: {
|
|
97
|
-
[key: string]: JSONSchema7Definition;
|
|
98
|
-
} | undefined;
|
|
99
|
-
additionalProperties?: JSONSchema7Definition | undefined;
|
|
100
|
-
dependencies?: {
|
|
101
|
-
[key: string]: JSONSchema7Definition | string[];
|
|
102
|
-
} | undefined;
|
|
103
|
-
propertyNames?: JSONSchema7Definition | undefined;
|
|
104
|
-
/**
|
|
105
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
|
|
106
|
-
*/
|
|
107
|
-
if?: JSONSchema7Definition | undefined;
|
|
108
|
-
then?: JSONSchema7Definition | undefined;
|
|
109
|
-
else?: JSONSchema7Definition | undefined;
|
|
110
|
-
/**
|
|
111
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
|
|
112
|
-
*/
|
|
113
|
-
allOf?: JSONSchema7Definition[] | undefined;
|
|
114
|
-
anyOf?: JSONSchema7Definition[] | undefined;
|
|
115
|
-
oneOf?: JSONSchema7Definition[] | undefined;
|
|
116
|
-
not?: JSONSchema7Definition | undefined;
|
|
117
|
-
/**
|
|
118
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
|
|
119
|
-
*/
|
|
120
|
-
format?: string | undefined;
|
|
121
|
-
/**
|
|
122
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
|
|
123
|
-
*/
|
|
124
|
-
contentMediaType?: string | undefined;
|
|
125
|
-
contentEncoding?: string | undefined;
|
|
126
|
-
/**
|
|
127
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
|
|
128
|
-
*/
|
|
129
|
-
definitions?: {
|
|
130
|
-
[key: string]: JSONSchema7Definition;
|
|
131
|
-
} | undefined;
|
|
132
|
-
/**
|
|
133
|
-
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
|
|
134
|
-
*/
|
|
135
|
-
title?: string | undefined;
|
|
136
|
-
description?: string | undefined;
|
|
137
|
-
default?: JSONSchema7Type | undefined;
|
|
138
|
-
readOnly?: boolean | undefined;
|
|
139
|
-
writeOnly?: boolean | undefined;
|
|
140
|
-
examples?: JSONSchema7Type | undefined;
|
|
141
|
-
}
|
|
142
|
-
//#endregion
|
|
143
|
-
//#region ../graph-tools/src/codegenTypes.d.ts
|
|
144
|
-
interface CodeGenAction {
|
|
145
|
-
/** Graph-native block id, referenced by `@statelyai.action.*` transitions. */
|
|
146
|
-
id?: string;
|
|
147
|
-
type: string;
|
|
148
|
-
params?: Record<string, unknown>;
|
|
149
|
-
}
|
|
150
|
-
interface CodeGenGuard {
|
|
151
|
-
type: string;
|
|
152
|
-
code?: string;
|
|
153
|
-
params?: Record<string, unknown>;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Serialized inline expression directive.
|
|
157
|
-
*
|
|
158
|
-
* Code generation treats this object as JavaScript/TypeScript source, not as a
|
|
159
|
-
* machine config object. It is used for fields such as invoke `input` and
|
|
160
|
-
* `output` where XState accepts mapper expressions.
|
|
161
|
-
*/
|
|
162
|
-
interface CodeExpression {
|
|
163
|
-
'@type': 'code';
|
|
164
|
-
lang: 'js' | 'ts';
|
|
165
|
-
expr: string;
|
|
166
|
-
imports?: CodeImport[];
|
|
167
|
-
}
|
|
168
|
-
interface CodeImport {
|
|
169
|
-
package: string;
|
|
170
|
-
import: string;
|
|
171
|
-
importKind?: 'named' | 'default' | 'namespace';
|
|
172
|
-
version?: string;
|
|
173
|
-
}
|
|
174
|
-
interface CodeGenInvoke {
|
|
175
|
-
src: string;
|
|
176
|
-
id: string;
|
|
177
|
-
invocationId?: string;
|
|
178
|
-
input?: Record<string, unknown> | CodeExpression;
|
|
179
|
-
output?: Record<string, unknown> | CodeExpression;
|
|
180
|
-
}
|
|
181
|
-
interface CodeGenNodeData {
|
|
182
|
-
nodeId?: string | null;
|
|
183
|
-
key: string;
|
|
184
|
-
type?: 'normal' | 'parallel' | 'final' | 'history' | 'choice' | null;
|
|
185
|
-
initialId?: string | null;
|
|
186
|
-
history?: 'shallow' | 'deep' | boolean;
|
|
187
|
-
output?: Record<string, unknown> | CodeExpression;
|
|
188
|
-
entry?: CodeGenAction[];
|
|
189
|
-
exit?: CodeGenAction[];
|
|
190
|
-
invokes?: CodeGenInvoke[];
|
|
191
|
-
tags?: Array<string | {
|
|
192
|
-
name: string;
|
|
193
|
-
}>;
|
|
194
|
-
description?: string | null;
|
|
195
|
-
meta?: Record<string, unknown> | null;
|
|
196
|
-
color?: string;
|
|
197
|
-
parentId?: string | null;
|
|
198
|
-
temp?: unknown;
|
|
199
|
-
}
|
|
200
|
-
interface CodeGenEdgeData {
|
|
201
|
-
eventType: string;
|
|
202
|
-
transitionType?: 'normal' | 'targetless' | 'reenter';
|
|
203
|
-
guard?: CodeGenGuard | null;
|
|
204
|
-
context?: Record<string, unknown> | CodeExpression;
|
|
205
|
-
actions?: CodeGenAction[];
|
|
206
|
-
description?: string | null;
|
|
207
|
-
color?: string;
|
|
208
|
-
meta?: Record<string, unknown> | null;
|
|
209
|
-
temp?: unknown;
|
|
210
|
-
}
|
|
211
|
-
interface CodeGenImplementation {
|
|
212
|
-
id: string;
|
|
213
|
-
name: string;
|
|
214
|
-
description?: string | null;
|
|
215
|
-
icon?: string;
|
|
216
|
-
paramsSchema?: JSONSchema7 | null;
|
|
217
|
-
code?: {
|
|
218
|
-
body: string;
|
|
219
|
-
lang?: string;
|
|
220
|
-
} | null;
|
|
221
|
-
}
|
|
222
|
-
interface CodeGenActorImplementation {
|
|
223
|
-
id: string;
|
|
224
|
-
name: string;
|
|
225
|
-
description?: string | null;
|
|
226
|
-
icon?: string;
|
|
227
|
-
inputSchema?: JSONSchema7 | null;
|
|
228
|
-
outputSchema?: JSONSchema7 | null;
|
|
229
|
-
code?: {
|
|
230
|
-
body: string;
|
|
231
|
-
lang?: string;
|
|
232
|
-
} | null;
|
|
233
|
-
}
|
|
234
|
-
interface CodeGenGraphData {
|
|
235
|
-
context?: Record<string, unknown> | CodeExpression | null;
|
|
236
|
-
schemas?: {
|
|
237
|
-
context?: Record<string, JSONSchema7> | null;
|
|
238
|
-
events?: Record<string, JSONSchema7> | null;
|
|
239
|
-
input?: JSONSchema7 | null;
|
|
240
|
-
output?: JSONSchema7 | null;
|
|
241
|
-
} | null;
|
|
242
|
-
implementations?: {
|
|
243
|
-
actions: CodeGenImplementation[];
|
|
244
|
-
guards: CodeGenImplementation[];
|
|
245
|
-
actors: CodeGenActorImplementation[];
|
|
246
|
-
delays: CodeGenImplementation[];
|
|
247
|
-
} | null;
|
|
248
|
-
}
|
|
249
|
-
interface CodeGenNode {
|
|
250
|
-
id: string;
|
|
251
|
-
parentId?: string | null;
|
|
252
|
-
data: CodeGenNodeData;
|
|
253
|
-
}
|
|
254
|
-
interface CodeGenEdge {
|
|
255
|
-
id: string;
|
|
256
|
-
sourceId: string;
|
|
257
|
-
targetId: string;
|
|
258
|
-
data: CodeGenEdgeData;
|
|
259
|
-
}
|
|
260
|
-
interface CodeGenGraph {
|
|
261
|
-
id: string;
|
|
262
|
-
nodes: CodeGenNode[];
|
|
263
|
-
edges: CodeGenEdge[];
|
|
264
|
-
data: CodeGenGraphData;
|
|
265
|
-
}
|
|
266
|
-
//#endregion
|
|
267
5
|
//#region src/digraphTypes.d.ts
|
|
268
6
|
type CanvasColor = undefined | 'green' | 'red' | 'purple' | 'blue' | 'orange' | 'yellow' | 'pink' | 'teal';
|
|
269
7
|
type ExtractorGuard = {
|
|
@@ -653,4 +391,4 @@ declare function toStudioMachine(graph: StatelyGraph): StudioMachine;
|
|
|
653
391
|
declare function fromStudioMachine(studioMachine: StudioMachine): StatelyGraph;
|
|
654
392
|
declare const studioMachineConverter: _statelyai_graph0.GraphFormatConverter<DigraphConfig, StatelyNodeData, StatelyEdgeData, StatelyGraphData>;
|
|
655
393
|
//#endregion
|
|
656
|
-
export { EventTypeData as C,
|
|
394
|
+
export { EventTypeData as C, DigraphNodeConfig as S, studioMachineConverter as _, StatelyGraphData as a, DigraphConfig as b, StatelyInvoke as c, StudioAction as d, StudioEdge as f, fromStudioMachine as g, StudioNode as h, StatelyGraph as i, StatelyNodeData as l, StudioMachine as m, StatelyActorImplementation as n, StatelyGuard as o, StudioEventTypeData as p, StatelyEdgeData as r, StatelyImplementation as s, StatelyAction as t, StatelyTagImplementation as u, toStudioMachine as v, StateNodeJSONData as w, DigraphEdgeConfig as x, DigraphAction as y };
|
package/dist/graph.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as studioMachineConverter, a as StatelyGraphData, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, n as StatelyActorImplementation, o as StatelyGuard, p as StudioEventTypeData, r as StatelyEdgeData, s as StatelyImplementation, t as StatelyAction, u as StatelyTagImplementation, v as toStudioMachine } from "./graph-
|
|
1
|
+
import { _ as studioMachineConverter, a as StatelyGraphData, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, n as StatelyActorImplementation, o as StatelyGuard, p as StudioEventTypeData, r as StatelyEdgeData, s as StatelyImplementation, t as StatelyAction, u as StatelyTagImplementation, v as toStudioMachine } from "./graph-Bm4_GZX_.mjs";
|
|
2
2
|
export { StatelyAction, StatelyActorImplementation, StatelyEdgeData, StatelyGraph, StatelyGraphData, StatelyGuard, StatelyImplementation, StatelyInvoke, StatelyNodeData, StatelyTagImplementation, StudioAction, StudioEdge, StudioEventTypeData, StudioMachine, StudioNode, fromStudioMachine, studioMachineConverter, toStudioMachine };
|