@le-space/shared-types 0.1.51 → 0.2.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.
Files changed (2) hide show
  1. package/index.d.ts +21 -9
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -170,20 +170,32 @@ interface InstanceRuntimeDetails {
170
170
  interface DeploymentResult {
171
171
  itemHash: string;
172
172
  httpStatus?: number;
173
- status: 'processed' | 'pending' | 'rejected' | 'unknown';
173
+ status: "processed" | "pending" | "rejected" | "unknown";
174
174
  message?: AlephBroadcastMessage;
175
175
  response?: AlephBroadcastResponse;
176
176
  rejectionReason?: string | null;
177
177
  }
178
- type AlephSenderChain = 'ETH';
179
- type AlephMessageType = 'INSTANCE' | 'FORGET' | 'AGGREGATE' | 'STORE';
178
+ type DeploymentProgressStage = "idle" | "validating" | "loading-manifest" | "verifying-rootfs" | "loading-pricing" | "loading-balance" | "selecting-crn" | "building-message" | "signing-message" | "broadcasting" | "notifying-crn" | "waiting-for-aleph" | "deployment-confirmed" | "deployment-rejected" | "building-delete-message" | "signing-delete-message" | "broadcasting-delete" | "delete-completed" | "refreshing-instances" | "completed" | "error";
179
+ interface DeploymentProgressEvent {
180
+ stage: DeploymentProgressStage;
181
+ label: string;
182
+ progress: number;
183
+ status: "info" | "success" | "warning" | "error";
184
+ itemHash?: string | null;
185
+ detail?: string | null;
186
+ error?: string | null;
187
+ timestamp: number;
188
+ }
189
+ type DeploymentProgressListener = (event: DeploymentProgressEvent) => void;
190
+ type AlephSenderChain = "ETH";
191
+ type AlephMessageType = "INSTANCE" | "FORGET" | "AGGREGATE" | "STORE";
180
192
  interface AlephBroadcastMessage {
181
193
  sender: string;
182
194
  chain: AlephSenderChain;
183
195
  signature: string;
184
196
  type: AlephMessageType;
185
197
  item_hash: string;
186
- item_type: 'inline';
198
+ item_type: "inline";
187
199
  item_content: string;
188
200
  time: number;
189
201
  channel: string;
@@ -193,7 +205,7 @@ interface AlephBroadcastResponse {
193
205
  status: string;
194
206
  failed?: unknown[];
195
207
  };
196
- message_status?: 'processed' | 'pending' | 'rejected' | 'unknown';
208
+ message_status?: "processed" | "pending" | "rejected" | "unknown";
197
209
  details?: unknown;
198
210
  [key: string]: unknown;
199
211
  }
@@ -217,7 +229,7 @@ interface AlephInstanceContent {
217
229
  aleph_api: boolean;
218
230
  reproducible?: boolean;
219
231
  shared_cache?: boolean;
220
- hypervisor: 'qemu';
232
+ hypervisor: "qemu";
221
233
  trusted_execution?: Record<string, unknown>;
222
234
  };
223
235
  resources: {
@@ -241,7 +253,7 @@ interface AlephInstanceContent {
241
253
  ref: string;
242
254
  use_latest?: boolean;
243
255
  };
244
- persistence: 'host' | 'store';
256
+ persistence: "host" | "store";
245
257
  size_mib: number;
246
258
  };
247
259
  }
@@ -265,7 +277,7 @@ interface DeploymentIntentEnvelope {
265
277
  intentHash: string;
266
278
  }
267
279
  interface MessageInspectionResult {
268
- status: 'processed' | 'pending' | 'rejected' | 'unknown';
280
+ status: "processed" | "pending" | "rejected" | "unknown";
269
281
  errorCode: number | null;
270
282
  details: Record<string, unknown> | null;
271
283
  rejectionReason: string | null;
@@ -276,4 +288,4 @@ interface DeploymentInspectionResult extends MessageInspectionResult {
276
288
  type MessageSigner = (sender: string, payload: string) => Promise<string>;
277
289
  type MessageHasher = (payload: string) => Promise<string> | string;
278
290
 
279
- export type { AlephAggregateContent, AlephBroadcastMessage, AlephBroadcastResponse, AlephInstanceContent, AlephMessageType, AlephSenderChain, CrnRecord, CrnSystemUsage, DeploymentInspectionResult, DeploymentIntent, DeploymentIntentEnvelope, DeploymentResult, GatewayProbeStatus, InstanceAllocation, InstanceAllocationNode, InstanceAllocationPeriod, InstanceExecution, InstanceExecutionNetworking, InstanceExecutionStatus, InstanceRuntimeDetails, InstanceWebAccess, MessageHasher, MessageInspectionResult, MessageReference, MessageSigner, MessageStatus, PortForwardAggregate, PortForwardAggregateEntry, PortForwardFlags, PortMapping, ReferenceStatus, RootfsInstallStrategy, RootfsManifest, RootfsManifestState, RootfsRequiredPortForward, RootfsResolution, RuntimeDiagnostics, RuntimeMetadata };
291
+ export type { AlephAggregateContent, AlephBroadcastMessage, AlephBroadcastResponse, AlephInstanceContent, AlephMessageType, AlephSenderChain, CrnRecord, CrnSystemUsage, DeploymentInspectionResult, DeploymentIntent, DeploymentIntentEnvelope, DeploymentProgressEvent, DeploymentProgressListener, DeploymentProgressStage, DeploymentResult, GatewayProbeStatus, InstanceAllocation, InstanceAllocationNode, InstanceAllocationPeriod, InstanceExecution, InstanceExecutionNetworking, InstanceExecutionStatus, InstanceRuntimeDetails, InstanceWebAccess, MessageHasher, MessageInspectionResult, MessageReference, MessageSigner, MessageStatus, PortForwardAggregate, PortForwardAggregateEntry, PortForwardFlags, PortMapping, ReferenceStatus, RootfsInstallStrategy, RootfsManifest, RootfsManifestState, RootfsRequiredPortForward, RootfsResolution, RuntimeDiagnostics, RuntimeMetadata };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@le-space/shared-types",
3
- "version": "0.1.51",
3
+ "version": "0.2.0",
4
4
  "description": "Shared type contracts for the shared Aleph tooling monorepo.",
5
5
  "license": "MIT",
6
6
  "type": "module",