@proteos/sdk 0.82.1 → 0.84.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.cjs CHANGED
@@ -183,7 +183,8 @@ var SessionServiceImpl = class {
183
183
  return new chunkZ773P4RO_cjs.PageIterator((opts) => this.listPage(opts), options);
184
184
  }
185
185
  async listPage(options = {}) {
186
- return this.client.requestWithQuery("GET", SESSIONS_BASE_PATH, options);
186
+ const query = Array.isArray(options.status) ? { ...options, status: options.status.join(",") } : options;
187
+ return this.client.requestWithQuery("GET", SESSIONS_BASE_PATH, query);
187
188
  }
188
189
  async get(id) {
189
190
  return this.client.request("GET", `${SESSIONS_BASE_PATH}/${id}`);
@@ -244,6 +245,9 @@ var SessionServiceImpl = class {
244
245
  async interrupt(id) {
245
246
  return this.appendEvent(id, { type: "user.interrupt" });
246
247
  }
248
+ async end(id) {
249
+ return this.client.request("POST", `${SESSIONS_BASE_PATH}/${id}/end`);
250
+ }
247
251
  async submitToolResult(id, input) {
248
252
  return this.appendEvent(id, {
249
253
  type: "user.tool_result",
@@ -3038,6 +3042,19 @@ var RecordDraftServiceImpl = class {
3038
3042
  async create(request) {
3039
3043
  return this.client.request("POST", RECORD_DRAFTS_BASE_PATH, request);
3040
3044
  }
3045
+ async update(id, request) {
3046
+ return this.client.request(
3047
+ "PUT",
3048
+ `${RECORD_DRAFTS_BASE_PATH}/${encodeURIComponent(id)}`,
3049
+ request
3050
+ );
3051
+ }
3052
+ async listVersions(id) {
3053
+ return this.client.request(
3054
+ "GET",
3055
+ `${RECORD_DRAFTS_BASE_PATH}/${encodeURIComponent(id)}/versions`
3056
+ );
3057
+ }
3041
3058
  async approve(id, request = {}) {
3042
3059
  return this.client.request(
3043
3060
  "POST",
@@ -3184,7 +3201,13 @@ var RecordDraftItemResultSchema = zod.z.object({
3184
3201
  });
3185
3202
  var RecordDraftChangeSchema = zod.z.object({
3186
3203
  transaction_id: zod.z.string(),
3187
- kind: zod.z.enum(["item_dropped", "attribute_changed", "attribute_removed", "attribute_added"]),
3204
+ kind: zod.z.enum([
3205
+ "item_dropped",
3206
+ "attribute_changed",
3207
+ "attribute_removed",
3208
+ "attribute_added",
3209
+ "item_added"
3210
+ ]),
3188
3211
  attribute: zod.z.string().optional(),
3189
3212
  has_current: zod.z.boolean(),
3190
3213
  current: zod.z.unknown(),