@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.js CHANGED
@@ -103,16 +103,20 @@ var ConflictError = class extends Error {
103
103
  // src/core/types.ts
104
104
  var import_zod = require("zod");
105
105
  var SessionState = /* @__PURE__ */ ((SessionState2) => {
106
- SessionState2[SessionState2["SESSION_STATE_UNKNOWN"] = 0] = "SESSION_STATE_UNKNOWN";
107
- SessionState2[SessionState2["SESSION_STATE_WAITING"] = 1] = "SESSION_STATE_WAITING";
108
- SessionState2[SessionState2["SESSION_STATE_ACTIVE"] = 2] = "SESSION_STATE_ACTIVE";
109
- SessionState2[SessionState2["SESSION_STATE_DISCONNECTED"] = 3] = "SESSION_STATE_DISCONNECTED";
110
- SessionState2[SessionState2["SESSION_STATE_CLOSED"] = 4] = "SESSION_STATE_CLOSED";
111
- SessionState2[SessionState2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
106
+ SessionState2[SessionState2["CREATED"] = 0] = "CREATED";
107
+ SessionState2[SessionState2["PENDING"] = 1] = "PENDING";
108
+ SessionState2[SessionState2["SUSPENDED"] = 2] = "SUSPENDED";
109
+ SessionState2[SessionState2["WAITING"] = 3] = "WAITING";
110
+ SessionState2[SessionState2["ACTIVE"] = 4] = "ACTIVE";
111
+ SessionState2[SessionState2["INACTIVE"] = 5] = "INACTIVE";
112
+ SessionState2[SessionState2["CLOSED"] = 6] = "CLOSED";
112
113
  return SessionState2;
113
114
  })(SessionState || {});
115
+ var ModelSchema = import_zod.z.object({
116
+ name: import_zod.z.string()
117
+ });
114
118
  var CreateSessionRequestSchema = import_zod.z.object({
115
- model: import_zod.z.string(),
119
+ model: ModelSchema,
116
120
  sdp_offer: import_zod.z.string(),
117
121
  extra_args: import_zod.z.record(import_zod.z.string(), import_zod.z.any())
118
122
  // Dictionary
@@ -299,7 +303,7 @@ var CoordinatorClient = class {
299
303
  return __async(this, null, function* () {
300
304
  console.debug("[CoordinatorClient] Creating session...");
301
305
  const requestBody = {
302
- model: this.model,
306
+ model: { name: this.model },
303
307
  sdp_offer,
304
308
  extra_args: {}
305
309
  };