@soat/sdk 0.6.5 → 0.6.6

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.
@@ -1,50 +1,33 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- var __defProp = Object.defineProperty;
3
- var __name = (target, value) => __defProp(target, "name", {
4
- value,
5
- configurable: true
6
- });
7
-
8
- // src/generated/core/bodySerializer.gen.ts
9
- var serializeFormDataPair = /* @__PURE__ */__name((data, key, value) => {
10
- if (typeof value === "string" || value instanceof Blob) {
11
- data.append(key, value);
12
- } else if (value instanceof Date) {
13
- data.append(key, value.toISOString());
14
- } else {
15
- data.append(key, JSON.stringify(value));
16
- }
17
- }, "serializeFormDataPair");
2
+ //#region src/generated/core/bodySerializer.gen.ts
3
+ var serializeFormDataPair = (data, key, value) => {
4
+ if (typeof value === "string" || value instanceof Blob) data.append(key, value);else if (value instanceof Date) data.append(key, value.toISOString());else data.append(key, JSON.stringify(value));
5
+ };
18
6
  var formDataBodySerializer = {
19
- bodySerializer: /* @__PURE__ */__name(body => {
7
+ bodySerializer: body => {
20
8
  const data = new FormData();
21
9
  Object.entries(body).forEach(([key, value]) => {
22
- if (value === void 0 || value === null) {
23
- return;
24
- }
25
- if (Array.isArray(value)) {
26
- value.forEach(v => serializeFormDataPair(data, key, v));
27
- } else {
28
- serializeFormDataPair(data, key, value);
29
- }
10
+ if (value === void 0 || value === null) return;
11
+ if (Array.isArray(value)) value.forEach(v => serializeFormDataPair(data, key, v));else serializeFormDataPair(data, key, value);
30
12
  });
31
13
  return data;
32
- }, "bodySerializer")
14
+ }
33
15
  };
34
16
  var jsonBodySerializer = {
35
- bodySerializer: /* @__PURE__ */__name(body => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value), "bodySerializer")
17
+ bodySerializer: body => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
36
18
  };
37
19
 
38
- // src/generated/core/params.gen.ts
39
- var extraPrefixesMap = {
20
+ //#endregion
21
+ //#region src/generated/core/params.gen.ts
22
+ var extraPrefixes = Object.entries({
40
23
  $body_: "body",
41
24
  $headers_: "headers",
42
25
  $path_: "path",
43
26
  $query_: "query"
44
- };
45
- var extraPrefixes = Object.entries(extraPrefixesMap);
27
+ });
46
28
 
