@statelyai/sdk 0.26.3 → 0.27.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 +30 -2
- package/dist/auth.d.mts +1 -1
- package/dist/{editorHostSession-DFjM-RoT.d.mts → editorHostSession-CWAuoMtC.d.mts} +9 -3
- package/dist/{editorHostSession-CwGeXJ6g.mjs → editorHostSession-shrjfosC.mjs} +6 -3
- package/dist/editorHostSession.d.mts +1 -1
- package/dist/editorHostSession.mjs +1 -1
- package/dist/embed.d.mts +6 -3
- package/dist/embed.mjs +23 -1
- package/dist/embedPanel-Bpbq4sfJ.d.mts +13 -0
- package/dist/{graph-DoUReqxz.d.mts → graph-BwHnhzpC.d.mts} +48 -6
- package/dist/graph.d.mts +1 -1
- package/dist/graph.mjs +36 -4
- package/dist/{index-DKRB-u93.d.mts → index-D2I1qPsf.d.mts} +19 -3
- package/dist/index.d.mts +8 -7
- package/dist/index.mjs +6 -6
- package/dist/{inspect-Br_vS_lK.d.mts → inspect-D61HS-t7.d.mts} +2 -5
- package/dist/{inspect-CiPPDR7Q.mjs → inspect-_E2lVbQA.mjs} +2 -4
- package/dist/inspect.d.mts +1 -1
- package/dist/inspect.mjs +2 -2
- package/dist/patchTypes.d.mts +1 -1
- package/dist/protocol.d.mts +46 -15
- package/dist/{statelyPragma-B-axv279.mjs → statelyPragma-DD7wx7-b.mjs} +1197 -31
- package/dist/{studio-B6P177N3.d.mts → studio-B9-1Ynrx.d.mts} +4 -2
- package/dist/{studio-iNSHtNmP.mjs → studio-CNkxMZyz.mjs} +4 -1
- package/dist/studio.d.mts +1 -1
- package/dist/studio.mjs +1 -1
- package/dist/sync.d.mts +12 -4
- package/dist/sync.mjs +2920 -262
- package/dist/{version-At1lONTa.mjs → version-7SUCFMqb.mjs} +19 -7
- package/package.json +3 -3
- package/schemas/xstate.schema.json +41 -5
- /package/dist/{auth-B0ZTKri2.d.mts → auth-BPyCCHYo.d.mts} +0 -0
- /package/dist/{editor-sync-types-C-zWaaVk.d.mts → editor-sync-types-CTKArS8n.d.mts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { n as StatelyCredential, t as StatelyAuthMode } from "./auth-
|
|
1
|
+
import { A as ZodString, C as ZodEnum, D as ZodObject, E as ZodNumber, M as ZodUnknown, N as output, O as ZodOptional, P as $strip, S as ZodArray, T as ZodNullable, j as ZodUnion, k as ZodRecord, w as ZodLiteral } from "./index-D2I1qPsf.mjs";
|
|
2
|
+
import { n as StatelyCredential, t as StatelyAuthMode } from "./auth-BPyCCHYo.mjs";
|
|
3
3
|
|
|
4
4
|
//#region ../api-contract/dist/errors.d.mts
|
|
5
5
|
/**
|
|
@@ -108,6 +108,7 @@ type MachineVersion = output<typeof machineVersionSchema>;
|
|
|
108
108
|
declare const extractedMachinesSchema: ZodObject<{
|
|
109
109
|
machines: ZodArray<ZodObject<{
|
|
110
110
|
config: ZodRecord<ZodString, ZodUnknown>;
|
|
111
|
+
machineIndex: ZodOptional<ZodNumber>;
|
|
111
112
|
}, $strip>>;
|
|
112
113
|
}, $strip>;
|
|
113
114
|
type ExtractedMachines = output<typeof extractedMachinesSchema>;
|
|
@@ -166,6 +167,7 @@ type ProjectData = Project & {
|
|
|
166
167
|
/** @deprecated Use {@link ExtractedMachines}`['machines'][number]`. */
|
|
167
168
|
interface ExtractedMachine {
|
|
168
169
|
config: Record<string, unknown>;
|
|
170
|
+
machineIndex?: number;
|
|
169
171
|
id?: string;
|
|
170
172
|
setupConfig?: Record<string, unknown>;
|
|
171
173
|
implementations?: Record<string, unknown>;
|
|
@@ -106,7 +106,10 @@ const machineVersionSchema = object({
|
|
|
106
106
|
createdAt: string(),
|
|
107
107
|
updatedAt: string()
|
|
108
108
|
});
|
|
109
|
-
const extractedMachinesSchema = object({ machines: array(object({
|
|
109
|
+
const extractedMachinesSchema = object({ machines: array(object({
|
|
110
|
+
config: record(string(), unknown()),
|
|
111
|
+
machineIndex: number().int().nonnegative().optional()
|
|
112
|
+
})) });
|
|
110
113
|
const projectsCreateRequestSchema = object({
|
|
111
114
|
name: string().min(1),
|
|
112
115
|
visibility: projectVisibilitySchema
|
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-B9-1Ynrx.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-CNkxMZyz.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-BwHnhzpC.mjs";
|
|
2
|
+
import { C as StudioMachineRecord, L as XStateVersion, g as ProjectData, o as CreateProjectInput, x as StudioClient } from "./studio-B9-1Ynrx.mjs";
|
|
3
3
|
import { GraphDiff } from "@statelyai/graph";
|
|
4
4
|
|
|
5
5
|
//#region src/sync.d.ts
|
|
@@ -12,6 +12,14 @@ interface PlanSyncOptions {
|
|
|
12
12
|
client?: StudioClient;
|
|
13
13
|
cwd?: string;
|
|
14
14
|
}
|
|
15
|
+
interface PullSyncOptions extends PlanSyncOptions {
|
|
16
|
+
force?: boolean;
|
|
17
|
+
machineIndex?: number;
|
|
18
|
+
}
|
|
19
|
+
declare class PullSourceReconciliationError extends Error {
|
|
20
|
+
readonly code = "source_reconciliation_failed";
|
|
21
|
+
constructor(message: string);
|
|
22
|
+
}
|
|
15
23
|
type ResolvedSyncInputKind = 'local-file' | 'studio-machine-id' | 'studio-url';
|
|
16
24
|
type SyncInputFormat = 'digraph' | 'graph' | 'xstate';
|
|
17
25
|
interface ResolvedSyncInput {
|
|
@@ -72,7 +80,7 @@ interface PushLocalMachineLinksResult {
|
|
|
72
80
|
}
|
|
73
81
|
declare function pushLocalMachineLinks(options: PushSyncOptions): Promise<PushLocalMachineLinksResult>;
|
|
74
82
|
declare function planSync(options: PlanSyncOptions): Promise<SyncPlan>;
|
|
75
|
-
declare function pullSync(options:
|
|
83
|
+
declare function pullSync(options: PullSyncOptions): Promise<PullSyncResult>;
|
|
76
84
|
declare function pushSync(options: PushSyncOptions): Promise<PushSyncResult>;
|
|
77
85
|
//#endregion
|
|
78
|
-
export { PlanSyncOptions, PullSyncResult, PushLocalMachineLinksResult, PushSyncOptions, PushSyncProjectOptions, PushSyncResult, ResolvedSyncInput, SyncInputFormat, SyncPlan, SyncPlanSummary, planSync, pullSync, pushLocalMachineLinks, pushSync };
|
|
86
|
+
export { PlanSyncOptions, PullSourceReconciliationError, PullSyncOptions, PullSyncResult, PushLocalMachineLinksResult, PushSyncOptions, PushSyncProjectOptions, PushSyncResult, ResolvedSyncInput, SyncInputFormat, SyncPlan, SyncPlanSummary, planSync, pullSync, pushLocalMachineLinks, pushSync };
|