@alva-ai/toolkit 0.28.1-beta.0 → 0.28.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -4169,6 +4169,27 @@ var ThesesResource = class {
4169
4169
  )
4170
4170
  );
4171
4171
  }
4172
+ async setVisibility(id, params) {
4173
+ this.client._requireAuth();
4174
+ if (!params) {
4175
+ throw invalidArgument("params is required");
4176
+ }
4177
+ const thesisID = requireID(id, "id");
4178
+ const visibility = requireVisibility(params.visibility);
4179
+ const response = thesisResponse(
4180
+ await this.client._request(
4181
+ "POST",
4182
+ `/api/v1/theses/${thesisID}/visibility`,
4183
+ { body: { visibility } }
4184
+ )
4185
+ );
4186
+ if (response.thesis.id !== thesisID || response.thesis.visibility !== visibility) {
4187
+ throw invalidResponse2(
4188
+ "visibility response must match the requested thesis and visibility"
4189
+ );
4190
+ }
4191
+ return response;
4192
+ }
4172
4193
  async close(id, params) {
4173
4194
  this.client._requireAuth();
4174
4195
  const body = {
@@ -4216,13 +4237,16 @@ var ThesesResource = class {
4216
4237
  }
4217
4238
  };
4218
4239
  function createBody(params) {
4219
- return {
4240
+ const body = {
4220
4241
  request_id: requireRequestID(params.request_id),
4221
4242
  body: requireBody(params.body),
4222
4243
  title: requireTitle(params.title ?? ""),
4223
4244
  entity_ids: requireIDs(params.entity_ids ?? [], "entity_ids"),
4224
4245
  visibility: requireVisibility(params.visibility ?? "public")
4225
4246
  };
4247
+ if (params.tickers !== void 0)
4248
+ body.tickers = requireTickers(params.tickers);
4249
+ return body;
4226
4250
  }
4227
4251
  function updateBody(params) {
4228
4252
  return {
@@ -4326,6 +4350,19 @@ function requireIDs(value, field) {
4326
4350
  }
4327
4351
  return value.map((item, index) => requireID(item, `${field}[${index}]`));
4328
4352
  }
4353
+ function requireTickers(value) {
4354
+ if (!Array.isArray(value)) throw invalidArgument("tickers must be an array");
4355
+ if (value.length > 100) {
4356
+ throw invalidArgument("tickers must contain at most 100 values");
4357
+ }
4358
+ return value.map((item, index) => {
4359
+ const ticker = requireText2(item, `tickers[${index}]`);
4360
+ if (ticker.trim() === "" || ticker.includes("\0")) {
4361
+ throw invalidArgument(`tickers[${index}] must be non-empty`);
4362
+ }
4363
+ return ticker;
4364
+ });
4365
+ }
4329
4366
  function requireBody(value) {
4330
4367
  const body = requireText2(value, "body");
4331
4368
  if (body.trim().length === 0) throw invalidArgument("body must not be blank");
@@ -5280,7 +5317,7 @@ var installPlaybookRuntime = (targetWindow) => {
5280
5317
  };
5281
5318
 
5282
5319
  // src/index.ts
5283
- var VERSION = true ? "0.28.1-beta.0" : "dev";
5320
+ var VERSION = true ? "0.28.1-beta.1" : "dev";
5284
5321
  // Annotate the CommonJS export names for ESM import in node:
5285
5322
  0 && (module.exports = {
5286
5323
  AlertsResource,