@statelyai/sdk 0.39.0 → 0.39.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/embed.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./protocol-M3Zeun3o.mjs";
2
- import { c as createPendingExportManager, l as settingsWithViewMode, r as createPostMessageTransport, s as createEventRegistry, t as SDK_VERSION, u as toInitMessage } from "./version-hQHX5bet.mjs";
2
+ import { c as createPendingExportManager, l as settingsWithViewMode, r as createPostMessageTransport, s as createEventRegistry, t as SDK_VERSION, u as toInitMessage } from "./version-gEUUpYtd.mjs";
3
3
  import { EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol.mjs";
4
4
 
5
5
  //#region src/embed.ts
package/dist/index.d.mts CHANGED
@@ -7,7 +7,7 @@ import { StatelyAuthMode, StatelyCredential, createAuthorizationHeader, getCrede
7
7
  import { EDITOR_PROTOCOL_VERSION, EditorHostDiagnostic, EditorHostExportFormat, EditorHostInboundMessage, EditorHostInitOptions, EditorHostOutboundMessage, EditorHostValidationIssue } from "./editorHostProtocol.mjs";
8
8
  import { AssetConfig, EmbedEntity, EmbedFormatContext, EmbedFormatDefinition, EmbedGraph, EmbedProfileDefinition, PlanSourceUpdateInput, SourceUpdateEdit, SourceUpdatePlan, StatelyEmbed, StatelyEmbedOptions, createStatelyEmbed } from "./embed.mjs";
9
9
  import { _ as createWebSocketTransport, a as InspectedTransition, c as InspectorDiscoveryEntry, d as ManualActorOptions, f as createInspector, g as createPostMessageTransport, h as TransportFailure, i as InspectedSnapshot, l as InspectorEvents, m as Transport, n as CreateInspectorOptions, o as Inspector, p as createStatelyInspector, r as InspectedEvent, s as InspectorConnection, t as AdoptedActor, u as InspectorInspectionEvent } from "./inspect-JNvMtuzC.mjs";
10
- 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, 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-DSwp5rXP.mjs";
10
+ 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, 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-ClBs4caM.mjs";
11
11
  import { OAuthAuthorizationServerMetadata, OAuthClientRegistrationResponse, OAuthProtectedResourceMetadata, OAuthTokenResponse, PkcePair, buildAuthorizeUrl, createPkcePair, discoverAuthorizationServer, discoverProtectedResource, exchangeCodeForToken, refreshToken, registerOAuthClient } from "./oauth.mjs";
12
12
  import { CreateInspectionRelayOptions, InspectionRelay, InspectionRelayEffect, InspectionRelayPeer, InspectionRelayRole, InspectionRelaySnapshot, createInspectionRelay } from "./relay.mjs";
13
13
  import { PreviewEvent, PreviewState, connectPreviewHost, createPreview } from "./preview.mjs";
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
- import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-uGK1kS0n.mjs";
1
+ import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-DL0yj2Pi.mjs";
2
2
  import { c as createInspectionRoomUrls, d as isEmbedExampleMachine, i as INSPECTION_ROOM_QUERY_PARAM, l as getInspectionRoomId, m as resolveInspectorSettings, n as EMBED_DOCUMENT_LIMITS, o as assertEmbedExamples, p as mergeInspectorSettings, r as INSPECTION_PROTOCOL_VERSION, s as createInspectionActorId, t as EMBED_DOCUMENT_LANGUAGES, u as isEmbedExample } from "./protocol-M3Zeun3o.mjs";
3
- import { i as createWebSocketTransport, r as createPostMessageTransport } from "./version-hQHX5bet.mjs";
3
+ import { i as createWebSocketTransport, r as createPostMessageTransport } from "./version-gEUUpYtd.mjs";
4
4
  import { EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol.mjs";
5
5
  import { createStatelyEmbed } from "./embed.mjs";
6
6
  import { createS3AssetUploadAdapter, createSupabaseAssetUploadAdapter } from "./assetStorage.mjs";
7
7
  import { connectPreviewHost, createPreview } from "./preview.mjs";
8
- import { n as createStatelyInspector, t as createInspector } from "./inspect-Bs7a6Sbq.mjs";
8
+ import { n as createStatelyInspector, t as createInspector } from "./inspect-DXtP_tPO.mjs";
9
9
  import { createAuthorizationHeader, getCredentialToken } from "./auth.mjs";
10
10
  import { buildAuthorizeUrl, createPkcePair, discoverAuthorizationServer, discoverProtectedResource, exchangeCodeForToken, refreshToken, registerOAuthClient } from "./oauth.mjs";
11
11
  import { StatelyApiError, createStatelyApiClient, createStatelyApiUrl } from "./api.mjs";
@@ -1,5 +1,5 @@
1
1
  import { c as createInspectionRoomUrls, l as getInspectionRoomId, m as resolveInspectorSettings, p as mergeInspectorSettings, r as INSPECTION_PROTOCOL_VERSION } from "./protocol-M3Zeun3o.mjs";
2
- import { a as assertEmbedDocuments, c as createPendingExportManager, i as createWebSocketTransport, n as inspectionRuntime, o as assertEmbedPanels, s as createEventRegistry, t as SDK_VERSION } from "./version-hQHX5bet.mjs";
2
+ import { a as assertEmbedDocuments, c as createPendingExportManager, i as createWebSocketTransport, n as inspectionRuntime, o as assertEmbedPanels, s as createEventRegistry, t as SDK_VERSION } from "./version-gEUUpYtd.mjs";
3
3
  import { isPreviewEvent } from "./preview.mjs";
4
4
 
5
5
  //#region src/openBrowser.ts
package/dist/inspect.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./protocol-M3Zeun3o.mjs";
2
- import "./version-hQHX5bet.mjs";
2
+ import "./version-gEUUpYtd.mjs";
3
3
  import "./preview.mjs";
4
- import { n as createStatelyInspector, t as createInspector } from "./inspect-Bs7a6Sbq.mjs";
4
+ import { n as createStatelyInspector, t as createInspector } from "./inspect-DXtP_tPO.mjs";
5
5
 
6
6
  export { createInspector, createStatelyInspector };
package/dist/relay.mjs CHANGED
@@ -22,7 +22,8 @@ const FORWARD_ONLY_MESSAGE_TYPES = new Set([
22
22
  "@statelyai.capabilityDenied",
23
23
  "@statelyai.system.sendEvent",
24
24
  "@statelyai.register",
25
- "@statelyai.registered"
25
+ "@statelyai.registered",
26
+ "@statelyai.login"
26
27
  ]);
27
28
  function isSupportedMessageType(type) {
28
29
  return REPLAYABLE_MESSAGE_TYPES.has(type) || FORWARD_ONLY_MESSAGE_TYPES.has(type);
@@ -154,7 +154,7 @@ declare const machineSchema: ZodObject<{
154
154
  definition: ZodUnknown;
155
155
  graph: ZodOptional<ZodObject<{
156
156
  xgraphSchemaVersion: ZodOptional<ZodLiteral<"1.0.0">>;
157
- id: ZodString;
157
+ id: ZodOptional<ZodString>;
158
158
  type: ZodOptional<ZodString>;
159
159
  parentId: ZodOptional<ZodNullable<ZodString>>;
160
160
  initialNodeId: ZodOptional<ZodNullable<ZodString>>;
@@ -183,7 +183,7 @@ declare const machineSchema: ZodObject<{
183
183
  sourceId: ZodString;
184
184
  targetId: ZodString;
185
185
  label: ZodOptional<ZodNullable<ZodString>>;
186
- data: ZodUnknown;
186
+ data: ZodOptional<ZodUnknown>;
187
187
  x: ZodOptional<ZodNumber>;
188
188
  y: ZodOptional<ZodNumber>;
189
189
  width: ZodOptional<ZodNumber>;
@@ -14020,7 +14020,7 @@ const xgraphEdgeSchema = object({
14020
14020
  sourceId: string$1(),
14021
14021
  targetId: string$1(),
14022
14022
  label: string$1().nullable().optional(),
14023
- data: unknown(),
14023
+ data: unknown().optional(),
14024
14024
  x: number$1().optional(),
14025
14025
  y: number$1().optional(),
14026
14026
  width: number$1().optional(),
@@ -14032,7 +14032,7 @@ const xgraphEdgeSchema = object({
14032
14032
  /** XGraph wire shape accepted and emitted at API boundaries. */
14033
14033
  const xgraphSchema = object({
14034
14034
  xgraphSchemaVersion: literal("1.0.0").optional(),
14035
- id: string$1(),
14035
+ id: string$1().optional(),
14036
14036
  type: string$1().optional(),
14037
14037
  parentId: string$1().nullable().optional(),
14038
14038
  initialNodeId: string$1().nullable().optional(),
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-DSwp5rXP.mjs";
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-ClBs4caM.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
- import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-uGK1kS0n.mjs";
1
+ import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-DL0yj2Pi.mjs";
2
2
  import "./auth.mjs";
3
3
 
4
4
  export { DEFAULT_STATELY_BASE_URL, StudioApiError, createStatelyClient };
@@ -383,7 +383,7 @@ function createWebSocketTransport(options) {
383
383
 
384
384
  //#endregion
385
385
  //#region src/version.ts
386
- const SDK_VERSION = "0.39.0";
386
+ const SDK_VERSION = "0.39.1";
387
387
  function inspectionRuntime() {
388
388
  if (typeof window !== "undefined") return "browser";
389
389
  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.39.0",
3
+ "version": "0.39.1",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "stately-sdk": "./dist/bin.mjs"
@@ -96,8 +96,8 @@
96
96
  "ws": "^8.19.0",
97
97
  "xstate": "^5.0.0",
98
98
  "xstate-v6": "npm:xstate@6.0.0-alpha.65",
99
- "@statelyai/api-contract": "0.6.5",
100
- "@statelyai/graph-tools": "0.10.0"
99
+ "@statelyai/api-contract": "0.7.1",
100
+ "@statelyai/graph-tools": "0.10.2"
101
101
  },
102
102
  "peerDependencies": {
103
103
  "ws": "^8.19.0"