@statelyai/sdk 0.27.1 → 0.29.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/README.md +6 -1
- package/dist/{editor-sync-types-CTKArS8n.d.mts → editor-sync-types-DB1N6QUK.d.mts} +0 -1
- package/dist/{editorHostSession-shrjfosC.mjs → editorHostSession-DNpXPNAc.mjs} +0 -1
- package/dist/{editorHostSession-CWAuoMtC.d.mts → editorHostSession-vSt07IJV.d.mts} +1 -1
- package/dist/editorHostSession.d.mts +1 -1
- package/dist/editorHostSession.mjs +1 -1
- package/dist/embed.d.mts +3 -6
- package/dist/embed.mjs +4 -2
- package/dist/{graph-BwHnhzpC.d.mts → graph-5X1Ilppq.d.mts} +1 -1
- package/dist/graph.d.mts +1 -1
- package/dist/{index-D2I1qPsf.d.mts → index-DNDfA-YC.d.mts} +38 -6
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +6 -6
- package/dist/{inspect-CebH2l6F.mjs → inspect-DYFQzEsh.mjs} +1 -1
- package/dist/inspect.mjs +2 -2
- package/dist/patchTypes.d.mts +1 -1
- package/dist/protocol.d.mts +24 -8
- package/dist/{statelyPragma-ByF0-L-N.mjs → statelyPragma-Cg1KzBZr.mjs} +938 -49
- package/dist/{studio-CNkxMZyz.mjs → studio-DpCW5V4a.mjs} +61 -0
- package/dist/{studio-B9-1Ynrx.d.mts → studio-QQRLjF5V.d.mts} +55 -1
- package/dist/studio.d.mts +1 -1
- package/dist/studio.mjs +1 -1
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +2 -2
- package/dist/{version-usAEzut8.mjs → version-BJPr6idb.mjs} +1 -1
- package/package.json +3 -3
|
@@ -42,6 +42,66 @@ function createResourceApiErrorResponseSchema() {
|
|
|
42
42
|
}
|
|
43
43
|
const resourceApiErrorResponseSchema = createResourceApiErrorResponseSchema();
|
|
44
44
|
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region ../api-contract/dist/xgraph.mjs
|
|
47
|
+
const looseRecordSchema = record(string(), unknown());
|
|
48
|
+
const pointSchema = object({
|
|
49
|
+
x: number(),
|
|
50
|
+
y: number()
|
|
51
|
+
});
|
|
52
|
+
const nodeDataSchema = looseRecordSchema.refine((data) => !("parentId" in data), "XGraph node data must not contain parentId; use node.parentId.");
|
|
53
|
+
const xgraphNodeSchema = object({
|
|
54
|
+
id: string(),
|
|
55
|
+
type: string().optional(),
|
|
56
|
+
parentId: string().nullable().optional(),
|
|
57
|
+
sourceId: string().optional(),
|
|
58
|
+
targetId: string().optional(),
|
|
59
|
+
label: string().nullable().optional(),
|
|
60
|
+
data: nodeDataSchema.optional(),
|
|
61
|
+
x: number().optional(),
|
|
62
|
+
y: number().optional(),
|
|
63
|
+
width: number().optional(),
|
|
64
|
+
height: number().optional(),
|
|
65
|
+
position: pointSchema.optional(),
|
|
66
|
+
dx: number().optional(),
|
|
67
|
+
dy: number().optional()
|
|
68
|
+
}).passthrough();
|
|
69
|
+
const xgraphEdgeSchema = object({
|
|
70
|
+
id: string(),
|
|
71
|
+
type: string().optional(),
|
|
72
|
+
sourceId: string(),
|
|
73
|
+
targetId: string(),
|
|
74
|
+
label: string().nullable().optional(),
|
|
75
|
+
data: unknown(),
|
|
76
|
+
x: number().optional(),
|
|
77
|
+
y: number().optional(),
|
|
78
|
+
width: number().optional(),
|
|
79
|
+
height: number().optional(),
|
|
80
|
+
position: pointSchema.optional(),
|
|
81
|
+
dx: number().optional(),
|
|
82
|
+
dy: number().optional()
|
|
83
|
+
}).passthrough();
|
|
84
|
+
/** XGraph wire shape accepted and emitted at API boundaries. */
|
|
85
|
+
const xgraphSchema = object({
|
|
86
|
+
xgraphSchemaVersion: literal("1.0.0").optional(),
|
|
87
|
+
id: string(),
|
|
88
|
+
type: string().optional(),
|
|
89
|
+
parentId: string().nullable().optional(),
|
|
90
|
+
initialNodeId: string().nullable().optional(),
|
|
91
|
+
nodes: array(xgraphNodeSchema),
|
|
92
|
+
edges: array(xgraphEdgeSchema),
|
|
93
|
+
data: unknown().optional(),
|
|
94
|
+
layout: unknown().nullable().optional(),
|
|
95
|
+
annotations: array(unknown()).optional(),
|
|
96
|
+
direction: _enum([
|
|
97
|
+
"up",
|
|
98
|
+
"down",
|
|
99
|
+
"left",
|
|
100
|
+
"right"
|
|
101
|
+
]).optional(),
|
|
102
|
+
style: looseRecordSchema.optional()
|
|
103
|
+
}).passthrough();
|
|
104
|
+
|
|
45
105
|
//#endregion
|
|
46
106
|
//#region ../api-contract/dist/resources.mjs
|
|
47
107
|
/**
|
|
@@ -94,6 +154,7 @@ const machineSchema = object({
|
|
|
94
154
|
projectId: string().optional(),
|
|
95
155
|
projectVersionId: string(),
|
|
96
156
|
definition: unknown(),
|
|
157
|
+
graph: xgraphSchema.optional(),
|
|
97
158
|
createdAt: string().optional(),
|
|
98
159
|
updatedAt: string().optional()
|
|
99
160
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as ZodOptional, D as ZodNullable, E as ZodLiteral, F as output, I as $loose, L as $strip, M as ZodString, N as ZodUnion, O as ZodNumber, P as ZodUnknown, T as ZodEnum, j as ZodRecord, k as ZodObject, w as ZodArray } from "./index-DNDfA-YC.mjs";
|
|
2
2
|
import { n as StatelyCredential, t as StatelyAuthMode } from "./auth-BPyCCHYo.mjs";
|
|
3
3
|
|
|
4
4
|
//#region ../api-contract/dist/errors.d.mts
|
|
@@ -91,6 +91,60 @@ declare const machineSchema: ZodObject<{
|
|
|
91
91
|
projectId: ZodOptional<ZodString>;
|
|
92
92
|
projectVersionId: ZodString;
|
|
93
93
|
definition: ZodUnknown;
|
|
94
|
+
graph: ZodOptional<ZodObject<{
|
|
95
|
+
xgraphSchemaVersion: ZodOptional<ZodLiteral<"1.0.0">>;
|
|
96
|
+
id: ZodString;
|
|
97
|
+
type: ZodOptional<ZodString>;
|
|
98
|
+
parentId: ZodOptional<ZodNullable<ZodString>>;
|
|
99
|
+
initialNodeId: ZodOptional<ZodNullable<ZodString>>;
|
|
100
|
+
nodes: ZodArray<ZodObject<{
|
|
101
|
+
id: ZodString;
|
|
102
|
+
type: ZodOptional<ZodString>;
|
|
103
|
+
parentId: ZodOptional<ZodNullable<ZodString>>;
|
|
104
|
+
sourceId: ZodOptional<ZodString>;
|
|
105
|
+
targetId: ZodOptional<ZodString>;
|
|
106
|
+
label: ZodOptional<ZodNullable<ZodString>>;
|
|
107
|
+
data: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
108
|
+
x: ZodOptional<ZodNumber>;
|
|
109
|
+
y: ZodOptional<ZodNumber>;
|
|
110
|
+
width: ZodOptional<ZodNumber>;
|
|
111
|
+
height: ZodOptional<ZodNumber>;
|
|
112
|
+
position: ZodOptional<ZodObject<{
|
|
113
|
+
x: ZodNumber;
|
|
114
|
+
y: ZodNumber;
|
|
115
|
+
}, $strip>>;
|
|
116
|
+
dx: ZodOptional<ZodNumber>;
|
|
117
|
+
dy: ZodOptional<ZodNumber>;
|
|
118
|
+
}, $loose>>;
|
|
119
|
+
edges: ZodArray<ZodObject<{
|
|
120
|
+
id: ZodString;
|
|
121
|
+
type: ZodOptional<ZodString>;
|
|
122
|
+
sourceId: ZodString;
|
|
123
|
+
targetId: ZodString;
|
|
124
|
+
label: ZodOptional<ZodNullable<ZodString>>;
|
|
125
|
+
data: ZodUnknown;
|
|
126
|
+
x: ZodOptional<ZodNumber>;
|
|
127
|
+
y: ZodOptional<ZodNumber>;
|
|
128
|
+
width: ZodOptional<ZodNumber>;
|
|
129
|
+
height: ZodOptional<ZodNumber>;
|
|
130
|
+
position: ZodOptional<ZodObject<{
|
|
131
|
+
x: ZodNumber;
|
|
132
|
+
y: ZodNumber;
|
|
133
|
+
}, $strip>>;
|
|
134
|
+
dx: ZodOptional<ZodNumber>;
|
|
135
|
+
dy: ZodOptional<ZodNumber>;
|
|
136
|
+
}, $loose>>;
|
|
137
|
+
data: ZodOptional<ZodUnknown>;
|
|
138
|
+
layout: ZodOptional<ZodNullable<ZodUnknown>>;
|
|
139
|
+
annotations: ZodOptional<ZodArray<ZodUnknown>>;
|
|
140
|
+
direction: ZodOptional<ZodEnum<{
|
|
141
|
+
up: "up";
|
|
142
|
+
down: "down";
|
|
143
|
+
left: "left";
|
|
144
|
+
right: "right";
|
|
145
|
+
}>>;
|
|
146
|
+
style: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
|
|
147
|
+
}, $loose>>;
|
|
94
148
|
createdAt: ZodOptional<ZodString>;
|
|
95
149
|
updatedAt: ZodOptional<ZodString>;
|
|
96
150
|
}, $strip>;
|
package/dist/studio.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as Machine, C as StudioMachineRecord, D as VerifyApiKeyResponse, E as UpdateProjectInput, F as ProjectVisibility, I as VerifyResult, L as XStateVersion, M as Project, N as ProjectMachineSummary, O as createStatelyClient, P as ProjectSummary, R as ResourceErrorCode, S as StudioClientOptions, T as UpdateMachineInput, _ as ProjectMachine, a as CreateMachineTemplate, b as StudioApiErrorOptions, c as EnsureProjectInput, d as ExtractedMachine, f as GetMachineOptions, g as ProjectData, h as LegacyUpdateMachineInput, i as CreateMachineInput, j as MachineVersion, k as ExtractedMachines, l as ExtractMachinesInput, m as LegacyProjectVisibility, n as CreateMachineFromDefinitionInput, o as CreateProjectInput, p as LegacyExtractMachinesOptions, r as CreateMachineFromTemplateInput, s as DEFAULT_STATELY_BASE_URL, t as ConnectedRepo, u as ExtractMachinesResponse, v as RepoType, w as StudioRequestOptions, x as StudioClient, y as StudioApiError } from "./studio-
|
|
1
|
+
import { A as Machine, C as StudioMachineRecord, D as VerifyApiKeyResponse, E as UpdateProjectInput, F as ProjectVisibility, I as VerifyResult, L as XStateVersion, M as Project, N as ProjectMachineSummary, O as createStatelyClient, P as ProjectSummary, R as ResourceErrorCode, S as StudioClientOptions, T as UpdateMachineInput, _ as ProjectMachine, a as CreateMachineTemplate, b as StudioApiErrorOptions, c as EnsureProjectInput, d as ExtractedMachine, f as GetMachineOptions, g as ProjectData, h as LegacyUpdateMachineInput, i as CreateMachineInput, j as MachineVersion, k as ExtractedMachines, l as ExtractMachinesInput, m as LegacyProjectVisibility, n as CreateMachineFromDefinitionInput, o as CreateProjectInput, p as LegacyExtractMachinesOptions, r as CreateMachineFromTemplateInput, s as DEFAULT_STATELY_BASE_URL, t as ConnectedRepo, u as ExtractMachinesResponse, v as RepoType, w as StudioRequestOptions, x as StudioClient, y as StudioApiError } from "./studio-QQRLjF5V.mjs";
|
|
2
2
|
export { ConnectedRepo, CreateMachineFromDefinitionInput, CreateMachineFromTemplateInput, CreateMachineInput, CreateMachineTemplate, CreateProjectInput, DEFAULT_STATELY_BASE_URL, EnsureProjectInput, ExtractMachinesInput, ExtractMachinesResponse, ExtractedMachine, ExtractedMachines, GetMachineOptions, LegacyExtractMachinesOptions, LegacyProjectVisibility, LegacyUpdateMachineInput, Machine, MachineVersion, Project, ProjectData, ProjectMachine, ProjectMachineSummary, ProjectSummary, ProjectVisibility, RepoType, ResourceErrorCode, StudioApiError, StudioApiErrorOptions, StudioClient, StudioClientOptions, StudioMachineRecord, StudioRequestOptions, UpdateMachineInput, UpdateProjectInput, VerifyApiKeyResponse, VerifyResult, XStateVersion, createStatelyClient };
|
package/dist/studio.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./openapi-BTDjYWXd.mjs";
|
|
2
|
-
import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-
|
|
2
|
+
import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-DpCW5V4a.mjs";
|
|
3
3
|
|
|
4
4
|
export { DEFAULT_STATELY_BASE_URL, StudioApiError, createStatelyClient };
|
package/dist/sync.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as DigraphConfig, i as StatelyGraph } from "./graph-
|
|
2
|
-
import { C as StudioMachineRecord, L as XStateVersion, g as ProjectData, o as CreateProjectInput, x as StudioClient } from "./studio-
|
|
1
|
+
import { b as DigraphConfig, i as StatelyGraph } from "./graph-5X1Ilppq.mjs";
|
|
2
|
+
import { C as StudioMachineRecord, L as XStateVersion, g as ProjectData, o as CreateProjectInput, x as StudioClient } from "./studio-QQRLjF5V.mjs";
|
|
3
3
|
import { GraphDiff } from "@statelyai/graph";
|
|
4
4
|
|
|
5
5
|
//#region src/sync.d.ts
|
package/dist/sync.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./openapi-BTDjYWXd.mjs";
|
|
2
|
-
import { r as createStatelyClient } from "./studio-
|
|
3
|
-
import {
|
|
2
|
+
import { r as createStatelyClient } from "./studio-DpCW5V4a.mjs";
|
|
3
|
+
import { b as serializeJS, c as detectXStateSourceProfile, f as graphChangeToPatchesResult, h as graphToXStateTS, i as INLINE_EXPRESSION_DIRECTIVE_FIELDS, l as diffGraphsSemantically, n as getStatelyPragma, o as alignCompareGraphIds, p as graphToMachineConfig, r as upsertStatelyPragma, t as findStatelyPragmaAttachments, v as normalizeMachineProfile, x as xstateSourceToConfig } from "./statelyPragma-Cg1KzBZr.mjs";
|
|
4
4
|
import { fromStudioMachine, toStudioMachine } from "./graph.mjs";
|
|
5
5
|
import * as ts$1 from "typescript";
|
|
6
6
|
import ts from "typescript";
|
|
@@ -364,7 +364,7 @@ function createWebSocketTransport(options) {
|
|
|
364
364
|
|
|
365
365
|
//#endregion
|
|
366
366
|
//#region src/version.ts
|
|
367
|
-
const SDK_VERSION = "0.
|
|
367
|
+
const SDK_VERSION = "0.29.0";
|
|
368
368
|
function inspectionRuntime() {
|
|
369
369
|
if (typeof window !== "undefined") return "browser";
|
|
370
370
|
if (typeof process !== "undefined" && process.versions?.node) return "node";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statelyai/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bin": {
|
|
6
6
|
"stately-sdk": "./dist/bin.mjs"
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
"jsdom": "^27.4.0",
|
|
94
94
|
"tsdown": "0.21.0-beta.2",
|
|
95
95
|
"vitest": "^3.2.4",
|
|
96
|
-
"@statelyai/api-contract": "0.
|
|
97
|
-
"@statelyai/graph-tools": "0.
|
|
96
|
+
"@statelyai/api-contract": "0.4.0",
|
|
97
|
+
"@statelyai/graph-tools": "0.7.0"
|
|
98
98
|
},
|
|
99
99
|
"engines": {
|
|
100
100
|
"node": ">=22.4"
|