@proteos/sdk 0.83.0 → 0.85.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(),
@@ -3226,9 +3249,11 @@ var DISCOVERY_BASE_PATH = "/discovery/v1";
3226
3249
  var encode = encodeURIComponent;
3227
3250
  var DiscoveryClient = class {
3228
3251
  evidence;
3252
+ narrations;
3229
3253
  platform;
3230
3254
  constructor(client) {
3231
3255
  this.evidence = new DiscoveryEvidenceServiceImpl(client);
3256
+ this.narrations = new DiscoveryEvidenceNarrationServiceImpl(client);
3232
3257
  this.platform = new PlatformDiscoveryEvidenceServiceImpl(client);
3233
3258
  }
3234
3259
  };
@@ -3259,6 +3284,21 @@ var DiscoveryEvidenceServiceImpl = class {
3259
3284
  );
3260
3285
  }
3261
3286
  };
3287
+ var DiscoveryEvidenceNarrationServiceImpl = class {
3288
+ constructor(client) {
3289
+ this.client = client;
3290
+ }
3291
+ client;
3292
+ create(request) {
3293
+ return this.client.request("POST", `${DISCOVERY_BASE_PATH}/evidence-narrations`, request);
3294
+ }
3295
+ get(id) {
3296
+ return this.client.request("GET", `${DISCOVERY_BASE_PATH}/evidence-narrations/${encode(id)}`);
3297
+ }
3298
+ async delete(id) {
3299
+ await this.client.request("DELETE", `${DISCOVERY_BASE_PATH}/evidence-narrations/${encode(id)}`);
3300
+ }
3301
+ };
3262
3302
  var PlatformDiscoveryEvidenceServiceImpl = class {
3263
3303
  constructor(client) {
3264
3304
  this.client = client;