@reactor-team/js-sdk 2.1.0 → 2.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.
package/dist/index.mjs CHANGED
@@ -60,16 +60,20 @@ var ConflictError = class extends Error {
60
60
  // src/core/types.ts
61
61
  import { z } from "zod";
62
62
  var SessionState = /* @__PURE__ */ ((SessionState2) => {
63
- SessionState2[SessionState2["SESSION_STATE_UNKNOWN"] = 0] = "SESSION_STATE_UNKNOWN";
64
- SessionState2[SessionState2["SESSION_STATE_WAITING"] = 1] = "SESSION_STATE_WAITING";
65
- SessionState2[SessionState2["SESSION_STATE_ACTIVE"] = 2] = "SESSION_STATE_ACTIVE";
66
- SessionState2[SessionState2["SESSION_STATE_DISCONNECTED"] = 3] = "SESSION_STATE_DISCONNECTED";
67
- SessionState2[SessionState2["SESSION_STATE_CLOSED"] = 4] = "SESSION_STATE_CLOSED";
68
- SessionState2[SessionState2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
63
+ SessionState2[SessionState2["CREATED"] = 0] = "CREATED";
64
+ SessionState2[SessionState2["PENDING"] = 1] = "PENDING";
65
+ SessionState2[SessionState2["SUSPENDED"] = 2] = "SUSPENDED";
66
+ SessionState2[SessionState2["WAITING"] = 3] = "WAITING";
67
+ SessionState2[SessionState2["ACTIVE"] = 4] = "ACTIVE";
68
+ SessionState2[SessionState2["INACTIVE"] = 5] = "INACTIVE";
69
+ SessionState2[SessionState2["CLOSED"] = 6] = "CLOSED";
69
70
  return SessionState2;
70
71
  })(SessionState || {});
72
+ var ModelSchema = z.object({
73
+ name: z.string()
74
+ });
71
75
  var CreateSessionRequestSchema = z.object({
72
- model: z.string(),
76
+ model: ModelSchema,
73
77
  sdp_offer: z.string(),
74
78
  extra_args: z.record(z.string(), z.any())
75
79
  // Dictionary
@@ -256,7 +260,7 @@ var CoordinatorClient = class {
256
260
  return __async(this, null, function* () {
257
261
  console.debug("[CoordinatorClient] Creating session...");
258
262
  const requestBody = {
259
- model: this.model,
263
+ model: { name: this.model },
260
264
  sdp_offer,
261
265
  extra_args: {}
262
266
  };