47
- // src/generated/core/serverSentEvents.gen.ts
29
+ //#endregion
30
+ //#region src/generated/core/serverSentEvents.gen.ts
48
31
  function createSseClient({
49
32
  onRequest,
50
33
  onSseError,
@@ -60,7 +43,7 @@ function createSseClient({
60
43
  }) {
61
44
  let lastEventId;
62
45
  const sleep = sseSleepFn ?? (ms => new Promise(resolve => setTimeout(resolve, ms)));
63
- const createStream = /* @__PURE__ */__name(async function* () {
46
+ const createStream = async function* () {
64
47
  let retryDelay = sseDefaultRetryDelay ?? 3e3;
65
48
  let attempt = 0;
66
49
  const signal = options.signal ?? new AbortController().signal;
@@ -68,9 +51,7 @@ function createSseClient({
68
51
  if (signal.aborted) break;
69
52
  attempt++;
70
53
  const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
71
- if (lastEventId !== void 0) {
72
- headers.set("Last-Event-ID", lastEventId);
73
- }
54
+ if (lastEventId !== void 0) headers.set("Last-Event-ID", lastEventId);
74
55
  try {
75
56
  const requestInit = {
76
57
  redirect: "follow",
@@ -80,20 +61,17 @@ function createSseClient({
80
61
  signal
81
62
  };
82
63
  let request = new Request(url, requestInit);
83
- if (onRequest) {
84
- request = await onRequest(url, requestInit);
85
- }
86
- const _fetch = options.fetch ?? globalThis.fetch;
87
- const response = await _fetch(request);
64
+ if (onRequest) request = await onRequest(url, requestInit);
65
+ const response = await (options.fetch ?? globalThis.fetch)(request);
88
66
  if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
89
67
  if (!response.body) throw new Error("No body in SSE response");
90
68
  const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
91
69
  let buffer = "";
92
- const abortHandler = /* @__PURE__ */__name(() => {
70
+ const abortHandler = () => {
93
71
  try {
94
72
  reader.cancel();
95
73
  } catch {}
96
- }, "abortHandler");
74
+ };
97
75
  signal.addEventListener("abort", abortHandler);
98
76
  try {
99
77
  while (true) {
@@ -110,19 +88,9 @@ function createSseClient({
110
88
  const lines = chunk.split("\n");
111
89
  const dataLines = [];
112
90
  let eventName;
113
- for (const line of lines) {
114
- if (line.startsWith("data:")) {
115
- dataLines.push(line.replace(/^data:\s*/, ""));
116
- } else if (line.startsWith("event:")) {
117
- eventName = line.replace(/^event:\s*/, "");
118
- } else if (line.startsWith("id:")) {
119
- lastEventId = line.replace(/^id:\s*/, "");
120
- } else if (line.startsWith("retry:")) {
121
- const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
122
- if (!Number.isNaN(parsed)) {
123
- retryDelay = parsed;
124
- }
125
- }
91
+ for (const line of lines) if (line.startsWith("data:")) dataLines.push(line.replace(/^data:\s*/, ""));else if (line.startsWith("event:")) eventName = line.replace(/^event:\s*/, "");else if (line.startsWith("id:")) lastEventId = line.replace(/^id:\s*/, "");else if (line.startsWith("retry:")) {
92
+ const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
93
+ if (!Number.isNaN(parsed)) retryDelay = parsed;
126
94
  }
127
95
  let data;
128
96
  let parsedJson = false;
@@ -136,12 +104,8 @@ function createSseClient({
136
104
  }
137
105
  }
138
106
  if (parsedJson) {
139
- if (responseValidator) {
140
- await responseValidator(data);
141
- }
142
- if (responseTransformer) {
143
- data = await responseTransformer(data);
144
- }
107
+ if (responseValidator) await responseValidator(data);
108
+ if (responseTransformer) data = await responseTransformer(data);
145
109
  }
146
110
  onSseEvent?.({
147
111
  data,
@@ -149,9 +113,7 @@ function createSseClient({
149
113
  id: lastEventId,
150
114
  retry: retryDelay
151
115
  });
152
- if (dataLines.length) {
153
- yield data;
154
- }
116
+ if (dataLines.length) yield data;
155
117
  }
156
118
  }
157
119
  } finally {
@@ -161,23 +123,19 @@ function createSseClient({
161
123
  break;
162
124
  } catch (error) {
163
125
  onSseError?.(error);
164
- if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
165
- break;
166
- }
167
- const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
168
- await sleep(backoff);
126
+ if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) break;
127
+ await sleep(Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4));
169
128
  }
170
129
  }
171
- }, "createStream");
172
- const stream = createStream();
130
+ };
173
131
  return {
174
- stream
132
+ stream: createStream()
175
133
  };
176
134
  }
177
- __name(createSseClient, "createSseClient");
178
135
 
179
- // src/generated/core/pathSerializer.gen.ts
180
- var separatorArrayExplode = /* @__PURE__ */__name(style => {
136
+ //#endregion
137
+ //#region src/generated/core/pathSerializer.gen.ts
138
+ var separatorArrayExplode = style => {
181
139
  switch (style) {
182
140
  case "label":
183
141
  return ".";
@@ -188,8 +146,8 @@ var separatorArrayExplode = /* @__PURE__ */__name(style => {
188
146
  default:
189
147
  return "&";
190
148
  }
191
- }, "separatorArrayExplode");
192
- var separatorArrayNoExplode = /* @__PURE__ */__name(style => {
149
+ };
150
+ var separatorArrayNoExplode = style => {
193
151
  switch (style) {
194
152
  case "form":
195
153
  return ",";
@@ -200,8 +158,8 @@ var separatorArrayNoExplode = /* @__PURE__ */__name(style => {
200
158
  default:
201
159
  return ",";
202
160
  }
203
- }, "separatorArrayNoExplode");
204
- var separatorObjectExplode = /* @__PURE__ */__name(style => {
161
+ };
162
+ var separatorObjectExplode = style => {
205
163
  switch (style) {
206
164
  case "label":
207
165
  return ".";
@@ -212,8 +170,8 @@ var separatorObjectExplode = /* @__PURE__ */__name(style => {
212
170
  default:
213
171
  return "&";
214
172
  }
215
- }, "separatorObjectExplode");
216
- var serializeArrayParam = /* @__PURE__ */__name(({
173
+ };
174
+ var serializeArrayParam = ({
217
175
  allowReserved,
218
176
  explode,
219
177
  name,
@@ -221,23 +179,21 @@ var serializeArrayParam = /* @__PURE__ */__name(({
221
179
  value
222
180
  }) => {
223
181
  if (!explode) {
224
- const joinedValues2 = (allowReserved ? value : value.map(v => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
182
+ const joinedValues = (allowReserved ? value : value.map(v => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
225
183
  switch (style) {
226
184
  case "label":
227
- return `.${joinedValues2}`;
185
+ return `.${joinedValues}`;
228
186
  case "matrix":
229
- return `;${name}=${joinedValues2}`;
187
+ return `;${name}=${joinedValues}`;
230
188
  case "simple":
231
- return joinedValues2;
189
+ return joinedValues;
232
190
  default:
233
- return `${name}=${joinedValues2}`;
191
+ return `${name}=${joinedValues}`;
234
192
  }
235
193
  }
236
194
  const separator = separatorArrayExplode(style);
237
195
  const joinedValues = value.map(v => {
238
- if (style === "label" || style === "simple") {
239
- return allowReserved ? v : encodeURIComponent(v);
240
- }
196
+ if (style === "label" || style === "simple") return allowReserved ? v : encodeURIComponent(v);
241
197
  return serializePrimitiveParam({
242
198
  allowReserved,
243
199
  name,
@@ -245,21 +201,17 @@ var serializeArrayParam = /* @__PURE__ */__name(({
245
201
  });
246
202
  }).join(separator);
247
203
  return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
248
- }, "serializeArrayParam");
249
- var serializePrimitiveParam = /* @__PURE__ */__name(({
204
+ };
205
+ var serializePrimitiveParam = ({
250
206
  allowReserved,
251
207
  name,
252
208
  value
253
209
  }) => {
254
- if (value === void 0 || value === null) {
255
- return "";
256
- }
257
- if (typeof value === "object") {
258
- throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");
259
- }
210
+ if (value === void 0 || value === null) return "";
211
+ if (typeof value === "object") throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");
260
212
  return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
261
- }, "serializePrimitiveParam");
262
- var serializeObjectParam = /* @__PURE__ */__name(({
213
+ };
214
+ var serializeObjectParam = ({
263
215
  allowReserved,
264
216
  explode,
265
217
  name,
@@ -267,24 +219,22 @@ var serializeObjectParam = /* @__PURE__ */__name(({
267
219
  value,
268
220
  valueOnly
269
221
  }) => {
270
- if (value instanceof Date) {
271
- return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
272
- }
222
+ if (value instanceof Date) return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
273
223
  if (style !== "deepObject" && !explode) {
274
224
  let values = [];
275
225
  Object.entries(value).forEach(([key, v]) => {
276
226
  values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
277
227
  });
278
- const joinedValues2 = values.join(",");
228
+ const joinedValues = values.join(",");
279
229
  switch (style) {
280
230
  case "form":
281
- return `${name}=${joinedValues2}`;
231
+ return `${name}=${joinedValues}`;
282
232
  case "label":
283
- return `.${joinedValues2}`;
233
+ return `.${joinedValues}`;
284
234
  case "matrix":
285
- return `;${name}=${joinedValues2}`;
235
+ return `;${name}=${joinedValues}`;
286
236
  default:
287
- return joinedValues2;
237
+ return joinedValues;
288
238
  }
289
239
  }
290
240
  const separator = separatorObjectExplode(style);
@@ -294,69 +244,66 @@ var serializeObjectParam = /* @__PURE__ */__name(({
294
244
  value: v
295
245
  })).join(separator);
296
246
  return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
297
- }, "serializeObjectParam");
247
+ };
298
248
 
299
- // src/generated/core/utils.gen.ts
249
+ //#endregion
250
+ //#region src/generated/core/utils.gen.ts
300
251
  var PATH_PARAM_RE = /\{[^{}]+\}/g;
301
- var defaultPathSerializer = /* @__PURE__ */__name(({
252
+ var defaultPathSerializer = ({
302
253
  path,
303
254
  url: _url
304
255
  }) => {
305
256
  let url = _url;
306
257
  const matches = _url.match(PATH_PARAM_RE);
307
- if (matches) {
308
- for (const match of matches) {
309
- let explode = false;
310
- let name = match.substring(1, match.length - 1);
311
- let style = "simple";
312
- if (name.endsWith("*")) {
313
- explode = true;
314
- name = name.substring(0, name.length - 1);
315
- }
316
- if (name.startsWith(".")) {
317
- name = name.substring(1);
318
- style = "label";
319
- } else if (name.startsWith(";")) {
320
- name = name.substring(1);
321
- style = "matrix";
322
- }
323
- const value = path[name];
324
- if (value === void 0 || value === null) {
325
- continue;
326
- }
327
- if (Array.isArray(value)) {
328
- url = url.replace(match, serializeArrayParam({
329
- explode,
330
- name,
331
- style,
332
- value
333
- }));
334
- continue;
335
- }
336
- if (typeof value === "object") {
337
- url = url.replace(match, serializeObjectParam({
338
- explode,
339
- name,
340
- style,
341
- value,
342
- valueOnly: true
343
- }));
344
- continue;
345
- }
346
- if (style === "matrix") {
347
- url = url.replace(match, `;${serializePrimitiveParam({
348
- name,
349
- value
350
- })}`);
351
- continue;
352
- }
353
- const replaceValue = encodeURIComponent(style === "label" ? `.${value}` : value);
354
- url = url.replace(match, replaceValue);
258
+ if (matches) for (const match of matches) {
259
+ let explode = false;
260
+ let name = match.substring(1, match.length - 1);
261
+ let style = "simple";
262
+ if (name.endsWith("*")) {
263
+ explode = true;
264
+ name = name.substring(0, name.length - 1);
265
+ }
266
+ if (name.startsWith(".")) {
267
+ name = name.substring(1);
268
+ style = "label";
269
+ } else if (name.startsWith(";")) {
270
+ name = name.substring(1);
271
+ style = "matrix";
272
+ }
273
+ const value = path[name];
274
+ if (value === void 0 || value === null) continue;
275
+ if (Array.isArray(value)) {
276
+ url = url.replace(match, serializeArrayParam({
277
+ explode,
278
+ name,
279
+ style,
280
+ value
281
+ }));
282
+ continue;
283
+ }
284
+ if (typeof value === "object") {
285
+ url = url.replace(match, serializeObjectParam({
286
+ explode,
287
+ name,
288
+ style,
289
+ value,
290
+ valueOnly: true
291
+ }));
292
+ continue;
355
293
  }
294
+ if (style === "matrix") {
295
+ url = url.replace(match, `;${serializePrimitiveParam({
296
+ name,
297
+ value
298
+ })}`);
299
+ continue;
300
+ }
301
+ const replaceValue = encodeURIComponent(style === "label" ? `.${value}` : value);
302
+ url = url.replace(match, replaceValue);
356
303
  }
357
304
  return url;
358
- }, "defaultPathSerializer");
359
- var getUrl = /* @__PURE__ */__name(({
305
+ };
306
+ var getUrl = ({
360
307
  baseUrl,
361
308
  path,
362
309
  query,
@@ -365,230 +312,163 @@ var getUrl = /* @__PURE__ */__name(({
365
312
  }) => {
366
313
  const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
367
314
  let url = (baseUrl ?? "") + pathUrl;
368
- if (path) {
369
- url = defaultPathSerializer({
370
- path,
371
- url
372
- });
373
- }
315
+ if (path) url = defaultPathSerializer({
316
+ path,
317
+ url
318
+ });
374
319
  let search = query ? querySerializer(query) : "";
375
- if (search.startsWith("?")) {
376
- search = search.substring(1);
377
- }
378
- if (search) {
379
- url += `?${search}`;
380
- }
320
+ if (search.startsWith("?")) search = search.substring(1);
321
+ if (search) url += `?${search}`;
381
322
  return url;
382
- }, "getUrl");
323
+ };
383
324
  function getValidRequestBody(options) {
384
325
  const hasBody = options.body !== void 0;
385
- const isSerializedBody = hasBody && options.bodySerializer;
386
- if (isSerializedBody) {
387
- if ("serializedBody" in options) {
388
- const hasSerializedBody = options.serializedBody !== void 0 && options.serializedBody !== "";
389
- return hasSerializedBody ? options.serializedBody : null;
390
- }
326
+ if (hasBody && options.bodySerializer) {
327
+ if ("serializedBody" in options) return options.serializedBody !== void 0 && options.serializedBody !== "" ? options.serializedBody : null;
391
328
  return options.body !== "" ? options.body : null;
392
329
  }
393
- if (hasBody) {
394
- return options.body;
395
- }
396
- return void 0;
330
+ if (hasBody) return options.body;
397
331
  }
398
- __name(getValidRequestBody, "getValidRequestBody");
399
332
 
400
- // src/generated/core/auth.gen.ts
401
- var getAuthToken = /* @__PURE__ */__name(async (auth, callback) => {
333
+ //#endregion
334
+ //#region src/generated/core/auth.gen.ts
335
+ var getAuthToken = async (auth, callback) => {
402
336
  const token = typeof callback === "function" ? await callback(auth) : callback;
403
- if (!token) {
404
- return;
405
- }
406
- if (auth.scheme === "bearer") {
407
- return `Bearer ${token}`;
408
- }
409
- if (auth.scheme === "basic") {
410
- return `Basic ${btoa(token)}`;
411
- }
337
+ if (!token) return;
338
+ if (auth.scheme === "bearer") return `Bearer ${token}`;
339
+ if (auth.scheme === "basic") return `Basic ${btoa(token)}`;
412
340
  return token;
413
- }, "getAuthToken");
341
+ };
414
342
 
415
- // src/generated/client/utils.gen.ts
416
- var createQuerySerializer = /* @__PURE__ */__name(({
343
+ //#endregion
344
+ //#region src/generated/client/utils.gen.ts
345
+ var createQuerySerializer = ({
417
346
  parameters = {},
418
347
  ...args
419
348
  } = {}) => {
420
- const querySerializer = /* @__PURE__ */__name(queryParams => {
349
+ const querySerializer = queryParams => {
421
350
  const search = [];
422
- if (queryParams && typeof queryParams === "object") {
423
- for (const name in queryParams) {
424
- const value = queryParams[name];
425
- if (value === void 0 || value === null) {
426
- continue;
427
- }
428
- const options = parameters[name] || args;
429
- if (Array.isArray(value)) {
430
- const serializedArray = serializeArrayParam({
431
- allowReserved: options.allowReserved,
432
- explode: true,
433
- name,
434
- style: "form",
435
- value,
436
- ...options.array
437
- });
438
- if (serializedArray) search.push(serializedArray);
439
- } else if (typeof value === "object") {
440
- const serializedObject = serializeObjectParam({
441
- allowReserved: options.allowReserved,
442
- explode: true,
443
- name,
444
- style: "deepObject",
445
- value,
446
- ...options.object
447
- });
448
- if (serializedObject) search.push(serializedObject);
449
- } else {
450
- const serializedPrimitive = serializePrimitiveParam({
451
- allowReserved: options.allowReserved,
452
- name,
453
- value
454
- });
455
- if (serializedPrimitive) search.push(serializedPrimitive);
456
- }
351
+ if (queryParams && typeof queryParams === "object") for (const name in queryParams) {
352
+ const value = queryParams[name];
353
+ if (value === void 0 || value === null) continue;
354
+ const options = parameters[name] || args;
355
+ if (Array.isArray(value)) {
356
+ const serializedArray = serializeArrayParam({
357
+ allowReserved: options.allowReserved,
358
+ explode: true,
359
+ name,
360
+ style: "form",
361
+ value,
362
+ ...options.array
363
+ });
364
+ if (serializedArray) search.push(serializedArray);
365
+ } else if (typeof value === "object") {
366
+ const serializedObject = serializeObjectParam({
367
+ allowReserved: options.allowReserved,
368
+ explode: true,
369
+ name,
370
+ style: "deepObject",
371
+ value,
372
+ ...options.object
373
+ });
374
+ if (serializedObject) search.push(serializedObject);
375
+ } else {
376
+ const serializedPrimitive = serializePrimitiveParam({
377
+ allowReserved: options.allowReserved,
378
+ name,
379
+ value
380
+ });
381
+ if (serializedPrimitive) search.push(serializedPrimitive);
457
382
  }
458
383
  }
459
384
  return search.join("&");
460
- }, "querySerializer");
385
+ };
461
386
  return querySerializer;
462
- }, "createQuerySerializer");
463
- var getParseAs = /* @__PURE__ */__name(contentType => {
464
- if (!contentType) {
465
- return "stream";
466
- }
387
+ };
388
+ /**
389
+ * Infers parseAs value from provided Content-Type header.
390
+ */
391
+ var getParseAs = contentType => {
392
+ if (!contentType) return "stream";
467
393
  const cleanContent = contentType.split(";")[0]?.trim();
468
- if (!cleanContent) {
469
- return;
470
- }
471
- if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) {
472
- return "json";
473
- }
474
- if (cleanContent === "multipart/form-data") {
475
- return "formData";
476
- }
477
- if (["application/", "audio/", "image/", "video/"].some(type => cleanContent.startsWith(type))) {
478
- return "blob";
479
- }
480
- if (cleanContent.startsWith("text/")) {
481
- return "text";
482
- }
483
- return;
484
- }, "getParseAs");
485
- var checkForExistence = /* @__PURE__ */__name((options, name) => {
486
- if (!name) {
487
- return false;
488
- }
489
- if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
490
- return true;
491
- }
394
+ if (!cleanContent) return;
395
+ if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) return "json";
396
+ if (cleanContent === "multipart/form-data") return "formData";
397
+ if (["application/", "audio/", "image/", "video/"].some(type => cleanContent.startsWith(type))) return "blob";
398
+ if (cleanContent.startsWith("text/")) return "text";
399
+ };
400
+ var checkForExistence = (options, name) => {
401
+ if (!name) return false;
402
+ if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) return true;
492
403
  return false;
493
- }, "checkForExistence");
494
- var setAuthParams = /* @__PURE__ */__name(async ({
495
- security,
496
- ...options
497
- }) => {
498
- for (const auth of security) {
499
- if (checkForExistence(options, auth.name)) {
500
- continue;
501
- }
404
+ };
405
+ async function setAuthParams(options) {
406
+ for (const auth of options.security ?? []) {
407
+ if (checkForExistence(options, auth.name)) continue;
502
408
  const token = await getAuthToken(auth, options.auth);
503
- if (!token) {
504
- continue;
505
- }
409
+ if (!token) continue;
506
410
  const name = auth.name ?? "Authorization";
507
411
  switch (auth.in) {
508
412
  case "query":
509
- if (!options.query) {
510
- options.query = {};
511
- }
413
+ if (!options.query) options.query = {};
512
414
  options.query[name] = token;
513
415
  break;
514
416
  case "cookie":
515
417
  options.headers.append("Cookie", `${name}=${token}`);
516
418
  break;
517
- case "header":
518
419
  default:
519
420
  options.headers.set(name, token);
520
421
  break;
521
422
  }
522
423
  }
523
- }, "setAuthParams");
524
- var buildUrl = /* @__PURE__ */__name(options => getUrl({
424
+ }
425
+ var buildUrl = options => getUrl({
525
426
  baseUrl: options.baseUrl,
526
427
  path: options.path,
527
428
  query: options.query,
528
429
  querySerializer: typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer(options.querySerializer),
529
430
  url: options.url
530
- }), "buildUrl");
531
- var mergeConfigs = /* @__PURE__ */__name((a, b) => {
431
+ });
432
+ var mergeConfigs = (a, b) => {
532
433
  const config = {
533
434
  ...a,
534
435
  ...b
535
436
  };
536
- if (config.baseUrl?.endsWith("/")) {
537
- config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
538
- }
437
+ if (config.baseUrl?.endsWith("/")) config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
539
438
  config.headers = mergeHeaders(a.headers, b.headers);
540
439
  return config;
541
- }, "mergeConfigs");
542
- var headersEntries = /* @__PURE__ */__name(headers => {
440
+ };
441
+ var headersEntries = headers => {
543
442
  const entries = [];
544
443
  headers.forEach((value, key) => {
545
444
  entries.push([key, value]);
546
445
  });
547
446
  return entries;
548
- }, "headersEntries");
549
- var mergeHeaders = /* @__PURE__ */__name((...headers) => {
447
+ };
448
+ var mergeHeaders = (...headers) => {
550
449
  const mergedHeaders = new Headers();
551
450
  for (const header of headers) {
552
- if (!header) {
553
- continue;
554
- }
451
+ if (!header) continue;
555
452
  const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
556
- for (const [key, value] of iterator) {
557
- if (value === null) {
558
- mergedHeaders.delete(key);
559
- } else if (Array.isArray(value)) {
560
- for (const v of value) {
561
- mergedHeaders.append(key, v);
562
- }
563
- } else if (value !== void 0) {
564
- mergedHeaders.set(key, typeof value === "object" ? JSON.stringify(value) : value);
565
- }
566
- }
453
+ for (const [key, value] of iterator) if (value === null) mergedHeaders.delete(key);else if (Array.isArray(value)) for (const v of value) mergedHeaders.append(key, v);else if (value !== void 0) mergedHeaders.set(key, typeof value === "object" ? JSON.stringify(value) : value);
567
454
  }
568
455
  return mergedHeaders;
569
- }, "mergeHeaders");
570
- var Interceptors = class Interceptors2 {
571
- static {
572
- __name(this, "Interceptors");
573
- }
456
+ };
457
+ var Interceptors = class {
574
458
  fns = [];
575
459
  clear() {
576
460
  this.fns = [];
577
461
  }
578
462
  eject(id) {
579
463
  const index = this.getInterceptorIndex(id);
580
- if (this.fns[index]) {
581
- this.fns[index] = null;
582
- }
464
+ if (this.fns[index]) this.fns[index] = null;
583
465
  }
584
466
  exists(id) {
585
467
  const index = this.getInterceptorIndex(id);
586
468
  return Boolean(this.fns[index]);
587
469
  }
588
470
  getInterceptorIndex(id) {
589
- if (typeof id === "number") {
590
- return this.fns[id] ? id : -1;
591
- }
471
+ if (typeof id === "number") return this.fns[id] ? id : -1;
592
472
  return this.fns.indexOf(id);
593
473
  }
594
474
  update(id, fn) {
@@ -604,11 +484,11 @@ var Interceptors = class Interceptors2 {
604
484
  return this.fns.length - 1;
605
485
  }
606
486
  };
607
- var createInterceptors = /* @__PURE__ */__name(() => ({
487
+ var createInterceptors = () => ({
608
488
  error: new Interceptors(),
609
489
  request: new Interceptors(),
610
490
  response: new Interceptors()
611
- }), "createInterceptors");
491
+ });
612
492
  var defaultQuerySerializer = createQuerySerializer({
613
493
  allowReserved: false,
614
494
  array: {
@@ -623,26 +503,27 @@ var defaultQuerySerializer = createQuerySerializer({
623
503
  var defaultHeaders = {
624
504
  "Content-Type": "application/json"
625
505
  };
626
- var createConfig = /* @__PURE__ */__name((override = {}) => ({
506
+ var createConfig = (override = {}) => ({
627
507
  ...jsonBodySerializer,
628
508
  headers: defaultHeaders,
629
509
  parseAs: "auto",
630
510
  querySerializer: defaultQuerySerializer,
631
511
  ...override
632
- }), "createConfig");
512
+ });
633
513
 
634
- // src/generated/client/client.gen.ts
635
- var createClient = /* @__PURE__ */__name((config = {}) => {
514
+ //#endregion
515
+ //#region src/generated/client/client.gen.ts
516
+ var createClient = (config = {}) => {
636
517
  let _config = mergeConfigs(createConfig(), config);
637
- const getConfig = /* @__PURE__ */__name(() => ({
518
+ const getConfig = () => ({
638
519
  ..._config
639
- }), "getConfig");
640
- const setConfig = /* @__PURE__ */__name(config2 => {
641
- _config = mergeConfigs(_config, config2);
520
+ });
521
+ const setConfig = config => {
522
+ _config = mergeConfigs(_config, config);
642
523
  return getConfig();
643
- }, "setConfig");
524
+ };
644
525
  const interceptors = createInterceptors();
645
- const beforeRequest = /* @__PURE__ */__name(async options => {
526
+ const beforeRequest = async options => {
646
527
  const opts = {
647
528
  ..._config,
648
529
  ...options,
@@ -650,159 +531,117 @@ var createClient = /* @__PURE__ */__name((config = {}) => {
650
531
  headers: mergeHeaders(_config.headers, options.headers),
651
532
  serializedBody: void 0
652
533
  };
653
- if (opts.security) {
654
- await setAuthParams({
655
- ...opts,
656
- security: opts.security
657
- });
658
- }
659
- if (opts.requestValidator) {
660
- await opts.requestValidator(opts);
661
- }
662
- if (opts.body !== void 0 && opts.bodySerializer) {
663
- opts.serializedBody = opts.bodySerializer(opts.body);
664
- }
665
- if (opts.body === void 0 || opts.serializedBody === "") {
666
- opts.headers.delete("Content-Type");
667
- }
534
+ if (opts.security) await setAuthParams(opts);
535
+ if (opts.requestValidator) await opts.requestValidator(opts);
536
+ if (opts.body !== void 0 && opts.bodySerializer) opts.serializedBody = opts.bodySerializer(opts.body);
537
+ if (opts.body === void 0 || opts.serializedBody === "") opts.headers.delete("Content-Type");
668
538
  const resolvedOpts = opts;
669
- const url = buildUrl(resolvedOpts);
670
539
  return {
671
540
  opts: resolvedOpts,
672
- url
673
- };
674
- }, "beforeRequest");
675
- const request = /* @__PURE__ */__name(async options => {
676
- const {
677
- opts,
678
- url
679
- } = await beforeRequest(options);
680
- const requestInit = {
681
- redirect: "follow",
682
- ...opts,
683
- body: getValidRequestBody(opts)
541
+ url: buildUrl(resolvedOpts)
684
542
  };
685
- let request2 = new Request(url, requestInit);
686
- for (const fn of interceptors.request.fns) {
687
- if (fn) {
688
- request2 = await fn(request2, opts);
689
- }
690
- }
691
- const _fetch = opts.fetch;
543
+ };
544
+ const request = async options => {
545
+ const throwOnError = options.throwOnError ?? _config.throwOnError;
546
+ const responseStyle = options.responseStyle ?? _config.responseStyle;
547
+ let request;
692
548
  let response;
693
549
  try {
694
- response = await _fetch(request2);
695
- } catch (error2) {
696
- let finalError2 = error2;
697
- for (const fn of interceptors.error.fns) {
698
- if (fn) {
699
- finalError2 = await fn(error2, void 0, request2, opts);
700
- }
701
- }
702
- finalError2 = finalError2 || {};
703
- if (opts.throwOnError) {
704
- throw finalError2;
705
- }
706
- return opts.responseStyle === "data" ? void 0 : {
707
- error: finalError2,
708
- request: request2,
709
- response: void 0
550
+ const {
551
+ opts,
552
+ url
553
+ } = await beforeRequest(options);
554
+ const requestInit = {
555
+ redirect: "follow",
556
+ ...opts,
557
+ body: getValidRequestBody(opts)
710
558
  };
711
- }
712
- for (const fn of interceptors.response.fns) {
713
- if (fn) {
714
- response = await fn(response, request2, opts);
715
- }
716
- }
717
- const result = {
718
- request: request2,
719
- response
720
- };
721
- if (response.ok) {
722
- const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
723
- if (response.status === 204 || response.headers.get("Content-Length") === "0") {
724
- let emptyData;
559
+ request = new Request(url, requestInit);
560
+ for (const fn of interceptors.request.fns) if (fn) request = await fn(request, opts);
561
+ const _fetch = opts.fetch;
562
+ response = await _fetch(request);
563
+ for (const fn of interceptors.response.fns) if (fn) response = await fn(response, request, opts);
564
+ const result = {
565
+ request,
566
+ response
567
+ };
568
+ if (response.ok) {
569
+ const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
570
+ if (response.status === 204 || response.headers.get("Content-Length") === "0") {
571
+ let emptyData;
572
+ switch (parseAs) {
573
+ case "arrayBuffer":
574
+ case "blob":
575
+ case "text":
576
+ emptyData = await response[parseAs]();
577
+ break;
578
+ case "formData":
579
+ emptyData = new FormData();
580
+ break;
581
+ case "stream":
582
+ emptyData = response.body;
583
+ break;
584
+ default:
585
+ emptyData = {};
586
+ break;
587
+ }
588
+ return opts.responseStyle === "data" ? emptyData : {
589
+ data: emptyData,
590
+ ...result
591
+ };
592
+ }
593
+ let data;
725
594
  switch (parseAs) {
726
595
  case "arrayBuffer":
727
596
  case "blob":
728
- case "text":
729
- emptyData = await response[parseAs]();
730
- break;
731
597
  case "formData":
732
- emptyData = new FormData();
733
- break;
734
- case "stream":
735
- emptyData = response.body;
598
+ case "text":
599
+ data = await response[parseAs]();
736
600
  break;
737
601
  case "json":
738
- default:
739
- emptyData = {};
740
- break;
602
+ {
603
+ const text = await response.text();
604
+ data = text ? JSON.parse(text) : {};
605
+ break;
606
+ }
607
+ case "stream":
608
+ return opts.responseStyle === "data" ? response.body : {
609
+ data: response.body,
610
+ ...result
611
+ };
612
+ }
613
+ if (parseAs === "json") {
614
+ if (opts.responseValidator) await opts.responseValidator(data);
615
+ if (opts.responseTransformer) data = await opts.responseTransformer(data);
741
616
  }
742
- return opts.responseStyle === "data" ? emptyData : {
743
- data: emptyData,
617
+ return opts.responseStyle === "data" ? data : {
618
+ data,
744
619
  ...result
745
620
  };
746
621
  }
747
- let data;
748
- switch (parseAs) {
749
- case "arrayBuffer":
750
- case "blob":
751
- case "formData":
752
- case "text":
753
- data = await response[parseAs]();
754
- break;
755
- case "json":
756
- {
757
- const text = await response.text();
758
- data = text ? JSON.parse(text) : {};
759
- break;
760
- }
761
- case "stream":
762
- return opts.responseStyle === "data" ? response.body : {
763
- data: response.body,
764
- ...result
765
- };
766
- }
767
- if (parseAs === "json") {
768
- if (opts.responseValidator) {
769
- await opts.responseValidator(data);
770
- }
771
- if (opts.responseTransformer) {
772
- data = await opts.responseTransformer(data);
773
- }
774
- }
775
- return opts.responseStyle === "data" ? data : {
776
- data,
777
- ...result
622
+ const textError = await response.text();
623
+ let jsonError;
624
+ try {
625
+ jsonError = JSON.parse(textError);
626
+ } catch {}
627
+ throw jsonError ?? textError;
628
+ } catch (error) {
629
+ let finalError = error;
630
+ for (const fn of interceptors.error.fns) if (fn) finalError = await fn(finalError, response, request, options);
631
+ finalError = finalError || {};
632
+ if (throwOnError) throw finalError;
633
+ return responseStyle === "data" ? void 0 : {
634
+ error: finalError,
635
+ request,
636
+ response
778
637
  };
779
638
  }
780
- const textError = await response.text();
781
- let jsonError;
782
- try {
783
- jsonError = JSON.parse(textError);
784
- } catch {}
785
- const error = jsonError ?? textError;
786
- let finalError = error;
787
- for (const fn of interceptors.error.fns) {
788
- if (fn) {
789
- finalError = await fn(error, response, request2, opts);
790
- }
791
- }
792
- finalError = finalError || {};
793
- if (opts.throwOnError) {
794
- throw finalError;
795
- }
796
- return opts.responseStyle === "data" ? void 0 : {
797
- error: finalError,
798
- ...result
799
- };
800
- }, "request");
801
- const makeMethodFn = /* @__PURE__ */__name(method => options => request({
639
+ };
640
+ const makeMethodFn = method => options => request({
802
641
  ...options,
803
642
  method
804
- }), "makeMethodFn");
805
- const makeSseFn = /* @__PURE__ */__name(method => async options => {
643
+ });
644
+ const makeSseFn = method => async options => {
806
645
  const {
807
646
  opts,
808
647
  url
@@ -810,25 +649,20 @@ var createClient = /* @__PURE__ */__name((config = {}) => {
810
649
  return createSseClient({
811
650
  ...opts,
812
651
  body: opts.body,
813
- headers: opts.headers,
814
652
  method,
815
- onRequest: /* @__PURE__ */__name(async (url2, init) => {
816
- let request2 = new Request(url2, init);
817
- for (const fn of interceptors.request.fns) {
818
- if (fn) {
819
- request2 = await fn(request2, opts);
820
- }
821
- }
822
- return request2;
823
- }, "onRequest"),
653
+ onRequest: async (url, init) => {
654
+ let request = new Request(url, init);
655
+ for (const fn of interceptors.request.fns) if (fn) request = await fn(request, opts);
656
+ return request;
657
+ },
824
658
  serializedBody: getValidRequestBody(opts),
825
659
  url
826
660
  });
827
- }, "makeSseFn");
828
- const _buildUrl = /* @__PURE__ */__name(options => buildUrl({
661
+ };
662
+ const _buildUrl = options => buildUrl({
829
663
  ..._config,
830
664
  ...options
831
- }), "_buildUrl");
665
+ });
832
666
  return {
833
667
  buildUrl: _buildUrl,
834
668
  connect: makeMethodFn("CONNECT"),
@@ -856,21 +690,20 @@ var createClient = /* @__PURE__ */__name((config = {}) => {
856
690
  },
857
691
  trace: makeMethodFn("TRACE")
858
692
  };
859
- }, "createClient");
693
+ };
860
694
 
861
- // src/generated/client.gen.ts
695
+ //#endregion
696
+ //#region src/generated/client.gen.ts
862
697
  var client = createClient(createConfig());
863
698
 
864
- // src/generated/sdk.gen.ts
699
+ //#endregion
700
+ //#region src/generated/sdk.gen.ts
865
701
  var Actors = class {
866
- static {
867
- __name(this, "Actors");
868
- }
869
702
  /**
870
- * List actors
871
- *
872
- * Returns all actors the caller has access to. If projectId is provided, returns only actors in that project. project keys are scoped to a single project automatically. JWT users without projectId receive actors across all their accessible projects.
873
- */
703
+ * List actors
704
+ *
705
+ * Returns all actors the caller has access to. If projectId is provided, returns only actors in that project. project keys are scoped to a single project automatically. JWT users without projectId receive actors across all their accessible projects.
706
+ */
874
707
  static listActors(options) {
875
708
  return (options?.client ?? client).get({
876
709
  url: "/api/v1/actors",
@@ -878,10 +711,10 @@ var Actors = class {
878
711
  });
879
712
  }
880
713
  /**
881
- * Create an actor
882
- *
883
- * Creates a new actor. project keys automatically infer the project from the key's scope; JWT callers must supply projectId.
884
- */
714
+ * Create an actor
715
+ *
716
+ * Creates a new actor. project keys automatically infer the project from the key's scope; JWT callers must supply projectId.
717
+ */
885
718
  static createActor(options) {
886
719
  return (options.client ?? client).post({
887
720
  url: "/api/v1/actors",
@@ -893,10 +726,10 @@ var Actors = class {
893
726
  });
894
727
  }
895
728
  /**
896
- * Delete an actor
897
- *
898
- * Deletes an actor by its ID
899
- */
729
+ * Delete an actor
730
+ *
731
+ * Deletes an actor by its ID
732
+ */
900
733
  static deleteActor(options) {
901
734
  return (options.client ?? client).delete({
902
735
  url: "/api/v1/actors/{actor_id}",
@@ -904,10 +737,10 @@ var Actors = class {
904
737
  });
905
738
  }
906
739
  /**
907
- * Get an actor by ID
908
- *
909
- * Returns an actor by its ID
910
- */
740
+ * Get an actor by ID
741
+ *
742
+ * Returns an actor by its ID
743
+ */
911
744
  static getActor(options) {
912
745
  return (options.client ?? client).get({
913
746
  url: "/api/v1/actors/{actor_id}",
@@ -915,10 +748,10 @@ var Actors = class {
915
748
  });
916
749
  }
917
750
  /**
918
- * Update an actor
919
- *
920
- * Updates an actor's properties
921
- */
751
+ * Update an actor
752
+ *
753
+ * Updates an actor's properties
754
+ */
922
755
  static updateActor(options) {
923
756
  return (options.client ?? client).patch({
924
757
  url: "/api/v1/actors/{actor_id}",
@@ -930,10 +763,10 @@ var Actors = class {
930
763
  });
931
764
  }
932
765
  /**
933
- * Get actor tags
934
- *
935
- * Returns all tags attached to the actor
936
- */
766
+ * Get actor tags
767
+ *
768
+ * Returns all tags attached to the actor
769
+ */
937
770
  static getActorTags(options) {
938
771
  return (options.client ?? client).get({
939
772
  url: "/api/v1/actors/{actor_id}/tags",
@@ -941,10 +774,10 @@ var Actors = class {
941
774
  });
942
775
  }
943
776
  /**
944
- * Merge actor tags
945
- *
946
- * Merges provided tags with existing tags (existing tags are preserved unless overridden)
947
- */
777
+ * Merge actor tags
778
+ *
779
+ * Merges provided tags with existing tags (existing tags are preserved unless overridden)
780
+ */
948
781
  static mergeActorTags(options) {
949
782
  return (options.client ?? client).patch({
950
783
  url: "/api/v1/actors/{actor_id}/tags",
@@ -956,10 +789,10 @@ var Actors = class {
956
789
  });
957
790
  }
958
791
  /**
959
- * Replace actor tags
960
- *
961
- * Replaces all tags on the actor with the provided tags (not merged)
962
- */
792
+ * Replace actor tags
793
+ *
794
+ * Replaces all tags on the actor with the provided tags (not merged)
795
+ */
963
796
  static replaceActorTags(options) {
964
797
  return (options.client ?? client).put({
965
798
  url: "/api/v1/actors/{actor_id}/tags",
@@ -972,14 +805,11 @@ var Actors = class {
972
805
  }
973
806
  };
974
807
  var Agents = class {
975
- static {
976
- __name(this, "Agents");
977
- }
978
808
  /**
979
- * List agents
980
- *
981
- * Returns all agents in the project.
982
- */
809
+ * List agents
810
+ *
811
+ * Returns all agents in the project.
812
+ */
983
813
  static listAgents(options) {
984
814
  return (options?.client ?? client).get({
985
815
  url: "/api/v1/agents",
@@ -987,10 +817,10 @@ var Agents = class {
987
817
  });
988
818
  }
989
819
  /**
990
- * Create an agent
991
- *
992
- * Creates a new agent bound to an AI provider.
993
- */
820
+ * Create an agent
821
+ *
822
+ * Creates a new agent bound to an AI provider.
823
+ */
994
824
  static createAgent(options) {
995
825
  return (options.client ?? client).post({
996
826
  url: "/api/v1/agents",
@@ -1002,10 +832,10 @@ var Agents = class {
1002
832
  });
1003
833
  }
1004
834
  /**
1005
- * Delete an agent
1006
- *
1007
- * Deletes an agent by ID.
1008
- */
835
+ * Delete an agent
836
+ *
837
+ * Deletes an agent by ID.
838
+ */
1009
839
  static deleteAgent(options) {
1010
840
  return (options.client ?? client).delete({
1011
841
  url: "/api/v1/agents/{agent_id}",
@@ -1013,10 +843,10 @@ var Agents = class {
1013
843
  });
1014
844
  }
1015
845
  /**
1016
- * Get an agent
1017
- *
1018
- * Returns a single agent by ID.
1019
- */
846
+ * Get an agent
847
+ *
848
+ * Returns a single agent by ID.
849
+ */
1020
850
  static getAgent(options) {
1021
851
  return (options.client ?? client).get({
1022
852
  url: "/api/v1/agents/{agent_id}",
@@ -1024,10 +854,10 @@ var Agents = class {
1024
854
  });
1025
855
  }
1026
856
  /**
1027
- * Update an agent
1028
- *
1029
- * Updates an existing agent.
1030
- */
857
+ * Update an agent
858
+ *
859
+ * Updates an existing agent.
860
+ */
1031
861
  static updateAgent(options) {
1032
862
  return (options.client ?? client).put({
1033
863
  url: "/api/v1/agents/{agent_id}",
@@ -1039,11 +869,11 @@ var Agents = class {
1039
869
  });
1040
870
  }
1041
871
  /**
1042
- * Run an agent generation
1043
- *
1044
- * Sends messages to the agent, resolves its tools, and runs the AI model loop. Supports streaming via `stream: true`. Client tools pause the generation and return `requires_action`.
1045
- *
1046
- */
872
+ * Run an agent generation
873
+ *
874
+ * Sends messages to the agent, resolves its tools, and runs the AI model loop. Supports streaming via `stream: true`. Client tools pause the generation and return `requires_action`.
875
+ *
876
+ */
1047
877
  static createAgentGeneration(options) {
1048
878
  return (options.client ?? client).post({
1049
879
  url: "/api/v1/agents/{agent_id}/generate",
@@ -1055,11 +885,11 @@ var Agents = class {
1055
885
  });
1056
886
  }
1057
887
  /**
1058
- * Submit tool outputs for a paused generation
1059
- *
1060
- * Resumes a generation that was paused due to client tool calls. Provide tool outputs for each pending tool call.
1061
- *
1062
- */
888
+ * Submit tool outputs for a paused generation
889
+ *
890
+ * Resumes a generation that was paused due to client tool calls. Provide tool outputs for each pending tool call.
891
+ *
892
+ */
1063
893
  static submitAgentToolOutputs(options) {
1064
894
  return (options.client ?? client).post({
1065
895
  url: "/api/v1/agents/{agent_id}/generate/{generation_id}/tool-outputs",
@@ -1071,10 +901,10 @@ var Agents = class {
1071
901
  });
1072
902
  }
1073
903
  /**
1074
- * Create an actor for an agent
1075
- *
1076
- * Creates a new actor associated with the specified agent
1077
- */
904
+ * Create an actor for an agent
905
+ *
906
+ * Creates a new actor associated with the specified agent
907
+ */
1078
908
  static createAgentActor(options) {
1079
909
  return (options.client ?? client).post({
1080
910
  url: "/api/v1/agents/{agent_id}/actors",
@@ -1087,14 +917,11 @@ var Agents = class {
1087
917
  }
1088
918
  };
1089
919
  var AiProviders = class {
1090
- static {
1091
- __name(this, "AiProviders");
1092
- }
1093
920
  /**
1094
- * List AI providers
1095
- *
1096
- * Returns a list of AI provider configurations for a project
1097
- */
921
+ * List AI providers
922
+ *
923
+ * Returns a list of AI provider configurations for a project
924
+ */
1098
925
  static listAiProviders(options) {
1099
926
  return (options?.client ?? client).get({
1100
927
  url: "/api/v1/ai-providers",
@@ -1102,10 +929,10 @@ var AiProviders = class {
1102
929
  });
1103
930
  }
1104
931
  /**
1105
- * Create an AI provider
1106
- *
1107
- * Creates a new LLM provider configuration
1108
- */
932
+ * Create an AI provider
933
+ *
934
+ * Creates a new LLM provider configuration
935
+ */
1109
936
  static createAiProvider(options) {
1110
937
  return (options.client ?? client).post({
1111
938
  url: "/api/v1/ai-providers",
@@ -1117,10 +944,10 @@ var AiProviders = class {
1117
944
  });
1118
945
  }
1119
946
  /**
1120
- * Delete an AI provider
1121
- *
1122
- * Deletes an AI provider configuration
1123
- */
947
+ * Delete an AI provider
948
+ *
949
+ * Deletes an AI provider configuration
950
+ */
1124
951
  static deleteAiProvider(options) {
1125
952
  return (options.client ?? client).delete({
1126
953
  url: "/api/v1/ai-providers/{ai_provider_id}",
@@ -1128,10 +955,10 @@ var AiProviders = class {
1128
955
  });
1129
956
  }
1130
957
  /**
1131
- * Get an AI provider
1132
- *
1133
- * Returns a specific AI provider configuration
1134
- */
958
+ * Get an AI provider
959
+ *
960
+ * Returns a specific AI provider configuration
961
+ */
1135
962
  static getAiProvider(options) {
1136
963
  return (options.client ?? client).get({
1137
964
  url: "/api/v1/ai-providers/{ai_provider_id}",
@@ -1139,10 +966,10 @@ var AiProviders = class {
1139
966
  });
1140
967
  }
1141
968
  /**
1142
- * Update an AI provider
1143
- *
1144
- * Updates an AI provider configuration
1145
- */
969
+ * Update an AI provider
970
+ *
971
+ * Updates an AI provider configuration
972
+ */
1146
973
  static updateAiProvider(options) {
1147
974
  return (options.client ?? client).patch({
1148
975
  url: "/api/v1/ai-providers/{ai_provider_id}",
@@ -1155,15 +982,12 @@ var AiProviders = class {
1155
982
  }
1156
983
  };
1157
984
  var ApiKeys = class {
1158
- static {
1159
- __name(this, "ApiKeys");
1160
- }
1161
985
  /**
1162
- * List API keys
1163
- *
1164
- * Lists API keys accessible to the caller. - JWT admin: returns all API keys. - JWT regular user: returns only the user's own API keys. - API key scoped to a project: returns only API keys scoped to that project.
1165
- *
1166
- */
986
+ * List API keys
987
+ *
988
+ * Lists API keys accessible to the caller. - JWT admin: returns all API keys. - JWT regular user: returns only the user's own API keys. - API key scoped to a project: returns only API keys scoped to that project.
989
+ *
990
+ */
1167
991
  static listApiKeys(options) {
1168
992
  return (options?.client ?? client).get({
1169
993
  security: [{
@@ -1175,11 +999,11 @@ var ApiKeys = class {
1175
999
  });
1176
1000
  }
1177
1001
  /**
1178
- * Create an API key
1179
- *
1180
- * Creates a new API key for the authenticated user. - If `project_id` is provided, the key is scoped to that project. - If `policy_ids` is provided, the key's effective permissions are the intersection of the user's policies and the key's policies. - If neither is provided, the key inherits the user's full permissions.
1181
- *
1182
- */
1002
+ * Create an API key
1003
+ *
1004
+ * Creates a new API key for the authenticated user. - If `project_id` is provided, the key is scoped to that project. - If `policy_ids` is provided, the key's effective permissions are the intersection of the user's policies and the key's policies. - If neither is provided, the key inherits the user's full permissions.
1005
+ *
1006
+ */
1183
1007
  static createApiKey(options) {
1184
1008
  return (options.client ?? client).post({
1185
1009
  url: "/api/v1/api-keys",
@@ -1191,10 +1015,10 @@ var ApiKeys = class {
1191
1015
  });
1192
1016
  }
1193
1017
  /**
1194
- * Delete an API key
1195
- *
1196
- * Deletes an API key. Only the owner or an admin can delete it.
1197
- */
1018
+ * Delete an API key
1019
+ *
1020
+ * Deletes an API key. Only the owner or an admin can delete it.
1021
+ */
1198
1022
  static deleteApiKey(options) {
1199
1023
  return (options.client ?? client).delete({
1200
1024
  url: "/api/v1/api-keys/{api_key_id}",
@@ -1202,10 +1026,10 @@ var ApiKeys = class {
1202
1026
  });
1203
1027
  }
1204
1028
  /**
1205
- * Get an API key
1206
- *
1207
- * Returns details of an API key. Only the owner or an admin can access it.
1208
- */
1029
+ * Get an API key
1030
+ *
1031
+ * Returns details of an API key. Only the owner or an admin can access it.
1032
+ */
1209
1033
  static getApiKey(options) {
1210
1034
  return (options.client ?? client).get({
1211
1035
  url: "/api/v1/api-keys/{api_key_id}",
@@ -1213,10 +1037,10 @@ var ApiKeys = class {
1213
1037
  });
1214
1038
  }
1215
1039
  /**
1216
- * Update an API key
1217
- *
1218
- * Updates an API key's name, project scope, or policies. Only the owner or an admin can update it.
1219
- */
1040
+ * Update an API key
1041
+ *
1042
+ * Updates an API key's name, project scope, or policies. Only the owner or an admin can update it.
1043
+ */
1220
1044
  static updateApiKey(options) {
1221
1045
  return (options.client ?? client).put({
1222
1046
  url: "/api/v1/api-keys/{api_key_id}",
@@ -1229,14 +1053,11 @@ var ApiKeys = class {
1229
1053
  }
1230
1054
  };
1231
1055
  var Chats = class {
1232
- static {
1233
- __name(this, "Chats");
1234
- }
1235
1056
  /**
1236
- * List chats
1237
- *
1238
- * Returns all chats in the project.
1239
- */
1057
+ * List chats
1058
+ *
1059
+ * Returns all chats in the project.
1060
+ */
1240
1061
  static listChats(options) {
1241
1062
  return (options?.client ?? client).get({
1242
1063
  url: "/api/v1/chats",
@@ -1244,10 +1065,10 @@ var Chats = class {
1244
1065
  });
1245
1066
  }
1246
1067
  /**
1247
- * Create a chat
1248
- *
1249
- * Creates a new chat resource bound to an AI provider.
1250
- */
1068
+ * Create a chat
1069
+ *
1070
+ * Creates a new chat resource bound to an AI provider.
1071
+ */
1251
1072
  static createChat(options) {
1252
1073
  return (options.client ?? client).post({
1253
1074
  url: "/api/v1/chats",
@@ -1259,10 +1080,10 @@ var Chats = class {
1259
1080
  });
1260
1081
  }
1261
1082
  /**
1262
- * Delete a chat
1263
- *
1264
- * Deletes a chat by ID.
1265
- */
1083
+ * Delete a chat
1084
+ *
1085
+ * Deletes a chat by ID.
1086
+ */
1266
1087
  static deleteChat(options) {
1267
1088
  return (options.client ?? client).delete({
1268
1089
  url: "/api/v1/chats/{chat_id}",
@@ -1270,10 +1091,10 @@ var Chats = class {
1270
1091
  });
1271
1092
  }
1272
1093
  /**
1273
- * Get a chat
1274
- *
1275
- * Returns a single chat by ID.
1276
- */
1094
+ * Get a chat
1095
+ *
1096
+ * Returns a single chat by ID.
1097
+ */
1277
1098
  static getChat(options) {
1278
1099
  return (options.client ?? client).get({
1279
1100
  url: "/api/v1/chats/{chat_id}",
@@ -1281,11 +1102,11 @@ var Chats = class {
1281
1102
  });
1282
1103
  }
1283
1104
  /**
1284
- * Create a chat completion for a stored chat
1285
- *
1286
- * Runs a completion using the AI provider and settings stored in the chat. Pass `stream: true` for SSE streaming. A system message in `messages` overrides the chat's stored system message for this call only. Messages may use `documentId` instead of `content`.
1287
- *
1288
- */
1105
+ * Create a chat completion for a stored chat
1106
+ *
1107
+ * Runs a completion using the AI provider and settings stored in the chat. Pass `stream: true` for SSE streaming. A system message in `messages` overrides the chat's stored system message for this call only. Messages may use `documentId` instead of `content`.
1108
+ *
1109
+ */
1289
1110
  static createChatCompletionForChat(options) {
1290
1111
  return (options.client ?? client).post({
1291
1112
  url: "/api/v1/chats/{chat_id}/completions",
@@ -1297,11 +1118,11 @@ var Chats = class {
1297
1118
  });
1298
1119
  }
1299
1120
  /**
1300
- * Create a chat completion (stateless)
1301
- *
1302
- * OpenAI Chat Completions-compatible endpoint. Resolves the AI provider from `ai_provider_id`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. `ai_provider_id` is required — there is no server-side model fallback.
1303
- *
1304
- */
1121
+ * Create a chat completion (stateless)
1122
+ *
1123
+ * OpenAI Chat Completions-compatible endpoint. Resolves the AI provider from `ai_provider_id`, decrypts its secret, and calls the appropriate Vercel AI SDK provider. `ai_provider_id` is required — there is no server-side model fallback.
1124
+ *
1125
+ */
1305
1126
  static createChatCompletion(options) {
1306
1127
  return (options.client ?? client).post({
1307
1128
  url: "/api/v1/chats/completions",
@@ -1313,10 +1134,10 @@ var Chats = class {
1313
1134
  });
1314
1135
  }
1315
1136
  /**
1316
- * Create an actor for a chat
1317
- *
1318
- * Creates a new actor associated with the specified chat
1319
- */
1137
+ * Create an actor for a chat
1138
+ *
1139
+ * Creates a new actor associated with the specified chat
1140
+ */
1320
1141
  static createChatActor(options) {
1321
1142
  return (options.client ?? client).post({
1322
1143
  url: "/api/v1/chats/{chat_id}/actors",
@@ -1329,14 +1150,11 @@ var Chats = class {
1329
1150
  }
1330
1151
  };
1331
1152
  var Conversations = class {
1332
- static {
1333
- __name(this, "Conversations");
1334
- }
1335
1153
  /**
1336
- * List conversations
1337
- *
1338
- * Returns all conversations the caller has access to. If projectId is provided, returns only conversations in that project. project keys are scoped to a single project automatically.
1339
- */
1154
+ * List conversations
1155
+ *
1156
+ * Returns all conversations the caller has access to. If projectId is provided, returns only conversations in that project. project keys are scoped to a single project automatically.
1157
+ */
1340
1158
  static listConversations(options) {
1341
1159
  return (options?.client ?? client).get({
1342
1160
  url: "/api/v1/conversations",
@@ -1344,10 +1162,10 @@ var Conversations = class {
1344
1162
  });
1345
1163
  }
1346
1164
  /**
1347
- * Create a conversation
1348
- *
1349
- * Creates a new conversation. project keys automatically infer the project from the key's scope; JWT callers must supply projectId.
1350
- */
1165
+ * Create a conversation
1166
+ *
1167
+ * Creates a new conversation. project keys automatically infer the project from the key's scope; JWT callers must supply projectId.
1168
+ */
1351
1169
  static createConversation(options) {
1352
1170
  return (options.client ?? client).post({
1353
1171
  url: "/api/v1/conversations",
@@ -1359,10 +1177,10 @@ var Conversations = class {
1359
1177
  });
1360
1178
  }
1361
1179
  /**
1362
- * Delete a conversation
1363
- *
1364
- * Deletes a conversation by its ID
1365
- */
1180
+ * Delete a conversation
1181
+ *
1182
+ * Deletes a conversation by its ID
1183
+ */
1366
1184
  static deleteConversation(options) {
1367
1185
  return (options.client ?? client).delete({
1368
1186
  url: "/api/v1/conversations/{conversation_id}",
@@ -1370,10 +1188,10 @@ var Conversations = class {
1370
1188
  });
1371
1189
  }
1372
1190
  /**
1373
- * Get a conversation by ID
1374
- *
1375
- * Returns a conversation by its ID
1376
- */
1191
+ * Get a conversation by ID
1192
+ *
1193
+ * Returns a conversation by its ID
1194
+ */
1377
1195
  static getConversation(options) {
1378
1196
  return (options.client ?? client).get({
1379
1197
  url: "/api/v1/conversations/{conversation_id}",
@@ -1381,10 +1199,10 @@ var Conversations = class {
1381
1199
  });
1382
1200
  }
1383
1201
  /**
1384
- * Update a conversation
1385
- *
1386
- * Updates the status of a conversation
1387
- */
1202
+ * Update a conversation
1203
+ *
1204
+ * Updates the status of a conversation
1205
+ */
1388
1206
  static updateConversation(options) {
1389
1207
  return (options.client ?? client).patch({
1390
1208
  url: "/api/v1/conversations/{conversation_id}",
@@ -1396,10 +1214,10 @@ var Conversations = class {
1396
1214
  });
1397
1215
  }
1398
1216
  /**
1399
- * List conversation messages
1400
- *
1401
- * Returns all messages (documents) attached to a conversation, ordered by position
1402
- */
1217
+ * List conversation messages
1218
+ *
1219
+ * Returns all messages (documents) attached to a conversation, ordered by position
1220
+ */
1403
1221
  static listConversationMessages(options) {
1404
1222
  return (options.client ?? client).get({
1405
1223
  url: "/api/v1/conversations/{conversation_id}/messages",
@@ -1407,10 +1225,10 @@ var Conversations = class {
1407
1225
  });
1408
1226
  }
1409
1227
  /**
1410
- * Add a message to a conversation
1411
- *
1412
- * Creates a document from the message text and attaches it to the conversation at the given position. If position is omitted, it is appended at the end.
1413
- */
1228
+ * Add a message to a conversation
1229
+ *
1230
+ * Creates a document from the message text and attaches it to the conversation at the given position. If position is omitted, it is appended at the end.
1231
+ */
1414
1232
  static addConversationMessage(options) {
1415
1233
  return (options.client ?? client).post({
1416
1234
  url: "/api/v1/conversations/{conversation_id}/messages",
@@ -1422,14 +1240,14 @@ var Conversations = class {
1422
1240
  });
1423
1241
  }
1424
1242
  /**
1425
- * Generate the next message in a conversation
1426
- *
1427
- * Generates the next message using the specified actor's linked agent or chat.
1428
- * On `completed`, the reply is persisted as a new ConversationMessage authored
1429
- * by that actor. On `requires_action`, nothing is persisted; the caller must
1430
- * submit tool outputs via the Agents module and re-invoke generate.
1431
- *
1432
- */
1243
+ * Generate the next message in a conversation
1244
+ *
1245
+ * Generates the next message using the specified actor's linked agent or chat.
1246
+ * On `completed`, the reply is persisted as a new ConversationMessage authored
1247
+ * by that actor. On `requires_action`, nothing is persisted; the caller must
1248
+ * submit tool outputs via the Agents module and re-invoke generate.
1249
+ *
1250
+ */
1433
1251
  static generateConversationMessage(options) {
1434
1252
  return (options.client ?? client).post({
1435
1253
  url: "/api/v1/conversations/{conversation_id}/generate",
@@ -1441,10 +1259,10 @@ var Conversations = class {
1441
1259
  });
1442
1260
  }
1443
1261
  /**
1444
- * List actors in a conversation
1445
- *
1446
- * Returns all distinct actors who have sent at least one message in the conversation
1447
- */
1262
+ * List actors in a conversation
1263
+ *
1264
+ * Returns all distinct actors who have sent at least one message in the conversation
1265
+ */
1448
1266
  static listConversationActors(options) {
1449
1267
  return (options.client ?? client).get({
1450
1268
  url: "/api/v1/conversations/{conversation_id}/actors",
@@ -1452,10 +1270,10 @@ var Conversations = class {
1452
1270
  });
1453
1271
  }
1454
1272
  /**
1455
- * Remove a message from a conversation
1456
- *
1457
- * Removes a document from a conversation
1458
- */
1273
+ * Remove a message from a conversation
1274
+ *
1275
+ * Removes a document from a conversation
1276
+ */
1459
1277
  static removeConversationMessage(options) {
1460
1278
  return (options.client ?? client).delete({
1461
1279
  url: "/api/v1/conversations/{conversation_id}/messages/{document_id}",
@@ -1463,10 +1281,10 @@ var Conversations = class {
1463
1281
  });
1464
1282
  }
1465
1283
  /**
1466
- * Get conversation tags
1467
- *
1468
- * Returns all tags attached to the conversation
1469
- */
1284
+ * Get conversation tags
1285
+ *
1286
+ * Returns all tags attached to the conversation
1287
+ */
1470
1288
  static getConversationTags(options) {
1471
1289
  return (options.client ?? client).get({
1472
1290
  url: "/api/v1/conversations/{conversation_id}/tags",
@@ -1474,10 +1292,10 @@ var Conversations = class {
1474
1292
  });
1475
1293
  }
1476
1294
  /**
1477
- * Merge conversation tags
1478
- *
1479
- * Merges provided tags with existing tags
1480
- */
1295
+ * Merge conversation tags
1296
+ *
1297
+ * Merges provided tags with existing tags
1298
+ */
1481
1299
  static mergeConversationTags(options) {
1482
1300
  return (options.client ?? client).patch({
1483
1301
  url: "/api/v1/conversations/{conversation_id}/tags",
@@ -1489,10 +1307,10 @@ var Conversations = class {
1489
1307
  });
1490
1308
  }
1491
1309
  /**
1492
- * Replace conversation tags
1493
- *
1494
- * Replaces all tags on the conversation with the provided tags
1495
- */
1310
+ * Replace conversation tags
1311
+ *
1312
+ * Replaces all tags on the conversation with the provided tags
1313
+ */
1496
1314
  static replaceConversationTags(options) {
1497
1315
  return (options.client ?? client).put({
1498
1316
  url: "/api/v1/conversations/{conversation_id}/tags",
@@ -1505,14 +1323,11 @@ var Conversations = class {
1505
1323
  }
1506
1324
  };
1507
1325
  var Documents = class {
1508
- static {
1509
- __name(this, "Documents");
1510
- }
1511
1326
  /**
1512
- * List documents
1513
- *
1514
- * Returns all documents the caller has access to. If projectId is provided, returns only documents in that project. project keys are scoped to a single project automatically. JWT users without projectId receive documents across all their accessible projects.
1515
- */
1327
+ * List documents
1328
+ *
1329
+ * Returns all documents the caller has access to. If projectId is provided, returns only documents in that project. project keys are scoped to a single project automatically. JWT users without projectId receive documents across all their accessible projects.
1330
+ */
1516
1331
  static listDocuments(options) {
1517
1332
  return (options?.client ?? client).get({
1518
1333
  url: "/api/v1/documents",
@@ -1520,10 +1335,10 @@ var Documents = class {
1520
1335
  });
1521
1336
  }
1522
1337
  /**
1523
- * Create a document
1524
- *
1525
- * Creates a new text document and generates an embedding vector for semantic search. project keys automatically infer the project from the key's scope; JWT callers must supply projectId.
1526
- */
1338
+ * Create a document
1339
+ *
1340
+ * Creates a new text document and generates an embedding vector for semantic search. project keys automatically infer the project from the key's scope; JWT callers must supply projectId.
1341
+ */
1527
1342
  static createDocument(options) {
1528
1343
  return (options.client ?? client).post({
1529
1344
  url: "/api/v1/documents",
@@ -1535,10 +1350,10 @@ var Documents = class {
1535
1350
  });
1536
1351
  }
1537
1352
  /**
1538
- * Delete a document
1539
- *
1540
- * Deletes a document and its underlying file
1541
- */
1353
+ * Delete a document
1354
+ *
1355
+ * Deletes a document and its underlying file
1356
+ */
1542
1357
  static deleteDocument(options) {
1543
1358
  return (options.client ?? client).delete({
1544
1359
  url: "/api/v1/documents/{document_id}",
@@ -1546,10 +1361,10 @@ var Documents = class {
1546
1361
  });
1547
1362
  }
1548
1363
  /**
1549
- * Get a document by ID
1550
- *
1551
- * Returns a document with its text content
1552
- */
1364
+ * Get a document by ID
1365
+ *
1366
+ * Returns a document with its text content
1367
+ */
1553
1368
  static getDocument(options) {
1554
1369
  return (options.client ?? client).get({
1555
1370
  url: "/api/v1/documents/{document_id}",
@@ -1557,10 +1372,10 @@ var Documents = class {
1557
1372
  });
1558
1373
  }
1559
1374
  /**
1560
- * Update a document
1561
- *
1562
- * Updates document content, title, path, metadata, or tags. Supplying `path` moves the document to a new logical path within the project.
1563
- */
1375
+ * Update a document
1376
+ *
1377
+ * Updates document content, title, path, metadata, or tags. Supplying `path` moves the document to a new logical path within the project.
1378
+ */
1564
1379
  static updateDocument(options) {
1565
1380
  return (options.client ?? client).patch({
1566
1381
  url: "/api/v1/documents/{document_id}",
@@ -1572,10 +1387,10 @@ var Documents = class {
1572
1387
  });
1573
1388
  }
1574
1389
  /**
1575
- * Get document tags
1576
- *
1577
- * Returns all tags attached to the document
1578
- */
1390
+ * Get document tags
1391
+ *
1392
+ * Returns all tags attached to the document
1393
+ */
1579
1394
  static getDocumentTags(options) {
1580
1395
  return (options.client ?? client).get({
1581
1396
  url: "/api/v1/documents/{document_id}/tags",
@@ -1583,10 +1398,10 @@ var Documents = class {
1583
1398
  });
1584
1399
  }
1585
1400
  /**
1586
- * Merge document tags
1587
- *
1588
- * Merges provided tags with existing tags (existing tags are preserved unless overridden)
1589
- */
1401
+ * Merge document tags
1402
+ *
1403
+ * Merges provided tags with existing tags (existing tags are preserved unless overridden)
1404
+ */
1590
1405
  static mergeDocumentTags(options) {
1591
1406
  return (options.client ?? client).patch({
1592
1407
  url: "/api/v1/documents/{document_id}/tags",
@@ -1598,10 +1413,10 @@ var Documents = class {
1598
1413
  });
1599
1414
  }
1600
1415
  /**
1601
- * Replace document tags
1602
- *
1603
- * Replaces all tags on the document with the provided tags (not merged)
1604
- */
1416
+ * Replace document tags
1417
+ *
1418
+ * Replaces all tags on the document with the provided tags (not merged)
1419
+ */
1605
1420
  static replaceDocumentTags(options) {
1606
1421
  return (options.client ?? client).put({
1607
1422
  url: "/api/v1/documents/{document_id}/tags",
@@ -1614,14 +1429,11 @@ var Documents = class {
1614
1429
  }
1615
1430
  };
1616
1431
  var Files = class {
1617
- static {
1618
- __name(this, "Files");
1619
- }
1620
1432
  /**
1621
- * List all files
1622
- *
1623
- * Returns a list of all stored files
1624
- */
1433
+ * List all files
1434
+ *
1435
+ * Returns a list of all stored files
1436
+ */
1625
1437
  static listFiles(options) {
1626
1438
  return (options?.client ?? client).get({
1627
1439
  url: "/api/v1/files",
@@ -1629,10 +1441,10 @@ var Files = class {
1629
1441
  });
1630
1442
  }
1631
1443
  /**
1632
- * Create a file
1633
- *
1634
- * Creates a new file record in the system
1635
- */
1444
+ * Create a file
1445
+ *
1446
+ * Creates a new file record in the system
1447
+ */
1636
1448
  static createFile(options) {
1637
1449
  return (options.client ?? client).post({
1638
1450
  url: "/api/v1/files",
@@ -1644,10 +1456,10 @@ var Files = class {
1644
1456
  });
1645
1457
  }
1646
1458
  /**
1647
- * Upload a file
1648
- *
1649
- * Uploads a file to the server and stores it in the configured storage directory
1650
- */
1459
+ * Upload a file
1460
+ *
1461
+ * Uploads a file to the server and stores it in the configured storage directory
1462
+ */
1651
1463
  static uploadFile(options) {
1652
1464
  return (options.client ?? client).post({
1653
1465
  ...formDataBodySerializer,
@@ -1660,10 +1472,10 @@ var Files = class {
1660
1472
  });
1661
1473
  }
1662
1474
  /**
1663
- * Upload a file using base64 encoding
1664
- *
1665
- * Uploads a file to the server using base64-encoded content
1666
- */
1475
+ * Upload a file using base64 encoding
1476
+ *
1477
+ * Uploads a file to the server using base64-encoded content
1478
+ */
1667
1479
  static uploadFileBase64(options) {
1668
1480
  return (options.client ?? client).post({
1669
1481
  url: "/api/v1/files/upload/base64",
@@ -1675,10 +1487,10 @@ var Files = class {
1675
1487
  });
1676
1488
  }
1677
1489
  /**
1678
- * Delete a file
1679
- *
1680
- * Removes a file from the system by ID
1681
- */
1490
+ * Delete a file
1491
+ *
1492
+ * Removes a file from the system by ID
1493
+ */
1682
1494
  static deleteFile(options) {
1683
1495
  return (options.client ?? client).delete({
1684
1496
  url: "/api/v1/files/{file_id}",
@@ -1686,10 +1498,10 @@ var Files = class {
1686
1498
  });
1687
1499
  }
1688
1500
  /**
1689
- * Get a file by ID
1690
- *
1691
- * Returns the data and metadata of a specific file
1692
- */
1501
+ * Get a file by ID
1502
+ *
1503
+ * Returns the data and metadata of a specific file
1504
+ */
1693
1505
  static getFile(options) {
1694
1506
  return (options.client ?? client).get({
1695
1507
  url: "/api/v1/files/{file_id}",
@@ -1697,10 +1509,10 @@ var Files = class {
1697
1509
  });
1698
1510
  }
1699
1511
  /**
1700
- * Download a file
1701
- *
1702
- * Streams the file content to the client
1703
- */
1512
+ * Download a file
1513
+ *
1514
+ * Streams the file content to the client
1515
+ */
1704
1516
  static downloadFile(options) {
1705
1517
  return (options.client ?? client).get({
1706
1518
  url: "/api/v1/files/{file_id}/download",
@@ -1708,10 +1520,10 @@ var Files = class {
1708
1520
  });
1709
1521
  }
1710
1522
  /**
1711
- * Update file metadata
1712
- *
1713
- * Updates the metadata field of a file
1714
- */
1523
+ * Update file metadata
1524
+ *
1525
+ * Updates the metadata field of a file
1526
+ */
1715
1527
  static updateFileMetadata(options) {
1716
1528
  return (options.client ?? client).patch({
1717
1529
  url: "/api/v1/files/{file_id}/metadata",
@@ -1723,10 +1535,10 @@ var Files = class {
1723
1535
  });
1724
1536
  }
1725
1537
  /**
1726
- * Download file as base64
1727
- *
1728
- * Returns the file content encoded as base64
1729
- */
1538
+ * Download file as base64
1539
+ *
1540
+ * Returns the file content encoded as base64
1541
+ */
1730
1542
  static downloadFileBase64(options) {
1731
1543
  return (options.client ?? client).get({
1732
1544
  url: "/api/v1/files/{file_id}/download/base64",
@@ -1734,10 +1546,10 @@ var Files = class {
1734
1546
  });
1735
1547
  }
1736
1548
  /**
1737
- * Get file tags
1738
- *
1739
- * Returns all tags attached to the file
1740
- */
1549
+ * Get file tags
1550
+ *
1551
+ * Returns all tags attached to the file
1552
+ */
1741
1553
  static getFileTags(options) {
1742
1554
  return (options.client ?? client).get({
1743
1555
  url: "/api/v1/files/{file_id}/tags",
@@ -1745,10 +1557,10 @@ var Files = class {
1745
1557
  });
1746
1558
  }
1747
1559
  /**
1748
- * Merge file tags
1749
- *
1750
- * Merges provided tags with existing tags
1751
- */
1560
+ * Merge file tags
1561
+ *
1562
+ * Merges provided tags with existing tags
1563
+ */
1752
1564
  static mergeFileTags(options) {
1753
1565
  return (options.client ?? client).patch({
1754
1566
  url: "/api/v1/files/{file_id}/tags",
@@ -1760,10 +1572,10 @@ var Files = class {
1760
1572
  });
1761
1573
  }
1762
1574
  /**
1763
- * Replace file tags
1764
- *
1765
- * Replaces all tags on the file with the provided tags
1766
- */
1575
+ * Replace file tags
1576
+ *
1577
+ * Replaces all tags on the file with the provided tags
1578
+ */
1767
1579
  static replaceFileTags(options) {
1768
1580
  return (options.client ?? client).put({
1769
1581
  url: "/api/v1/files/{file_id}/tags",
@@ -1776,15 +1588,12 @@ var Files = class {
1776
1588
  }
1777
1589
  };
1778
1590
  var Formations = class {
1779
- static {
1780
- __name(this, "Formations");
1781
- }
1782
1591
  /**
1783
- * Validate a formation template
1784
- *
1785
- * Validates a formation template without creating any resources. Returns a list of errors and warnings. Accepts the template as a JSON object or as a YAML/JSON string.
1786
- *
1787
- */
1592
+ * Validate a formation template
1593
+ *
1594
+ * Validates a formation template without creating any resources. Returns a list of errors and warnings. Accepts the template as a JSON object or as a YAML/JSON string.
1595
+ *
1596
+ */
1788
1597
  static validateFormation(options) {
1789
1598
  return (options.client ?? client).post({
1790
1599
  url: "/api/v1/formations/validate",
@@ -1796,11 +1605,11 @@ var Formations = class {
1796
1605
  });
1797
1606
  }
1798
1607
  /**
1799
- * Plan a formation deployment
1800
- *
1801
- * Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions.
1802
- *
1803
- */
1608
+ * Plan a formation deployment
1609
+ *
1610
+ * Computes a diff between the desired template and the current stack state without making any changes. Returns the list of planned actions.
1611
+ *
1612
+ */
1804
1613
  static planFormation(options) {
1805
1614
  return (options.client ?? client).post({
1806
1615
  url: "/api/v1/formations/plan",
@@ -1812,10 +1621,10 @@ var Formations = class {
1812
1621
  });
1813
1622
  }
1814
1623
  /**
1815
- * List formations
1816
- *
1817
- * Returns all formation stacks for a project
1818
- */
1624
+ * List formations
1625
+ *
1626
+ * Returns all formation stacks for a project
1627
+ */
1819
1628
  static listFormations(options) {
1820
1629
  return (options?.client ?? client).get({
1821
1630
  url: "/api/v1/formations",
@@ -1823,11 +1632,11 @@ var Formations = class {
1823
1632
  });
1824
1633
  }
1825
1634
  /**
1826
- * Create a new formation
1827
- *
1828
- * Validates the template, creates the formation record, then provisions all declared resources in dependency order.
1829
- *
1830
- */
1635
+ * Create a new formation
1636
+ *
1637
+ * Validates the template, creates the formation record, then provisions all declared resources in dependency order.
1638
+ *
1639
+ */
1831
1640
  static createFormation(options) {
1832
1641
  return (options.client ?? client).post({
1833
1642
  url: "/api/v1/formations",
@@ -1839,11 +1648,11 @@ var Formations = class {
1839
1648
  });
1840
1649
  }
1841
1650
  /**
1842
- * Delete an formation
1843
- *
1844
- * Deletes the formation stack and all its managed resources in reverse dependency order.
1845
- *
1846
- */
1651
+ * Delete an formation
1652
+ *
1653
+ * Deletes the formation stack and all its managed resources in reverse dependency order.
1654
+ *
1655
+ */
1847
1656
  static deleteFormation(options) {
1848
1657
  return (options.client ?? client).delete({
1849
1658
  url: "/api/v1/formations/{formation_id}",
@@ -1851,10 +1660,10 @@ var Formations = class {
1851
1660
  });
1852
1661
  }
1853
1662
  /**
1854
- * Get a specific formation
1855
- *
1856
- * Returns the formation stack including its current resources.
1857
- */
1663
+ * Get a specific formation
1664
+ *
1665
+ * Returns the formation stack including its current resources.
1666
+ */
1858
1667
  static getFormation(options) {
1859
1668
  return (options.client ?? client).get({
1860
1669
  url: "/api/v1/formations/{formation_id}",
@@ -1862,11 +1671,11 @@ var Formations = class {
1862
1671
  });
1863
1672
  }
1864
1673
  /**
1865
- * Update an formation
1866
- *
1867
- * Applies a new template to the formation. Resources are created, updated, or deleted to reconcile the current state with the desired state.
1868
- *
1869
- */
1674
+ * Update an formation
1675
+ *
1676
+ * Applies a new template to the formation. Resources are created, updated, or deleted to reconcile the current state with the desired state.
1677
+ *
1678
+ */
1870
1679
  static updateFormation(options) {
1871
1680
  return (options.client ?? client).put({
1872
1681
  url: "/api/v1/formations/{formation_id}",
@@ -1878,11 +1687,11 @@ var Formations = class {
1878
1687
  });
1879
1688
  }
1880
1689
  /**
1881
- * List formation operation events
1882
- *
1883
- * Returns all operations (create, update, delete) with their event logs for the formation, ordered chronologically.
1884
- *
1885
- */
1690
+ * List formation operation events
1691
+ *
1692
+ * Returns all operations (create, update, delete) with their event logs for the formation, ordered chronologically.
1693
+ *
1694
+ */
1886
1695
  static listFormationEvents(options) {
1887
1696
  return (options.client ?? client).get({
1888
1697
  url: "/api/v1/formations/{formation_id}/events",
@@ -1891,14 +1700,11 @@ var Formations = class {
1891
1700
  }
1892
1701
  };
1893
1702
  var Knowledge = class {
1894
- static {
1895
- __name(this, "Knowledge");
1896
- }
1897
1703
  /**
1898
- * Search knowledge
1899
- *
1900
- * Searches across documents and memory entries using semantic search, file paths, document IDs, or memory IDs/tags. At least one of `query`, `document_paths`, `document_ids`, `memory_ids`, or `memory_tags` must be provided.
1901
- */
1704
+ * Search knowledge
1705
+ *
1706
+ * Searches across documents and memory entries using semantic search, file paths, document IDs, or memory IDs/tags. At least one of `query`, `document_paths`, `document_ids`, `memory_ids`, or `memory_tags` must be provided.
1707
+ */
1902
1708
  static searchKnowledge(options) {
1903
1709
  return (options.client ?? client).post({
1904
1710
  url: "/api/v1/knowledge/search",
@@ -1911,14 +1717,11 @@ var Knowledge = class {
1911
1717
  }
1912
1718
  };
1913
1719
  var Memories = class {
1914
- static {
1915
- __name(this, "Memories");
1916
- }
1917
1720
  /**
1918
- * List memories
1919
- *
1920
- * Returns a list of memory configurations for a project
1921
- */
1721
+ * List memories
1722
+ *
1723
+ * Returns a list of memory configurations for a project
1724
+ */
1922
1725
  static listMemories(options) {
1923
1726
  return (options?.client ?? client).get({
1924
1727
  url: "/api/v1/memories",
@@ -1926,10 +1729,10 @@ var Memories = class {
1926
1729
  });
1927
1730
  }
1928
1731
  /**
1929
- * Create a memory
1930
- *
1931
- * Creates a new memory configuration in a project
1932
- */
1732
+ * Create a memory
1733
+ *
1734
+ * Creates a new memory configuration in a project
1735
+ */
1933
1736
  static createMemory(options) {
1934
1737
  return (options.client ?? client).post({
1935
1738
  url: "/api/v1/memories",
@@ -1941,10 +1744,10 @@ var Memories = class {
1941
1744
  });
1942
1745
  }
1943
1746
  /**
1944
- * Delete a memory
1945
- *
1946
- * Deletes a memory configuration
1947
- */
1747
+ * Delete a memory
1748
+ *
1749
+ * Deletes a memory configuration
1750
+ */
1948
1751
  static deleteMemory(options) {
1949
1752
  return (options.client ?? client).delete({
1950
1753
  url: "/api/v1/memories/{memory_id}",
@@ -1952,10 +1755,10 @@ var Memories = class {
1952
1755
  });
1953
1756
  }
1954
1757
  /**
1955
- * Get a memory
1956
- *
1957
- * Returns a single memory configuration by ID
1958
- */
1758
+ * Get a memory
1759
+ *
1760
+ * Returns a single memory configuration by ID
1761
+ */
1959
1762
  static getMemory(options) {
1960
1763
  return (options.client ?? client).get({
1961
1764
  url: "/api/v1/memories/{memory_id}",
@@ -1963,10 +1766,10 @@ var Memories = class {
1963
1766
  });
1964
1767
  }
1965
1768
  /**
1966
- * Update a memory
1967
- *
1968
- * Updates an existing memory configuration
1969
- */
1769
+ * Update a memory
1770
+ *
1771
+ * Updates an existing memory configuration
1772
+ */
1970
1773
  static updateMemory(options) {
1971
1774
  return (options.client ?? client).put({
1972
1775
  url: "/api/v1/memories/{memory_id}",
@@ -1979,14 +1782,11 @@ var Memories = class {
1979
1782
  }
1980
1783
  };
1981
1784
  var MemoryEntries = class {
1982
- static {
1983
- __name(this, "MemoryEntries");
1984
- }
1985
1785
  /**
1986
- * List memory entries
1987
- *
1988
- * Returns all entries in a memory container
1989
- */
1786
+ * List memory entries
1787
+ *
1788
+ * Returns all entries in a memory container
1789
+ */
1990
1790
  static listMemoryEntries(options) {
1991
1791
  return (options.client ?? client).get({
1992
1792
  url: "/api/v1/memories/{memory_id}/entries",
@@ -1994,10 +1794,10 @@ var MemoryEntries = class {
1994
1794
  });
1995
1795
  }
1996
1796
  /**
1997
- * Create a memory entry
1998
- *
1999
- * Creates a new entry in the specified memory container. Automatically generates an embedding for semantic search.
2000
- */
1797
+ * Create a memory entry
1798
+ *
1799
+ * Creates a new entry in the specified memory container. Automatically generates an embedding for semantic search.
1800
+ */
2001
1801
  static createMemoryEntry(options) {
2002
1802
  return (options.client ?? client).post({
2003
1803
  url: "/api/v1/memories/{memory_id}/entries",
@@ -2009,10 +1809,10 @@ var MemoryEntries = class {
2009
1809
  });
2010
1810
  }
2011
1811
  /**
2012
- * Delete a memory entry
2013
- *
2014
- * Deletes a memory entry
2015
- */
1812
+ * Delete a memory entry
1813
+ *
1814
+ * Deletes a memory entry
1815
+ */
2016
1816
  static deleteMemoryEntry(options) {
2017
1817
  return (options.client ?? client).delete({
2018
1818
  url: "/api/v1/memories/{memory_id}/entries/{entry_id}",
@@ -2020,10 +1820,10 @@ var MemoryEntries = class {
2020
1820
  });
2021
1821
  }
2022
1822
  /**
2023
- * Get a memory entry
2024
- *
2025
- * Returns a single memory entry by ID
2026
- */
1823
+ * Get a memory entry
1824
+ *
1825
+ * Returns a single memory entry by ID
1826
+ */
2027
1827
  static getMemoryEntry(options) {
2028
1828
  return (options.client ?? client).get({
2029
1829
  url: "/api/v1/memories/{memory_id}/entries/{entry_id}",
@@ -2031,10 +1831,10 @@ var MemoryEntries = class {
2031
1831
  });
2032
1832
  }
2033
1833
  /**
2034
- * Update a memory entry
2035
- *
2036
- * Updates an existing memory entry. Regenerates the embedding if content changes.
2037
- */
1834
+ * Update a memory entry
1835
+ *
1836
+ * Updates an existing memory entry. Regenerates the embedding if content changes.
1837
+ */
2038
1838
  static updateMemoryEntry(options) {
2039
1839
  return (options.client ?? client).put({
2040
1840
  url: "/api/v1/memories/{memory_id}/entries/{entry_id}",
@@ -2047,14 +1847,11 @@ var MemoryEntries = class {
2047
1847
  }
2048
1848
  };
2049
1849
  var Orchestrations = class {
2050
- static {
2051
- __name(this, "Orchestrations");
2052
- }
2053
1850
  /**
2054
- * List orchestrations
2055
- *
2056
- * Returns orchestrations accessible to the caller.
2057
- */
1851
+ * List orchestrations
1852
+ *
1853
+ * Returns orchestrations accessible to the caller.
1854
+ */
2058
1855
  static listOrchestrations(options) {
2059
1856
  return (options?.client ?? client).get({
2060
1857
  url: "/api/v1/orchestrations",
@@ -2062,10 +1859,10 @@ var Orchestrations = class {
2062
1859
  });
2063
1860
  }
2064
1861
  /**
2065
- * Create an orchestration
2066
- *
2067
- * Creates a new orchestration workflow definition in the project.
2068
- */
1862
+ * Create an orchestration
1863
+ *
1864
+ * Creates a new orchestration workflow definition in the project.
1865
+ */
2069
1866
  static createOrchestration(options) {
2070
1867
  return (options.client ?? client).post({
2071
1868
  url: "/api/v1/orchestrations",
@@ -2077,10 +1874,10 @@ var Orchestrations = class {
2077
1874
  });
2078
1875
  }
2079
1876
  /**
2080
- * Delete an orchestration
2081
- *
2082
- * Deletes an orchestration definition and all its runs.
2083
- */
1877
+ * Delete an orchestration
1878
+ *
1879
+ * Deletes an orchestration definition and all its runs.
1880
+ */
2084
1881
  static deleteOrchestration(options) {
2085
1882
  return (options.client ?? client).delete({
2086
1883
  url: "/api/v1/orchestrations/{orchestration_id}",
@@ -2088,10 +1885,10 @@ var Orchestrations = class {
2088
1885
  });
2089
1886
  }
2090
1887
  /**
2091
- * Get an orchestration
2092
- *
2093
- * Returns the orchestration with nodes and edges.
2094
- */
1888
+ * Get an orchestration
1889
+ *
1890
+ * Returns the orchestration with nodes and edges.
1891
+ */
2095
1892
  static getOrchestration(options) {
2096
1893
  return (options.client ?? client).get({
2097
1894
  url: "/api/v1/orchestrations/{orchestration_id}",
@@ -2099,10 +1896,10 @@ var Orchestrations = class {
2099
1896
  });
2100
1897
  }
2101
1898
  /**
2102
- * Update an orchestration
2103
- *
2104
- * Partially updates an orchestration definition.
2105
- */
1899
+ * Update an orchestration
1900
+ *
1901
+ * Partially updates an orchestration definition.
1902
+ */
2106
1903
  static updateOrchestration(options) {
2107
1904
  return (options.client ?? client).patch({
2108
1905
  url: "/api/v1/orchestrations/{orchestration_id}",
@@ -2114,10 +1911,10 @@ var Orchestrations = class {
2114
1911
  });
2115
1912
  }
2116
1913
  /**
2117
- * List orchestration runs
2118
- *
2119
- * Returns all runs for an orchestration.
2120
- */
1914
+ * List orchestration runs
1915
+ *
1916
+ * Returns all runs for an orchestration.
1917
+ */
2121
1918
  static listOrchestrationRuns(options) {
2122
1919
  return (options.client ?? client).get({
2123
1920
  url: "/api/v1/orchestrations/{orchestration_id}/runs",
@@ -2125,10 +1922,10 @@ var Orchestrations = class {
2125
1922
  });
2126
1923
  }
2127
1924
  /**
2128
- * Start an orchestration run
2129
- *
2130
- * Creates and immediately executes a new run for the orchestration.
2131
- */
1925
+ * Start an orchestration run
1926
+ *
1927
+ * Creates and immediately executes a new run for the orchestration.
1928
+ */
2132
1929
  static startOrchestrationRun(options) {
2133
1930
  return (options.client ?? client).post({
2134
1931
  url: "/api/v1/orchestrations/{orchestration_id}/runs",
@@ -2140,10 +1937,10 @@ var Orchestrations = class {
2140
1937
  });
2141
1938
  }
2142
1939
  /**
2143
- * Cancel an orchestration run
2144
- *
2145
- * Cancels a running or paused orchestration run.
2146
- */
1940
+ * Cancel an orchestration run
1941
+ *
1942
+ * Cancels a running or paused orchestration run.
1943
+ */
2147
1944
  static cancelOrchestrationRun(options) {
2148
1945
  return (options.client ?? client).post({
2149
1946
  url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}/cancel",
@@ -2151,10 +1948,10 @@ var Orchestrations = class {
2151
1948
  });
2152
1949
  }
2153
1950
  /**
2154
- * Submit human input
2155
- *
2156
- * Provides human input to a paused orchestration run waiting at a human node.
2157
- */
1951
+ * Submit human input
1952
+ *
1953
+ * Provides human input to a paused orchestration run waiting at a human node.
1954
+ */
2158
1955
  static submitHumanInput(options) {
2159
1956
  return (options.client ?? client).post({
2160
1957
  url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}/human-input",
@@ -2166,10 +1963,10 @@ var Orchestrations = class {
2166
1963
  });
2167
1964
  }
2168
1965
  /**
2169
- * Resume an orchestration run
2170
- *
2171
- * Resumes a paused orchestration run from its last checkpoint.
2172
- */
1966
+ * Resume an orchestration run
1967
+ *
1968
+ * Resumes a paused orchestration run from its last checkpoint.
1969
+ */
2173
1970
  static resumeOrchestrationRun(options) {
2174
1971
  return (options.client ?? client).post({
2175
1972
  url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}/resume",
@@ -2177,10 +1974,10 @@ var Orchestrations = class {
2177
1974
  });
2178
1975
  }
2179
1976
  /**
2180
- * Get an orchestration run
2181
- *
2182
- * Returns the status, state, and artifacts of a specific run.
2183
- */
1977
+ * Get an orchestration run
1978
+ *
1979
+ * Returns the status, state, and artifacts of a specific run.
1980
+ */
2184
1981
  static getOrchestrationRun(options) {
2185
1982
  return (options.client ?? client).get({
2186
1983
  url: "/api/v1/orchestrations/{orchestration_id}/runs/{run_id}",
@@ -2189,14 +1986,11 @@ var Orchestrations = class {
2189
1986
  }
2190
1987
  };
2191
1988
  var Policies = class {
2192
- static {
2193
- __name(this, "Policies");
2194
- }
2195
1989
  /**
2196
- * List all policies
2197
- *
2198
- * Returns a list of all global policies. Requires admin role.
2199
- */
1990
+ * List all policies
1991
+ *
1992
+ * Returns a list of all global policies. Requires admin role.
1993
+ */
2200
1994
  static listPolicies(options) {
2201
1995
  return (options?.client ?? client).get({
2202
1996
  url: "/api/v1/policies",
@@ -2204,10 +1998,10 @@ var Policies = class {
2204
1998
  });
2205
1999
  }
2206
2000
  /**
2207
- * Create a policy
2208
- *
2209
- * Creates a new global policy. Requires admin role.
2210
- */
2001
+ * Create a policy
2002
+ *
2003
+ * Creates a new global policy. Requires admin role.
2004
+ */
2211
2005
  static createPolicy(options) {
2212
2006
  return (options.client ?? client).post({
2213
2007
  url: "/api/v1/policies",
@@ -2219,10 +2013,10 @@ var Policies = class {
2219
2013
  });
2220
2014
  }
2221
2015
  /**
2222
- * Delete a policy
2223
- *
2224
- * Deletes a global policy. Requires admin role.
2225
- */
2016
+ * Delete a policy
2017
+ *
2018
+ * Deletes a global policy. Requires admin role.
2019
+ */
2226
2020
  static deletePolicy(options) {
2227
2021
  return (options.client ?? client).delete({
2228
2022
  url: "/api/v1/policies/{policy_id}",
@@ -2230,10 +2024,10 @@ var Policies = class {
2230
2024
  });
2231
2025
  }
2232
2026
  /**
2233
- * Get a policy
2234
- *
2235
- * Returns details of a specific policy. Requires admin role.
2236
- */
2027
+ * Get a policy
2028
+ *
2029
+ * Returns details of a specific policy. Requires admin role.
2030
+ */
2237
2031
  static getPolicy(options) {
2238
2032
  return (options.client ?? client).get({
2239
2033
  url: "/api/v1/policies/{policy_id}",
@@ -2241,10 +2035,10 @@ var Policies = class {
2241
2035
  });
2242
2036
  }
2243
2037
  /**
2244
- * Update a policy
2245
- *
2246
- * Updates an existing global policy. Requires admin role.
2247
- */
2038
+ * Update a policy
2039
+ *
2040
+ * Updates an existing global policy. Requires admin role.
2041
+ */
2248
2042
  static updatePolicy(options) {
2249
2043
  return (options.client ?? client).put({
2250
2044
  url: "/api/v1/policies/{policy_id}",
@@ -2257,14 +2051,11 @@ var Policies = class {
2257
2051
  }
2258
2052
  };
2259
2053
  var Projects = class {
2260
- static {
2261
- __name(this, "Projects");
2262
- }
2263
2054
  /**
2264
- * Create a project
2265
- *
2266
- * Creates a new project. Requires admin role.
2267
- */
2055
+ * Create a project
2056
+ *
2057
+ * Creates a new project. Requires admin role.
2058
+ */
2268
2059
  static createProject(options) {
2269
2060
  return (options.client ?? client).post({
2270
2061
  url: "/api/v1/projects",
@@ -2276,10 +2067,10 @@ var Projects = class {
2276
2067
  });
2277
2068
  }
2278
2069
  /**
2279
- * Delete a project
2280
- *
2281
- * Deletes a project. Requires admin role.
2282
- */
2070
+ * Delete a project
2071
+ *
2072
+ * Deletes a project. Requires admin role.
2073
+ */
2283
2074
  static deleteProject(options) {
2284
2075
  return (options.client ?? client).delete({
2285
2076
  url: "/api/v1/projects/{project_id}",
@@ -2287,10 +2078,10 @@ var Projects = class {
2287
2078
  });
2288
2079
  }
2289
2080
  /**
2290
- * Get a project
2291
- *
2292
- * Returns details of a specific project.
2293
- */
2081
+ * Get a project
2082
+ *
2083
+ * Returns details of a specific project.
2084
+ */
2294
2085
  static getProject(options) {
2295
2086
  return (options.client ?? client).get({
2296
2087
  url: "/api/v1/projects/{project_id}",
@@ -2299,14 +2090,11 @@ var Projects = class {
2299
2090
  }
2300
2091
  };
2301
2092
  var Secrets = class {
2302
- static {
2303
- __name(this, "Secrets");
2304
- }
2305
2093
  /**
2306
- * List secrets
2307
- *
2308
- * Returns a list of secrets for a project
2309
- */
2094
+ * List secrets
2095
+ *
2096
+ * Returns a list of secrets for a project
2097
+ */
2310
2098
  static listSecrets(options) {
2311
2099
  return (options?.client ?? client).get({
2312
2100
  url: "/api/v1/secrets",
@@ -2314,10 +2102,10 @@ var Secrets = class {
2314
2102
  });
2315
2103
  }
2316
2104
  /**
2317
- * Create a secret
2318
- *
2319
- * Creates a new encrypted secret in a project
2320
- */
2105
+ * Create a secret
2106
+ *
2107
+ * Creates a new encrypted secret in a project
2108
+ */
2321
2109
  static createSecret(options) {
2322
2110
  return (options.client ?? client).post({
2323
2111
  url: "/api/v1/secrets",
@@ -2329,10 +2117,10 @@ var Secrets = class {
2329
2117
  });
2330
2118
  }
2331
2119
  /**
2332
- * Delete a secret
2333
- *
2334
- * Deletes a secret
2335
- */
2120
+ * Delete a secret
2121
+ *
2122
+ * Deletes a secret
2123
+ */
2336
2124
  static deleteSecret(options) {
2337
2125
  return (options.client ?? client).delete({
2338
2126
  url: "/api/v1/secrets/{secret_id}",
@@ -2340,10 +2128,10 @@ var Secrets = class {
2340
2128
  });
2341
2129
  }
2342
2130
  /**
2343
- * Get a secret
2344
- *
2345
- * Returns a specific secret
2346
- */
2131
+ * Get a secret
2132
+ *
2133
+ * Returns a specific secret
2134
+ */
2347
2135
  static getSecret(options) {
2348
2136
  return (options.client ?? client).get({
2349
2137
  url: "/api/v1/secrets/{secret_id}",
@@ -2351,10 +2139,10 @@ var Secrets = class {
2351
2139
  });
2352
2140
  }
2353
2141
  /**
2354
- * Update a secret
2355
- *
2356
- * Updates a secret's name and/or value
2357
- */
2142
+ * Update a secret
2143
+ *
2144
+ * Updates a secret's name and/or value
2145
+ */
2358
2146
  static updateSecret(options) {
2359
2147
  return (options.client ?? client).patch({
2360
2148
  url: "/api/v1/secrets/{secret_id}",
@@ -2367,14 +2155,11 @@ var Secrets = class {
2367
2155
  }
2368
2156
  };
2369
2157
  var Sessions = class {
2370
- static {
2371
- __name(this, "Sessions");
2372
- }
2373
2158
  /**
2374
- * List sessions
2375
- *
2376
- * Returns sessions for the specified agent, optionally filtered by actorId and status.
2377
- */
2159
+ * List sessions
2160
+ *
2161
+ * Returns sessions for the specified agent, optionally filtered by actorId and status.
2162
+ */
2378
2163
  static listAgentSessions(options) {
2379
2164
  return (options.client ?? client).get({
2380
2165
  url: "/api/v1/agents/{agent_id}/sessions",
@@ -2382,11 +2167,11 @@ var Sessions = class {
2382
2167
  });
2383
2168
  }
2384
2169
  /**
2385
- * Create a session
2386
- *
2387
- * Creates a new session for the specified agent. Internally creates a conversation and two actors (agent + user) so the caller only needs this single call to start interacting with the agent.
2388
- *
2389
- */
2170
+ * Create a session
2171
+ *
2172
+ * Creates a new session for the specified agent. Internally creates a conversation and two actors (agent + user) so the caller only needs this single call to start interacting with the agent.
2173
+ *
2174
+ */
2390
2175
  static createAgentSession(options) {
2391
2176
  return (options.client ?? client).post({
2392
2177
  url: "/api/v1/agents/{agent_id}/sessions",
@@ -2398,10 +2183,10 @@ var Sessions = class {
2398
2183
  });
2399
2184
  }
2400
2185
  /**
2401
- * Delete a session
2402
- *
2403
- * Deletes the session and its underlying conversation and actors.
2404
- */
2186
+ * Delete a session
2187
+ *
2188
+ * Deletes the session and its underlying conversation and actors.
2189
+ */
2405
2190
  static deleteAgentSession(options) {
2406
2191
  return (options.client ?? client).delete({
2407
2192
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}",
@@ -2409,10 +2194,10 @@ var Sessions = class {
2409
2194
  });
2410
2195
  }
2411
2196
  /**
2412
- * Get a session
2413
- *
2414
- * Returns details of a single session.
2415
- */
2197
+ * Get a session
2198
+ *
2199
+ * Returns details of a single session.
2200
+ */
2416
2201
  static getAgentSession(options) {
2417
2202
  return (options.client ?? client).get({
2418
2203
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}",
@@ -2420,10 +2205,10 @@ var Sessions = class {
2420
2205
  });
2421
2206
  }
2422
2207
  /**
2423
- * Update a session
2424
- *
2425
- * Updates the session name and/or status.
2426
- */
2208
+ * Update a session
2209
+ *
2210
+ * Updates the session name and/or status.
2211
+ */
2427
2212
  static updateSession(options) {
2428
2213
  return (options.client ?? client).patch({
2429
2214
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}",
@@ -2435,11 +2220,11 @@ var Sessions = class {
2435
2220
  });
2436
2221
  }
2437
2222
  /**
2438
- * List session messages
2439
- *
2440
- * Returns messages in the session with simplified roles (user/assistant) instead of raw actor IDs.
2441
- *
2442
- */
2223
+ * List session messages
2224
+ *
2225
+ * Returns messages in the session with simplified roles (user/assistant) instead of raw actor IDs.
2226
+ *
2227
+ */
2443
2228
  static listAgentSessionMessages(options) {
2444
2229
  return (options.client ?? client).get({
2445
2230
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}/messages",
@@ -2447,11 +2232,11 @@ var Sessions = class {
2447
2232
  });
2448
2233
  }
2449
2234
  /**
2450
- * Add a user message
2451
- *
2452
- * Saves a user message to the session. When autoGenerate is enabled on the session and no generation is currently in progress, generation is triggered automatically and the response mirrors GenerateSessionResponse. Otherwise returns the saved user message.
2453
- *
2454
- */
2235
+ * Add a user message
2236
+ *
2237
+ * Saves a user message to the session. When autoGenerate is enabled on the session and no generation is currently in progress, generation is triggered automatically and the response mirrors GenerateSessionResponse. Otherwise returns the saved user message.
2238
+ *
2239
+ */
2455
2240
  static addSessionMessage(options) {
2456
2241
  return (options.client ?? client).post({
2457
2242
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}/messages",
@@ -2463,11 +2248,11 @@ var Sessions = class {
2463
2248
  });
2464
2249
  }
2465
2250
  /**
2466
- * Trigger agent generation
2467
- *
2468
- * Triggers the agent to generate a response based on the current conversation. Returns the assistant reply or a requires_action status if the agent needs client tool outputs. Pass ?async=true for a 202 accepted response when you do not need to wait for the result.
2469
- *
2470
- */
2251
+ * Trigger agent generation
2252
+ *
2253
+ * Triggers the agent to generate a response based on the current conversation. Returns the assistant reply or a requires_action status if the agent needs client tool outputs. Pass ?async=true for a 202 accepted response when you do not need to wait for the result.
2254
+ *
2255
+ */
2471
2256
  static generateSessionResponse(options) {
2472
2257
  return (options.client ?? client).post({
2473
2258
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}/generate",
@@ -2479,11 +2264,11 @@ var Sessions = class {
2479
2264
  });
2480
2265
  }
2481
2266
  /**
2482
- * Submit tool outputs
2483
- *
2484
- * Submits client tool outputs for a generation that returned requires_action. The agent continues its loop and returns the final or next requires_action result.
2485
- *
2486
- */
2267
+ * Submit tool outputs
2268
+ *
2269
+ * Submits client tool outputs for a generation that returned requires_action. The agent continues its loop and returns the final or next requires_action result.
2270
+ *
2271
+ */
2487
2272
  static submitSessionToolOutputs(options) {
2488
2273
  return (options.client ?? client).post({
2489
2274
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tool-outputs",
@@ -2495,10 +2280,10 @@ var Sessions = class {
2495
2280
  });
2496
2281
  }
2497
2282
  /**
2498
- * Get session tags
2499
- *
2500
- * Returns the session's tags object.
2501
- */
2283
+ * Get session tags
2284
+ *
2285
+ * Returns the session's tags object.
2286
+ */
2502
2287
  static getSessionTags(options) {
2503
2288
  return (options.client ?? client).get({
2504
2289
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tags",
@@ -2506,10 +2291,10 @@ var Sessions = class {
2506
2291
  });
2507
2292
  }
2508
2293
  /**
2509
- * Merge session tags
2510
- *
2511
- * Merges the provided tags into the session's existing tags.
2512
- */
2294
+ * Merge session tags
2295
+ *
2296
+ * Merges the provided tags into the session's existing tags.
2297
+ */
2513
2298
  static mergeSessionTags(options) {
2514
2299
  return (options.client ?? client).patch({
2515
2300
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tags",
@@ -2521,10 +2306,10 @@ var Sessions = class {
2521
2306
  });
2522
2307
  }
2523
2308
  /**
2524
- * Replace session tags
2525
- *
2526
- * Replaces all tags on the session.
2527
- */
2309
+ * Replace session tags
2310
+ *
2311
+ * Replaces all tags on the session.
2312
+ */
2528
2313
  static replaceSessionTags(options) {
2529
2314
  return (options.client ?? client).put({
2530
2315
  url: "/api/v1/agents/{agent_id}/sessions/{session_id}/tags",
@@ -2537,14 +2322,11 @@ var Sessions = class {
2537
2322
  }
2538
2323
  };
2539
2324
  var Tools = class {
2540
- static {
2541
- __name(this, "Tools");
2542
- }
2543
2325
  /**
2544
- * List tools
2545
- *
2546
- * Returns all tools in the project.
2547
- */
2326
+ * List tools
2327
+ *
2328
+ * Returns all tools in the project.
2329
+ */
2548
2330
  static listTools(options) {
2549
2331
  return (options?.client ?? client).get({
2550
2332
  url: "/api/v1/tools",
@@ -2552,10 +2334,10 @@ var Tools = class {
2552
2334
  });
2553
2335
  }
2554
2336
  /**
2555
- * Create a tool
2556
- *
2557
- * Creates a new tool in the project.
2558
- */
2337
+ * Create a tool
2338
+ *
2339
+ * Creates a new tool in the project.
2340
+ */
2559
2341
  static createTool(options) {
2560
2342
  return (options.client ?? client).post({
2561
2343
  url: "/api/v1/tools",
@@ -2567,10 +2349,10 @@ var Tools = class {
2567
2349
  });
2568
2350
  }
2569
2351
  /**
2570
- * Delete a tool
2571
- *
2572
- * Deletes a tool by ID.
2573
- */
2352
+ * Delete a tool
2353
+ *
2354
+ * Deletes a tool by ID.
2355
+ */
2574
2356
  static deleteTool(options) {
2575
2357
  return (options.client ?? client).delete({
2576
2358
  url: "/api/v1/tools/{tool_id}",
@@ -2578,10 +2360,10 @@ var Tools = class {
2578
2360
  });
2579
2361
  }
2580
2362
  /**
2581
- * Get a tool
2582
- *
2583
- * Returns a single tool by ID.
2584
- */
2363
+ * Get a tool
2364
+ *
2365
+ * Returns a single tool by ID.
2366
+ */
2585
2367
  static getTool(options) {
2586
2368
  return (options.client ?? client).get({
2587
2369
  url: "/api/v1/tools/{tool_id}",
@@ -2589,10 +2371,10 @@ var Tools = class {
2589
2371
  });
2590
2372
  }
2591
2373
  /**
2592
- * Update a tool
2593
- *
2594
- * Updates an existing tool.
2595
- */
2374
+ * Update a tool
2375
+ *
2376
+ * Updates an existing tool.
2377
+ */
2596
2378
  static updateTool(options) {
2597
2379
  return (options.client ?? client).patch({
2598
2380
  url: "/api/v1/tools/{tool_id}",
@@ -2604,13 +2386,13 @@ var Tools = class {
2604
2386
  });
2605
2387
  }
2606
2388
  /**
2607
- * Call a tool
2608
- *
2609
- * Directly invokes a tool and returns its output. Supported for `http`, `soat`, and `mcp` tools. `client` tools cannot be invoked server-side and will return 422.
2610
- * For `soat` and `mcp` tools the `action` field is required and identifies which action (SOAT) or tool name (MCP) to invoke. For `http` tools `action` is ignored.
2611
- * `preset_parameters` stored on the tool are merged with the caller-supplied `input` before execution; preset keys take lower precedence.
2612
- *
2613
- */
2389
+ * Call a tool
2390
+ *
2391
+ * Directly invokes a tool and returns its output. Supported for `http`, `soat`, and `mcp` tools. `client` tools cannot be invoked server-side and will return 422.
2392
+ * For `soat` and `mcp` tools the `action` field is required and identifies which action (SOAT) or tool name (MCP) to invoke. For `http` tools `action` is ignored.
2393
+ * `preset_parameters` stored on the tool are merged with the caller-supplied `input` before execution; preset keys take lower precedence.
2394
+ *
2395
+ */
2614
2396
  static callTool(options) {
2615
2397
  return (options.client ?? client).post({
2616
2398
  url: "/api/v1/tools/{tool_id}/call",
@@ -2623,14 +2405,11 @@ var Tools = class {
2623
2405
  }
2624
2406
  };
2625
2407
  var Traces = class {
2626
- static {
2627
- __name(this, "Traces");
2628
- }
2629
2408
  /**
2630
- * List traces
2631
- *
2632
- * Returns a paginated list of execution traces for the project.
2633
- */
2409
+ * List traces
2410
+ *
2411
+ * Returns a paginated list of execution traces for the project.
2412
+ */
2634
2413
  static listTraces(options) {
2635
2414
  return (options?.client ?? client).get({
2636
2415
  url: "/api/v1/traces",
@@ -2638,10 +2417,10 @@ var Traces = class {
2638
2417
  });
2639
2418
  }
2640
2419
  /**
2641
- * Get a trace
2642
- *
2643
- * Returns a single trace by ID.
2644
- */
2420
+ * Get a trace
2421
+ *
2422
+ * Returns a single trace by ID.
2423
+ */
2645
2424
  static getTrace(options) {
2646
2425
  return (options.client ?? client).get({
2647
2426
  url: "/api/v1/traces/{trace_id}",
@@ -2649,11 +2428,11 @@ var Traces = class {
2649
2428
  });
2650
2429
  }
2651
2430
  /**
2652
- * Get trace tree
2653
- *
2654
- * Returns the full execution tree rooted at the given trace (or its root if the given trace is a child). Each node represents one agent's execution session. The `children` array contains traces triggered by sub-agent tool calls from that trace.
2655
- *
2656
- */
2431
+ * Get trace tree
2432
+ *
2433
+ * Returns the full execution tree rooted at the given trace (or its root if the given trace is a child). Each node represents one agent's execution session. The `children` array contains traces triggered by sub-agent tool calls from that trace.
2434
+ *
2435
+ */
2657
2436
  static getTraceTree(options) {
2658
2437
  return (options.client ?? client).get({
2659
2438
  url: "/api/v1/traces/{trace_id}/tree",
@@ -2661,10 +2440,10 @@ var Traces = class {
2661
2440
  });
2662
2441
  }
2663
2442
  /**
2664
- * Get generation IDs for a trace
2665
- *
2666
- * Returns all generation IDs associated with the trace.
2667
- */
2443
+ * Get generation IDs for a trace
2444
+ *
2445
+ * Returns all generation IDs associated with the trace.
2446
+ */
2668
2447
  static getTraceGenerations(options) {
2669
2448
  return (options.client ?? client).get({
2670
2449
  url: "/api/v1/traces/{trace_id}/generations",
@@ -2673,14 +2452,11 @@ var Traces = class {
2673
2452
  }
2674
2453
  };
2675
2454
  var Users = class {
2676
- static {
2677
- __name(this, "Users");
2678
- }
2679
2455
  /**
2680
- * List all users
2681
- *
2682
- * Returns a list of all users
2683
- */
2456
+ * List all users
2457
+ *
2458
+ * Returns a list of all users
2459
+ */
2684
2460
  static listUsers(options) {
2685
2461
  return (options?.client ?? client).get({
2686
2462
  url: "/api/v1/users",
@@ -2688,10 +2464,10 @@ var Users = class {
2688
2464
  });
2689
2465
  }
2690
2466
  /**
2691
- * Create a user
2692
- *
2693
- * Creates a new user in the system
2694
- */
2467
+ * Create a user
2468
+ *
2469
+ * Creates a new user in the system
2470
+ */
2695
2471
  static createUser(options) {
2696
2472
  return (options.client ?? client).post({
2697
2473
  url: "/api/v1/users",
@@ -2703,10 +2479,10 @@ var Users = class {
2703
2479
  });
2704
2480
  }
2705
2481
  /**
2706
- * Delete a user by ID
2707
- *
2708
- * Deletes a specific user
2709
- */
2482
+ * Delete a user by ID
2483
+ *
2484
+ * Deletes a specific user
2485
+ */
2710
2486
  static deleteUser(options) {
2711
2487
  return (options.client ?? client).delete({
2712
2488
  url: "/api/v1/users/{user_id}",
@@ -2714,10 +2490,10 @@ var Users = class {
2714
2490
  });
2715
2491
  }
2716
2492
  /**
2717
- * Get a user by ID
2718
- *
2719
- * Returns the data of a specific user
2720
- */
2493
+ * Get a user by ID
2494
+ *
2495
+ * Returns the data of a specific user
2496
+ */
2721
2497
  static getUser(options) {
2722
2498
  return (options.client ?? client).get({
2723
2499
  url: "/api/v1/users/{user_id}",
@@ -2725,10 +2501,10 @@ var Users = class {
2725
2501
  });
2726
2502
  }
2727
2503
  /**
2728
- * Create the first admin user
2729
- *
2730
- * Creates the first admin user. Returns 409 if any user already exists.
2731
- */
2504
+ * Create the first admin user
2505
+ *
2506
+ * Creates the first admin user. Returns 409 if any user already exists.
2507
+ */
2732
2508
  static bootstrapUser(options) {
2733
2509
  return (options.client ?? client).post({
2734
2510
  url: "/api/v1/users/bootstrap",
@@ -2740,10 +2516,10 @@ var Users = class {
2740
2516
  });
2741
2517
  }
2742
2518
  /**
2743
- * Login user
2744
- *
2745
- * Authenticates a user and returns a JWT token
2746
- */
2519
+ * Login user
2520
+ *
2521
+ * Authenticates a user and returns a JWT token
2522
+ */
2747
2523
  static loginUser(options) {
2748
2524
  return (options.client ?? client).post({
2749
2525
  url: "/api/v1/users/login",
@@ -2755,10 +2531,10 @@ var Users = class {
2755
2531
  });
2756
2532
  }
2757
2533
  /**
2758
- * Get policies attached to a user
2759
- *
2760
- * Returns the list of policies attached to a user. Requires admin role.
2761
- */
2534
+ * Get policies attached to a user
2535
+ *
2536
+ * Returns the list of policies attached to a user. Requires admin role.
2537
+ */
2762
2538
  static getUserPolicies(options) {
2763
2539
  return (options.client ?? client).get({
2764
2540
  url: "/api/v1/users/{user_id}/policies",
@@ -2766,10 +2542,10 @@ var Users = class {
2766
2542
  });
2767
2543
  }
2768
2544
  /**
2769
- * Attach policies to a user
2770
- *
2771
- * Replaces the user's policy list with the provided policy IDs. Requires admin role.
2772
- */
2545
+ * Attach policies to a user
2546
+ *
2547
+ * Replaces the user's policy list with the provided policy IDs. Requires admin role.
2548
+ */
2773
2549
  static attachUserPolicies(options) {
2774
2550
  return (options.client ?? client).put({
2775
2551
  url: "/api/v1/users/{user_id}/policies",
@@ -2782,14 +2558,11 @@ var Users = class {
2782
2558
  }
2783
2559
  };
2784
2560
  var Webhooks = class {
2785
- static {
2786
- __name(this, "Webhooks");
2787
- }
2788
2561
  /**
2789
- * List webhooks for a project
2790
- *
2791
- * Lists all webhooks configured for the specified project
2792
- */
2562
+ * List webhooks for a project
2563
+ *
2564
+ * Lists all webhooks configured for the specified project
2565
+ */
2793
2566
  static listWebhooks(options) {
2794
2567
  return (options.client ?? client).get({
2795
2568
  url: "/api/v1/projects/{project_id}/webhooks",
@@ -2797,10 +2570,10 @@ var Webhooks = class {
2797
2570
  });
2798
2571
  }
2799
2572
  /**
2800
- * Create a webhook
2801
- *
2802
- * Creates a new webhook for the specified project
2803
- */
2573
+ * Create a webhook
2574
+ *
2575
+ * Creates a new webhook for the specified project
2576
+ */
2804
2577
  static createWebhook(options) {
2805
2578
  return (options.client ?? client).post({
2806
2579
  url: "/api/v1/projects/{project_id}/webhooks",
@@ -2812,10 +2585,10 @@ var Webhooks = class {
2812
2585
  });
2813
2586
  }
2814
2587
  /**
2815
- * Delete a webhook
2816
- *
2817
- * Deletes a webhook and stops all event deliveries
2818
- */
2588
+ * Delete a webhook
2589
+ *
2590
+ * Deletes a webhook and stops all event deliveries
2591
+ */
2819
2592
  static deleteWebhook(options) {
2820
2593
  return (options.client ?? client).delete({
2821
2594
  url: "/api/v1/projects/{project_id}/webhooks/{webhook_id}",
@@ -2823,10 +2596,10 @@ var Webhooks = class {
2823
2596
  });
2824
2597
  }
2825
2598
  /**
2826
- * Get a webhook
2827
- *
2828
- * Retrieves the details of a specific webhook
2829
- */
2599
+ * Get a webhook
2600
+ *
2601
+ * Retrieves the details of a specific webhook
2602
+ */
2830
2603
  static getWebhook(options) {
2831
2604
  return (options.client ?? client).get({
2832
2605
  url: "/api/v1/projects/{project_id}/webhooks/{webhook_id}",
@@ -2834,10 +2607,10 @@ var Webhooks = class {
2834
2607
  });
2835
2608
  }
2836
2609
  /**
2837
- * Update a webhook
2838
- *
2839
- * Updates an existing webhook's configuration
2840
- */
2610
+ * Update a webhook
2611
+ *
2612
+ * Updates an existing webhook's configuration
2613
+ */
2841
2614
  static updateWebhook(options) {
2842
2615
  return (options.client ?? client).put({
2843
2616
  url: "/api/v1/projects/{project_id}/webhooks/{webhook_id}",
@@ -2849,10 +2622,10 @@ var Webhooks = class {
2849
2622
  });
2850
2623
  }
2851
2624
  /**
2852
- * List deliveries for a webhook
2853
- *
2854
- * Lists all event deliveries for a specific webhook
2855
- */
2625
+ * List deliveries for a webhook
2626
+ *
2627
+ * Lists all event deliveries for a specific webhook
2628
+ */
2856
2629
  static listWebhookDeliveries(options) {
2857
2630
  return (options.client ?? client).get({
2858
2631
  url: "/api/v1/projects/{project_id}/webhooks/{webhook_id}/deliveries",
@@ -2860,10 +2633,10 @@ var Webhooks = class {
2860
2633
  });
2861
2634
  }
2862
2635
  /**
2863
- * Get a delivery
2864
- *
2865
- * Retrieves the details of a specific webhook delivery
2866
- */
2636
+ * Get a delivery
2637
+ *
2638
+ * Retrieves the details of a specific webhook delivery
2639
+ */
2867
2640
  static getWebhookDelivery(options) {
2868
2641
  return (options.client ?? client).get({
2869
2642
  url: "/api/v1/projects/{project_id}/webhooks/{webhook_id}/deliveries/{delivery_id}",
@@ -2871,10 +2644,10 @@ var Webhooks = class {
2871
2644
  });
2872
2645
  }
2873
2646
  /**
2874
- * Get webhook secret
2875
- *
2876
- * Retrieves the signing secret for the specified webhook
2877
- */
2647
+ * Get webhook secret
2648
+ *
2649
+ * Retrieves the signing secret for the specified webhook
2650
+ */
2878
2651
  static getWebhookSecret(options) {
2879
2652
  return (options.client ?? client).get({
2880
2653
  url: "/api/v1/projects/{project_id}/webhooks/{webhook_id}/secret",
@@ -2882,10 +2655,10 @@ var Webhooks = class {
2882
2655
  });
2883
2656
  }
2884
2657
  /**
2885
- * Rotate webhook secret
2886
- *
2887
- * Rotates the secret key for the specified webhook
2888
- */
2658
+ * Rotate webhook secret
2659
+ *
2660
+ * Rotates the secret key for the specified webhook
2661
+ */
2889
2662
  static rotateWebhookSecret(options) {
2890
2663
  return (options.client ?? client).post({
2891
2664
  url: "/api/v1/projects/{project_id}/webhooks/{webhook_id}/rotate-secret",
@@ -2894,27 +2667,52 @@ var Webhooks = class {
2894
2667
  }
2895
2668
  };
2896
2669
 
2897
- // src/soatClient.ts
2898
- var bindResource = /* @__PURE__ */__name((SdkClass, client2) => {
2670
+ //#endregion
2671
+ //#region src/soatClient.ts
2672
+ /**
2673
+ * Wraps a static SDK class so that all its methods are callable as instance
2674
+ * methods, with the given `client` automatically injected into every call.
2675
+ *
2676
+ * The return type is preserved as `T` (= `typeof <StaticClass>`), so callers
2677
+ * get full TypeScript auto-complete and type checking without having to pass
2678
+ * `client` themselves.
2679
+ */
2680
+ var bindResource = (SdkClass, client) => {
2899
2681
  return new Proxy(SdkClass, {
2900
- get: /* @__PURE__ */__name((target, prop) => {
2682
+ get: (target, prop) => {
2901
2683
  const value = target[prop];
2902
- if (typeof value === "function") {
2903
- return options => {
2904
- return value({
2905
- ...options,
2906
- client: client2
2907
- });
2908
- };
2909
- }
2684
+ if (typeof value === "function") return options => {
2685
+ return value({
2686
+ ...options,
2687
+ client
2688
+ });
2689
+ };
2910
2690
  return value;
2911
- }, "get")
2691
+ }
2912
2692
  });
2913
- }, "bindResource");
2693
+ };
2694
+ /**
2695
+ * Stripe-style SOAT client.
2696
+ *
2697
+ * Create an instance once and reuse it throughout your application:
2698
+ *
2699
+ * ```ts
2700
+ * import { SoatClient } from '@soat/sdk';
2701
+ *
2702
+ * const soat = new SoatClient({ baseUrl: 'https://api.example.com', token: 'sk_...' });
2703
+ *
2704
+ * const { data, error } = await soat.sessions.addSessionMessage({
2705
+ * path: { agent_id: AGENT_ID, session_id: SESSION_ID },
2706
+ * body: { message: 'What is the capital of France?' },
2707
+ * });
2708
+ * ```
2709
+ *
2710
+ * The instance exposes one property per API resource. Each property mirrors
2711
+ * the corresponding static class from the generated SDK, so all method
2712
+ * signatures, types, and return values are identical — the only difference
2713
+ * is that you never need to supply `client` yourself.
2714
+ */
2914
2715
  var SoatClient = class {
2915
- static {
2916
- __name(this, "SoatClient");
2917
- }
2918
2716
  actors;
2919
2717
  agents;
2920
2718
  aiProviders;
@@ -2972,4 +2770,6 @@ var SoatClient = class {
2972
2770
  this.webhooks = bindResource(Webhooks, httpClient);
2973
2771
  }
2974
2772
  };
2773
+
2774
+ //#endregion
2975
2775
  export { Actors, Agents, AiProviders, ApiKeys, Chats, Conversations, Documents, Files, Formations, Knowledge, Memories, MemoryEntries, Orchestrations, Policies, Projects, Secrets, Sessions, SoatClient, Tools, Traces, Users, Webhooks, createClient, createConfig };